@@ -300,19 +300,13 @@ private module PrivateDjango {
300
300
/** Gets a reference to the `django` module. */
301
301
API:: Node django ( ) { result = API:: moduleImport ( "django" ) }
302
302
303
- /**
304
- * Gets a reference to the attribute `attr_name` of the `django` module.
305
- * WARNING: Only holds for a few predefined attributes.
306
- */
307
- private API:: Node django_attr ( string attr_name ) { result = django ( ) .getMember ( attr_name ) }
308
-
309
303
/** Provides models for the `django` module. */
310
304
module django {
311
305
// -------------------------------------------------------------------------
312
306
// django.db
313
307
// -------------------------------------------------------------------------
314
308
/** Gets a reference to the `django.db` module. */
315
- API:: Node db ( ) { result = django_attr ( "db" ) }
309
+ API:: Node db ( ) { result = django ( ) . getMember ( "db" ) }
316
310
317
311
/**
318
312
* `django.db` implements PEP249, providing ways to execute SQL statements against a database.
@@ -473,34 +467,28 @@ private module PrivateDjango {
473
467
// django.urls
474
468
// -------------------------------------------------------------------------
475
469
/** Gets a reference to the `django.urls` module. */
476
- API:: Node urls ( ) { result = django_attr ( "urls" ) }
470
+ API:: Node urls ( ) { result = django ( ) . getMember ( "urls" ) }
477
471
478
472
/** Provides models for the `django.urls` module */
479
473
module urls {
480
- /**
481
- * Gets a reference to the attribute `attr_name` of the `urls` module.
482
- * WARNING: Only holds for a few predefined attributes.
483
- */
484
- private API:: Node urls_attr ( string attr_name ) { result = urls ( ) .getMember ( attr_name ) }
485
-
486
474
/**
487
475
* Gets a reference to the `django.urls.path` function.
488
476
* See https://docs.djangoproject.com/en/3.0/ref/urls/#path
489
477
*/
490
- API:: Node path ( ) { result = urls_attr ( "path" ) }
478
+ API:: Node path ( ) { result = urls ( ) . getMember ( "path" ) }
491
479
492
480
/**
493
481
* Gets a reference to the `django.urls.re_path` function.
494
482
* See https://docs.djangoproject.com/en/3.0/ref/urls/#re_path
495
483
*/
496
- API:: Node re_path ( ) { result = urls_attr ( "re_path" ) }
484
+ API:: Node re_path ( ) { result = urls ( ) . getMember ( "re_path" ) }
497
485
}
498
486
499
487
// -------------------------------------------------------------------------
500
488
// django.conf
501
489
// -------------------------------------------------------------------------
502
490
/** Gets a reference to the `django.conf` module. */
503
- API:: Node conf ( ) { result = django_attr ( "conf" ) }
491
+ API:: Node conf ( ) { result = django ( ) . getMember ( "conf" ) }
504
492
505
493
/** Provides models for the `django.conf` module */
506
494
module conf {
@@ -525,30 +513,18 @@ private module PrivateDjango {
525
513
// django.http
526
514
// -------------------------------------------------------------------------
527
515
/** Gets a reference to the `django.http` module. */
528
- API:: Node http ( ) { result = django_attr ( "http" ) }
516
+ API:: Node http ( ) { result = django ( ) . getMember ( "http" ) }
529
517
530
518
/** Provides models for the `django.http` module */
531
519
module http {
532
- /**
533
- * Gets a reference to the attribute `attr_name` of the `django.http` module.
534
- * WARNING: Only holds for a few predefined attributes.
535
- */
536
- private API:: Node http_attr ( string attr_name ) { result = http ( ) .getMember ( attr_name ) }
537
-
538
520
// ---------------------------------------------------------------------------
539
521
// django.http.request
540
522
// ---------------------------------------------------------------------------
541
523
/** Gets a reference to the `django.http.request` module. */
542
- API:: Node request ( ) { result = http_attr ( "request" ) }
524
+ API:: Node request ( ) { result = http ( ) . getMember ( "request" ) }
543
525
544
526
/** Provides models for the `django.http.request` module. */
545
527
module request {
546
- /**
547
- * Gets a reference to the attribute `attr_name` of the `django.http.request` module.
548
- * WARNING: Only holds for a few predefined attributes.
549
- */
550
- private API:: Node request_attr ( string attr_name ) { result = request ( ) .getMember ( attr_name ) }
551
-
552
528
/**
553
529
* Provides models for the `django.http.request.HttpRequest` class
554
530
*
@@ -557,10 +533,10 @@ private module PrivateDjango {
557
533
module HttpRequest {
558
534
/** Gets a reference to the `django.http.request.HttpRequest` class. */
559
535
API:: Node classRef ( ) {
560
- result = request_attr ( "HttpRequest" )
536
+ result = request ( ) . getMember ( "HttpRequest" )
561
537
or
562
538
// handle django.http.HttpRequest alias
563
- result = http_attr ( "HttpRequest" )
539
+ result = http ( ) . getMember ( "HttpRequest" )
564
540
}
565
541
566
542
/**
@@ -592,29 +568,21 @@ private module PrivateDjango {
592
568
// django.http.response
593
569
// -------------------------------------------------------------------------
594
570
/** Gets a reference to the `django.http.response` module. */
595
- API:: Node response ( ) { result = http_attr ( "response" ) }
571
+ API:: Node response ( ) { result = http ( ) . getMember ( "response" ) }
596
572
597
573
/** Provides models for the `django.http.response` module */
598
574
module response {
599
- /**
600
- * Gets a reference to the attribute `attr_name` of the `django.http.response` module.
601
- * WARNING: Only holds for a few predefined attributes.
602
- */
603
- private API:: Node response_attr ( string attr_name ) {
604
- result = response ( ) .getMember ( attr_name )
605
- }
606
-
607
575
/**
608
576
* Provides models for the `django.http.response.HttpResponse` class
609
577
*
610
578
* See https://docs.djangoproject.com/en/3.1/ref/request-response/#django.http.HttpResponse.
611
579
*/
612
580
module HttpResponse {
613
581
API:: Node baseClassRef ( ) {
614
- result = response_attr ( "HttpResponse" )
582
+ result = response ( ) . getMember ( "HttpResponse" )
615
583
or
616
584
// Handle `django.http.HttpResponse` alias
617
- result = http_attr ( "HttpResponse" )
585
+ result = http ( ) . getMember ( "HttpResponse" )
618
586
}
619
587
620
588
/** Gets a reference to the `django.http.response.HttpResponse` class. */
@@ -672,10 +640,10 @@ private module PrivateDjango {
672
640
module HttpResponseRedirect {
673
641
/** Gets a reference to the `django.http.response.HttpResponseRedirect` class. */
674
642
API:: Node baseClassRef ( ) {
675
- result = response_attr ( "HttpResponseRedirect" )
643
+ result = response ( ) . getMember ( "HttpResponseRedirect" )
676
644
or
677
645
// Handle `django.http.HttpResponseRedirect` alias
678
- result = http_attr ( "HttpResponseRedirect" )
646
+ result = http ( ) . getMember ( "HttpResponseRedirect" )
679
647
}
680
648
681
649
/** Gets a reference a subclass of the `django.http.response.HttpResponseRedirect` class. */
@@ -734,10 +702,10 @@ private module PrivateDjango {
734
702
module HttpResponsePermanentRedirect {
735
703
/** Gets a reference to the `django.http.response.HttpResponsePermanentRedirect` class. */
736
704
API:: Node baseClassRef ( ) {
737
- result = response_attr ( "HttpResponsePermanentRedirect" )
705
+ result = response ( ) . getMember ( "HttpResponsePermanentRedirect" )
738
706
or
739
707
// Handle `django.http.HttpResponsePermanentRedirect` alias
740
- result = http_attr ( "HttpResponsePermanentRedirect" )
708
+ result = http ( ) . getMember ( "HttpResponsePermanentRedirect" )
741
709
}
742
710
743
711
/** Gets a reference to the `django.http.response.HttpResponsePermanentRedirect` class. */
@@ -796,11 +764,11 @@ private module PrivateDjango {
796
764
module HttpResponseNotModified {
797
765
/** Gets a reference to the `django.http.response.HttpResponseNotModified` class. */
798
766
API:: Node baseClassRef ( ) {
799
- result = response_attr ( "HttpResponseNotModified" )
767
+ result = response ( ) . getMember ( "HttpResponseNotModified" )
800
768
or
801
769
// TODO: remove/expand this part of the template as needed
802
770
// Handle `django.http.HttpResponseNotModified` alias
803
- result = http_attr ( "HttpResponseNotModified" )
771
+ result = http ( ) . getMember ( "HttpResponseNotModified" )
804
772
}
805
773
806
774
/** Gets a reference to the `django.http.response.HttpResponseNotModified` class. */
@@ -849,10 +817,10 @@ private module PrivateDjango {
849
817
module HttpResponseBadRequest {
850
818
/** Gets a reference to the `django.http.response.HttpResponseBadRequest` class. */
851
819
API:: Node baseClassRef ( ) {
852
- result = response_attr ( "HttpResponseBadRequest" )
820
+ result = response ( ) . getMember ( "HttpResponseBadRequest" )
853
821
or
854
822
// Handle `django.http.HttpResponseBadRequest` alias
855
- result = http_attr ( "HttpResponseBadRequest" )
823
+ result = http ( ) . getMember ( "HttpResponseBadRequest" )
856
824
}
857
825
858
826
/** Gets a reference to the `django.http.response.HttpResponseBadRequest` class. */
@@ -903,10 +871,10 @@ private module PrivateDjango {
903
871
module HttpResponseNotFound {
904
872
/** Gets a reference to the `django.http.response.HttpResponseNotFound` class. */
905
873
API:: Node baseClassRef ( ) {
906
- result = response_attr ( "HttpResponseNotFound" )
874
+ result = response ( ) . getMember ( "HttpResponseNotFound" )
907
875
or
908
876
// Handle `django.http.HttpResponseNotFound` alias
909
- result = http_attr ( "HttpResponseNotFound" )
877
+ result = http ( ) . getMember ( "HttpResponseNotFound" )
910
878
}
911
879
912
880
/** Gets a reference to the `django.http.response.HttpResponseNotFound` class. */
@@ -957,10 +925,10 @@ private module PrivateDjango {
957
925
module HttpResponseForbidden {
958
926
/** Gets a reference to the `django.http.response.HttpResponseForbidden` class. */
959
927
API:: Node baseClassRef ( ) {
960
- result = response_attr ( "HttpResponseForbidden" )
928
+ result = response ( ) . getMember ( "HttpResponseForbidden" )
961
929
or
962
930
// Handle `django.http.HttpResponseForbidden` alias
963
- result = http_attr ( "HttpResponseForbidden" )
931
+ result = http ( ) . getMember ( "HttpResponseForbidden" )
964
932
}
965
933
966
934
/** Gets a reference to the `django.http.response.HttpResponseForbidden` class. */
@@ -1011,10 +979,10 @@ private module PrivateDjango {
1011
979
module HttpResponseNotAllowed {
1012
980
/** Gets a reference to the `django.http.response.HttpResponseNotAllowed` class. */
1013
981
API:: Node baseClassRef ( ) {
1014
- result = response_attr ( "HttpResponseNotAllowed" )
982
+ result = response ( ) . getMember ( "HttpResponseNotAllowed" )
1015
983
or
1016
984
// Handle `django.http.HttpResponseNotAllowed` alias
1017
- result = http_attr ( "HttpResponseNotAllowed" )
985
+ result = http ( ) . getMember ( "HttpResponseNotAllowed" )
1018
986
}
1019
987
1020
988
/** Gets a reference to the `django.http.response.HttpResponseNotAllowed` class. */
@@ -1066,10 +1034,10 @@ private module PrivateDjango {
1066
1034
module HttpResponseGone {
1067
1035
/** Gets a reference to the `django.http.response.HttpResponseGone` class. */
1068
1036
API:: Node baseClassRef ( ) {
1069
- result = response_attr ( "HttpResponseGone" )
1037
+ result = response ( ) . getMember ( "HttpResponseGone" )
1070
1038
or
1071
1039
// Handle `django.http.HttpResponseGone` alias
1072
- result = http_attr ( "HttpResponseGone" )
1040
+ result = http ( ) . getMember ( "HttpResponseGone" )
1073
1041
}
1074
1042
1075
1043
/** Gets a reference to the `django.http.response.HttpResponseGone` class. */
@@ -1120,10 +1088,10 @@ private module PrivateDjango {
1120
1088
module HttpResponseServerError {
1121
1089
/** Gets a reference to the `django.http.response.HttpResponseServerError` class. */
1122
1090
API:: Node baseClassRef ( ) {
1123
- result = response_attr ( "HttpResponseServerError" )
1091
+ result = response ( ) . getMember ( "HttpResponseServerError" )
1124
1092
or
1125
1093
// Handle `django.http.HttpResponseServerError` alias
1126
- result = http_attr ( "HttpResponseServerError" )
1094
+ result = http ( ) . getMember ( "HttpResponseServerError" )
1127
1095
}
1128
1096
1129
1097
/** Gets a reference to the `django.http.response.HttpResponseServerError` class. */
@@ -1174,10 +1142,10 @@ private module PrivateDjango {
1174
1142
module JsonResponse {
1175
1143
/** Gets a reference to the `django.http.response.JsonResponse` class. */
1176
1144
API:: Node baseClassRef ( ) {
1177
- result = response_attr ( "JsonResponse" )
1145
+ result = response ( ) . getMember ( "JsonResponse" )
1178
1146
or
1179
1147
// Handle `django.http.JsonResponse` alias
1180
- result = http_attr ( "JsonResponse" )
1148
+ result = http ( ) . getMember ( "JsonResponse" )
1181
1149
}
1182
1150
1183
1151
/** Gets a reference to the `django.http.response.JsonResponse` class. */
@@ -1231,10 +1199,10 @@ private module PrivateDjango {
1231
1199
module StreamingHttpResponse {
1232
1200
/** Gets a reference to the `django.http.response.StreamingHttpResponse` class. */
1233
1201
API:: Node baseClassRef ( ) {
1234
- result = response_attr ( "StreamingHttpResponse" )
1202
+ result = response ( ) . getMember ( "StreamingHttpResponse" )
1235
1203
or
1236
1204
// Handle `django.http.StreamingHttpResponse` alias
1237
- result = http_attr ( "StreamingHttpResponse" )
1205
+ result = http ( ) . getMember ( "StreamingHttpResponse" )
1238
1206
}
1239
1207
1240
1208
/** Gets a reference to the `django.http.response.StreamingHttpResponse` class. */
@@ -1285,10 +1253,10 @@ private module PrivateDjango {
1285
1253
module FileResponse {
1286
1254
/** Gets a reference to the `django.http.response.FileResponse` class. */
1287
1255
API:: Node baseClassRef ( ) {
1288
- result = response_attr ( "FileResponse" )
1256
+ result = response ( ) . getMember ( "FileResponse" )
1289
1257
or
1290
1258
// Handle `django.http.FileResponse` alias
1291
- result = http_attr ( "FileResponse" )
1259
+ result = http ( ) . getMember ( "FileResponse" )
1292
1260
}
1293
1261
1294
1262
/** Gets a reference to the `django.http.response.FileResponse` class. */
@@ -1378,24 +1346,16 @@ private module PrivateDjango {
1378
1346
// django.shortcuts
1379
1347
// -------------------------------------------------------------------------
1380
1348
/** Gets a reference to the `django.shortcuts` module. */
1381
- API:: Node shortcuts ( ) { result = django_attr ( "shortcuts" ) }
1349
+ API:: Node shortcuts ( ) { result = django ( ) . getMember ( "shortcuts" ) }
1382
1350
1383
1351
/** Provides models for the `django.shortcuts` module */
1384
1352
module shortcuts {
1385
- /**
1386
- * Gets a reference to the attribute `attr_name` of the `django.shortcuts` module.
1387
- * WARNING: Only holds for a few predefined attributes.
1388
- */
1389
- private API:: Node shortcuts_attr ( string attr_name ) {
1390
- result = shortcuts ( ) .getMember ( attr_name )
1391
- }
1392
-
1393
1353
/**
1394
1354
* Gets a reference to the `django.shortcuts.redirect` function
1395
1355
*
1396
1356
* See https://docs.djangoproject.com/en/3.1/topics/http/shortcuts/#redirect
1397
1357
*/
1398
- API:: Node redirect ( ) { result = shortcuts_attr ( "redirect" ) }
1358
+ API:: Node redirect ( ) { result = shortcuts ( ) . getMember ( "redirect" ) }
1399
1359
}
1400
1360
}
1401
1361
0 commit comments