|
10 | 10 | admin.site.index_title = "Welcome to Game Deals Administration" |
11 | 11 |
|
12 | 12 | urlpatterns = [ |
13 | | - path('', include('deals.urls')), |
14 | | - re_path(r'^admin/flower/(?P<path>.*)$', config_views.FlowerProxyView.as_view(), name='admin_flower'), |
15 | | - path('admin/', include('common.urls')), # Common app admin API endpoints |
16 | | - path('select2/', include('django_select2.urls')), # Select2 autocomplete |
17 | | - path('admin/', admin.site.urls), |
18 | | - path('accounts/', include('allauth.urls')), # Django-allauth authentication URLs |
19 | | - path('i18n/', include('django.conf.urls.i18n')), # Language switching |
20 | | - path('tz_detect/', include('tz_detect.urls')), |
| 13 | + path("", include("deals.urls")), |
| 14 | + re_path( |
| 15 | + r"^admin/flower/(?P<path>.*)$", |
| 16 | + config_views.FlowerProxyView.as_view(), |
| 17 | + name="admin_flower", |
| 18 | + ), |
| 19 | + path("admin/", include("common.urls")), # Common app admin API endpoints |
| 20 | + path("select2/", include("django_select2.urls")), # Select2 autocomplete |
| 21 | + path("admin/", admin.site.urls), |
| 22 | + path("accounts/", include("allauth.urls")), # Django-allauth authentication URLs |
| 23 | + path("i18n/", include("django.conf.urls.i18n")), # Language switching |
| 24 | + path("tz_detect/", include("tz_detect.urls")), |
21 | 25 | ] |
22 | 26 |
|
23 | 27 | # Add test URLs for error pages in DEBUG mode |
24 | 28 | if settings.DEBUG: |
25 | 29 | urlpatterns += [ |
26 | | - path('test-404/', config_views.handler404, {'exception': Exception('Test 404')}, name='test_404'), |
27 | | - path('test-500/', config_views.handler500, name='test_500'), |
| 30 | + path( |
| 31 | + "test-404/", |
| 32 | + config_views.handler404, |
| 33 | + {"exception": Exception("Test 404")}, |
| 34 | + name="test_404", |
| 35 | + ), |
| 36 | + path("test-500/", config_views.handler500, name="test_500"), |
28 | 37 | ] |
29 | 38 | # Serve media files in development |
30 | 39 | urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) |
31 | 40 |
|
32 | 41 | # Custom error handlers (only work when DEBUG=False) |
33 | | -handler404 = 'config.views.handler404' |
34 | | -handler500 = 'config.views.handler500' |
| 42 | +handler404 = "config.views.handler404" |
| 43 | +handler500 = "config.views.handler500" |
0 commit comments