Re: url.py

2007-12-18 Thread mike

Marty...you de man!!

On Dec 18, 1:20 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote:
> It looks like you've configured the built-in admin at "/admin/", and
> you're defining your custom URLs *later* in the list of URL patterns.
> This means that the admin's URL configuration will see
> "/admin/display/12/" and assume it's supposed to route to its view for
> an app named "display" and a model named "12". This clearly doesn't
> exist, which is why you're getting that error.
>
> You have three options:
> * Change the URL you'd like "show_ticket" to use, so that it doesn't
> start with "/admin/"
> * Change the prefix you're using for the admin
> * Move your "show_ticket" pattern *above* the admin configuration, so
> that yours will be found before the admin's
>
> -Gul
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: url.py

2007-12-18 Thread Marty Alchin

It looks like you've configured the built-in admin at "/admin/", and
you're defining your custom URLs *later* in the list of URL patterns.
This means that the admin's URL configuration will see
"/admin/display/12/" and assume it's supposed to route to its view for
an app named "display" and a model named "12". This clearly doesn't
exist, which is why you're getting that error.

You have three options:
* Change the URL you'd like "show_ticket" to use, so that it doesn't
start with "/admin/"
* Change the prefix you're using for the admin
* Move your "show_ticket" pattern *above* the admin configuration, so
that yours will be found before the admin's

-Gul

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



Re: url.py parsing and mod_python, recurent problem.

2006-02-22 Thread Kenneth Gonsalves

On Wednesday 22 Feb 2006 1:33 pm, coulix wrote:
>  # Uncomment this for admin:
> (r'^admin/', include('django.contrib.admin.urls.admin')),
 (r'^mywebsite/admin/', include('django.contrib.admin.urls.admin')),
-- 
regards
kg

http://www.livejournal.com/users/lawgon
tally ho! http://avsap.org.in
ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!

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



Re: url.py parsing and mod_python, recurent problem.

2006-02-22 Thread [EMAIL PROTECTED]

here are the docs:
http://www.djangoproject.com/documentation/url_dispatch/

now, django always parsers urls from the root.  if thats not the case,
the easiest thing you could do is just match all r'^mywebsite/ to like,
myproject.suburls and then create the sub matches.

unfortunatly thats the way it works, django doesn't know what the
location path for apache is, it only knows the URL.

the other thing you could "possibly" do is remove the ^ which is
matching the begining of the extension.

coulix wrote:
> hi, i ll just describe a basic installation of django on apache and
> point the strang behavior.
>
> django version : 0.91
> Apache 2.0.54
> Mod_python 3.1
>
> +  create a django project "cefinban" in /home/greg/django/
> (django-admin.py startproject cefinban)
> +  initialise everythng add a fake app model, and activate the admin
> part (tutorial 1,2)
> +  edit httpd.conf from /etc/apache2, in my case under ubuntu i go for
> /etc/apache2/sites-enable/***
>
> #already there
> NameVirtualHost *
> 
> ServerAdmin [EMAIL PROTECTED]
> [...]
>
> # i add django conf
> 
> SetHandler python-program
> PythonHandler django.core.handlers.modpython
> PythonPath sys.path+[r'/home/greg/django']
> SetEnv DJANGO_SETTINGS_MODULE cefinban.settings
> PythonDebug On
> 
> 
>
> python path is correct it point to the parent folder " django "of my
> project cefinban.
>
> url.py :
>  # Uncomment this for admin:
> (r'^admin/', include('django.contrib.admin.urls.admin')),
>
> Now let's try access,
>
> http://192.168.1.13/mywebsite/admin/
> Request Method:   GET
> Request URL:  http://192.168.1.13/mywebsite/admin/
> Using the URLconf defined in cefinban.urls, Django tried these URL
> patterns, in this order:
>1. ^admin/
> The current URL, /mywebsite/admin/, didn't match any of these.
>
> http://192.168.1.13/mywebsite/
> Request Method:   GET
> Request URL:  http://192.168.1.13/mywebsite/
> Using the URLconf defined in cefinban.urls, Django tried these URL
> patterns, in this order:
>1. ^admin/
> The current URL, /mywebsite/, didn't match any of these.
>
> WHY ! does he try to match the url with /mywebsite/*** instead of just
> ***,
> so far i have been using
>
> (r'^mywebsite/admin/', include('django.contrib.admin.urls.admin')),
> to overcome it but i have to add mywebsite to all urls .. i am
> repeating myself :/
> 
> A clean solution will be greatly apreciated :),


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