[Answered ]-Django Nonrel – Can't log into Admin Panel on development server

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.

1👍

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 DuplicatePresetGroup
    print "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

👤au1

Leave a comment