Commits

Olexiy Strashko  committed a517f8f

Remove 404 & 500 debug code

  • Participants
  • Parent commits 147dc37

Comments (0)

Files changed (2)

File source/apps/main/views.py

     def get_context_data(self, **kwargs):
         data = super(HomeView, self).get_context_data(**kwargs)
         data["current_page"] = "home"
-#        asdasd
         return data
 
 home_view = HomeView.as_view()

File source/urls.py

 
 
 # Adding debug-mappings
-#if settings.DEBUG:
-settings.DEBUG = True
-from django.conf.urls.static import static
-urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
-urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
-settings.DEBUG = False
+if settings.DEBUG:
+    from django.conf.urls.static import static
+    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
+    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
+
 # Unregister
 #from django.contrib.auth.models import User, Group
 #admin.site.unregister(User)