@@ -546,6 +546,7 @@ module PrivateDjango {
546
546
/** Gets a reference to the `django.db.connection` object. */
547
547
API:: Node connection ( ) { result = db ( ) .getMember ( "connection" ) }
548
548
549
+ /** A `django.db.connection` is a PEP249 compliant DB connection. */
549
550
class DjangoDbConnection extends PEP249:: Connection:: InstanceSource {
550
551
DjangoDbConnection ( ) { this = connection ( ) .getAUse ( ) }
551
552
}
@@ -742,6 +743,7 @@ module PrivateDjango {
742
743
743
744
/** Provides models for the `django.conf` module */
744
745
module conf {
746
+ /** Provides models for the `django.conf.urls` module */
745
747
module conf_urls {
746
748
// -------------------------------------------------------------------------
747
749
// django.conf.urls
@@ -940,14 +942,15 @@ module PrivateDjango {
940
942
* See https://docs.djangoproject.com/en/3.1/ref/request-response/#django.http.HttpResponse.
941
943
*/
942
944
module HttpResponse {
945
+ /** Gets a reference to the `django.http.response.HttpResponse` class. */
943
946
API:: Node baseClassRef ( ) {
944
947
result = response ( ) .getMember ( "HttpResponse" )
945
948
or
946
949
// Handle `django.http.HttpResponse` alias
947
950
result = http ( ) .getMember ( "HttpResponse" )
948
951
}
949
952
950
- /** Gets a reference to the `django.http.response.HttpResponse` class. */
953
+ /** Gets a reference to the `django.http.response.HttpResponse` class or any subclass . */
951
954
API:: Node classRef ( ) { result = baseClassRef ( ) .getASubclass * ( ) }
952
955
953
956
/**
@@ -1943,6 +1946,9 @@ module PrivateDjango {
1943
1946
* with the django framework.
1944
1947
*
1945
1948
* Most functions take a django HttpRequest as a parameter (but not all).
1949
+ *
1950
+ * Extend this class to refine existing API models. If you want to model new APIs,
1951
+ * extend `DjangoRouteHandler::Range` instead.
1946
1952
*/
1947
1953
class DjangoRouteHandler extends Function instanceof DjangoRouteHandler:: Range {
1948
1954
/**
@@ -1964,10 +1970,16 @@ module PrivateDjango {
1964
1970
Parameter getRequestParam ( ) { result = this .getArg ( this .getRequestParamIndex ( ) ) }
1965
1971
}
1966
1972
1973
+ /** Provides a class for modeling new django route handlers. */
1967
1974
module DjangoRouteHandler {
1975
+ /**
1976
+ * Extend this class to model new APIs. If you want to refine existing API models,
1977
+ * extend `DjangoRouteHandler` instead.
1978
+ */
1968
1979
abstract class Range extends Function { }
1969
1980
1970
- class StandardDjangoRouteHandlers extends Range {
1981
+ /** Route handlers from normal usage of django. */
1982
+ private class StandardDjangoRouteHandlers extends Range {
1971
1983
StandardDjangoRouteHandlers ( ) {
1972
1984
exists ( DjangoRouteSetup route | route .getViewArg ( ) = poorMansFunctionTracker ( this ) )
1973
1985
or
0 commit comments