Thanks, rebus. When I added an other piece of information to the
information in your links, I got this to work.
In this case there will be a string, a username, in the url. I have
browsed the documentation and it mostly talks about digits. Then you
are supposed to put a d+ for instance in the url. Here I had to put a .
+.
In urls.py:
(r'^users/(?P<users_username>.+)/$', 'some.view'),
Logically, this should have been mentioned in the Url dispatcher
document in the documentation.
On Mar 12, 12:21 pm, rebus_ <[email protected]> wrote:
> On 12 March 2010 01:04, Robert <[email protected]> wrote:
>
>
>
> > There is a "Viewonsite" link when you edit a user in admin.
>
> > The link calls the url user/user_name but you have to make the url-
> >viewconfiguration yourself apparently.
>
> > I wonder if there is a "built-in" way to do this. I looked up an other
> > thread from 2006 that deals with the same question related to
> > "flatpages". The thread was started by Mary Adel. You may look it up
> > by searching with the keywords "Viewonsite".
>
> > It seems that the problem was solved by the recommendation:
>
> > "Put (r'^r/', include('django.conf.urls.shortcut')), in your URLConf.
> > "
>
> > This shortcut contains this line of code that seems to be on the right
> > track:
>
> > (r'^(?P<content_type_id>\d+)/(?P<object_id>\d+)/$',
> > 'defaults.shortcut'),
>
> > However django is not able to match this url.
>
> > Is this supposed to work?
>
> > Please advise.
>
> > Thanks.
>
> > Robert
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group
> > athttp://groups.google.com/group/django-users?hl=en.
>
> http://docs.djangoproject.com/en/dev/ref/models/instances/#get-absolu...http://docs.djangoproject.com/en/dev/ref/contrib/sites/#how-django-us...
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
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.