Problem with Django ‘Log out’ link in Admin

I got errors like the following while trying to logout of Django Admin:

ValueError at /admin/mymodels/mymodel/12/admin/logout/

invalid literal for int() with base 10: ‘12/admin/logout’

Request Method: GET
Request URL: http://127.0.0.1/admin/mymodels/mymodel/12/admin/logout/
Exception Type: ValueError
Exception Value:

invalid literal for int() with base 10: ‘12/admin/logout’

Turns out it’s bug listed here: http://code.djangoproject.com/ticket/10061

A temporary suggestion that works was made by carljm

In case it’s helpful to others: the simplest and least invasive temporary workaround is to just add this line in your urls.py:

admin.site.root_path = ‘/admin/’

If you run the admin at an alternate URL, just use the correct one here; if you run multiple admin instances, you can set the root_path for each one in the same way.

Tags:

2 Responses to “Problem with Django ‘Log out’ link in Admin”

  1. WALTER says:


    Pillspot.org. Canadian Health&Care.Special Internet Prices.Best quality drugs.No prescription online pharmacy. Low price pills. Order drugs online

    Buy:Viagra Super Force.Super Active ED Pack.Tramadol.Viagra Super Active+.Zithromax.VPXL.Cialis.Cialis Soft Tabs.Viagra Professional.Viagra.Propecia.Maxaman.Levitra.Cialis Super Active+.Soma.Viagra Soft Tabs.Cialis Professional….

  2. LAWRENCE says:


    Medicamentspot.com. Canadian Health&Care.Best quality drugs.No prescription online pharmacy.Special Internet Prices. High quality drugs. Order pills online

    Buy:Lipitor.Wellbutrin SR.Cozaar.Seroquel.Advair.Buspar.Zocor.Zetia.Nymphomax.SleepWell.Benicar.Lasix.Prozac.Lipothin.Amoxicillin.Female Pink Viagra.Acomplia.Aricept.Ventolin.Female Cialis….

Leave a Reply