Skip to content Skip to sidebar Skip to footer

Django Nonrel - Can't Log Into Admin Panel On Development Server

Bit of a strange one. I've created a super user for django admin for my app, which is just a new django nonrel project with admin enabled. I try and access the /admin whilst runnin

Solution 1:

UPDATE - turn off the server, run python2.5 manage.py syncdb, and add a fresh superuser. Must already have included django.contrib.admin to INSTALLED_APPS

This is not at all the answer. Completely different symptoms. I will try to remember to post here when I figure it out.

Solution 2:

I have a workaround that is working in windows vista

#change the manage.py code to:if __name__ == "__main__":

 print"lets go...."

    execute_manager(settings)


    import os

    from google.appengine.tools import dev_appserver
    #from view.PresetsPage import DuplicatePresetGroupprint"flushing database ..."
    dev_appserver.TearDownStubs()

and run

python manage.py syncdb

after all you should be able to find the 'datastore' file on your disk.


in views.py add:

def stopAll (request):
    import os
    if os.environ.get('SERVER_SOFTWARE','').startswith('Development'):
        from google.appengine.tools import dev_appserver

        dev_appserver.TearDownStubs()
    return HttpResponse("completed !")

and and the corresponding entry in urls.py file.

(r'^stop/$', stopAll),

enter the

localhost:8080/stop/ 

each time you want to flush the datastore to file

Post a Comment for "Django Nonrel - Can't Log Into Admin Panel On Development Server"