Problem with admin site

22 views
Skip to first unread message

kolo1

unread,
Mar 3, 2021, 9:11:59 AM3/3/21
to Django users
Hey
I've made some project with couples apps and now I'd like to manage by admin site but when I try to open localhost:8000/admin I get error
"""
TypeError at /admin/'tuple' object is not a mappingRequest Method:
GETRequest URL: http://localhost:8000/admin/
Django Version: 3.1.6Exception Type:
TypeErrorException Value: 'tuple' object is not a mappingException 
Location:/usr/lib/python3.9/site-packages/django/urls/resolvers.py, line 486, in _populate
Python Executable:/usr/bin/python3Python 
Version: 3.9.1
"""
I can't find the problem? 
My urls.py
"""
from django.contrib import admin
from django.urls import include,path


urlpatterns = [
    path('admin/', admin.site.urls),
    path('', include('main.urls')),
    path('raporty/', include('raporty.urls')), 
    path('settings/', include('settings.urls'))    

]
"""

Mr. X Offencer

unread,
Mar 3, 2021, 11:11:43 AM3/3/21
to django...@googlegroups.com
Show your model.py

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c64b8f71-35a7-4fb9-b902-93082aab64f7n%40googlegroups.com.

kolo1

unread,
Mar 3, 2021, 11:50:57 AM3/3/21
to Django users
Re: Problem with admin siteThanx for your replay. I found my mistake. I have incorrectly implemented the qrcode software in urls.py in two applications in my project. 
I have:
path('pdf_page', lost.home, include('qr_code.urls', namespace="qr_code"), name='pdf_page')
change to:
path('pdf_page', include('qr_code.urls', namespace="qr_code"))
For some reason everything was working with my err path only admin site not (why?). After change path seems everything works fine.

Reply all
Reply to author
Forward
0 new messages