On 6/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Request URL: http://localhost:8000/biz/article/ > > Using the URLconf defined in mygration.urls, Django tried these URL > patterns, in this order: > > 1. ^admin/ > 2. ^entrys/ > 3. ^articles/ > 4. ^address/ > > The current URL, /biz/article/, didn't match a > > Am i doing something wrong in the naming of my urls regex.
I think you have misunderstood what the URLConf is trying to do. URLConf is essentially a dispatch mechanism. You provide a regular expression that matches a particular type of URL, and tell the URLConf which view should be displayed when a matching URL is found. If Django can't find a match, the 404 page is displayed, telling you the patterns that were tried. So, in your case, the URL /entrys/foo/bar would match entry 1 (r'^entrys/'), and be dispatched to mygration.biz.urls for further processing. You are requesting /biz/article as a URL, but none of your URLConf patterns match this URL. It doesn't matter if you're using generic views or custom, hand written views; the URLConf is just there to pass a url pattern to a particular view. So; if you want to match /biz/article, you need to define a top-level URLConf pattern that will match '/biz/article'. Alternatively, you need to request a URL starting with /admin, /entrys, /article, or /address. As for whether the URLs should be pluralized - thats entirely up to you. What do you want your URL space to look like? Do you want users to be able to visit http://mysite.com/entry/article, or http://mysite.com/entries/article? The decision is entirely yours - pick a URLConf pattern to suit. Yours, Russ Magee %-) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---