django admin site and debug

921 views
Skip to first unread message

Yasmany Cubela Medina

unread,
May 3, 2011, 10:00:29 PM5/3/11
to django...@googlegroups.com

i have the django admin site enabled and it work at perfect with debug flag set to true, but when i change to false throwme the page not found template in the edit pages of any module in the admin interface.


any help


----------------------------------------------------------------------------------------

El ayer es un recuerdo, el mañana es un misterio y el ahora es un regalo...por eso se llama presente.


Ing. Yasmany Cubela Medina:

Linux user 446757

Ubuntu user 13464

vikalp sahni

unread,
May 4, 2011, 1:19:59 AM5/4/11
to django...@googlegroups.com
are you using it on any webserver or on django management server (manage.py runserver) at some port??

it can happen if in any of your urls.py you have mentioned something specefic to DEBUG variable. But its quite a strage behaviour.

more inputs on your installation or how you are running will be able to put more light on it.

Also just check if its 404 or 500 error when you put debug false.

Regards,
//Vikalp

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

492587

unread,
May 4, 2011, 6:27:13 AM5/4/11
to Django users


Check your admin.autodiscover () in urls.py it should be after all
models import

bitgandtter

unread,
May 4, 2011, 9:38:41 AM5/4/11
to Django users
its really rear this error the aplication its runing in mod_python in
a shared web hosting python 2.5.1 and work perfect the only thing is
that when i change the DEBUG flag to false the administration
interface keep working and autenticate all fine but throwme the 404
error when i try to access the pages that admin my tables.

my urlconf look like this

from django.conf.urls.defaults import patterns, include

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns( '',
( r'^admin/', include( admin.site.urls ) ),
( r'', include( 'role.company.urls' ) ),
)

and in the role.company.urls i dont put anything about debug or url
that can override the admin ones

Ivan

unread,
May 4, 2011, 3:01:49 PM5/4/11
to Django users
Try to replace your patern '^admin/' this '^admin/$', or swap
( r'^admin/', include( admin.site.urls ) )
and ( r'', include( 'role.company.urls' ) )

bitgandtter

unread,
May 9, 2011, 9:54:06 AM5/9/11
to Django users
i try your advices but didnt work i dont know why because the admin
pattern should handle this urls
Reply all
Reply to author
Forward
0 new messages