Django: when trying domain.com/admin gives 404 with an old unexisting urls file

后端 未结 1 1347
小鲜肉
小鲜肉 2020-12-22 10:23

I had at some point an urls file that looked like that:

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscov         


        
1条回答
  •  既然无缘
    2020-12-22 10:41

    Just a shot in the dark:

    Did you add the admin in your INSTALLED_APPS, do a syncdb and restarted the server ?

    Restarting the server is useful if you use Apache with mod_wsgi. It does not detect the changes in the code so you need to reload it manually.

    The development server reloads code automatically.

    Here is the complete information about this issue : http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode

    0 讨论(0)
提交回复
热议问题