Brian Rosner wrote: > Hi Norman, > > On Jun 17, 2008, at 3:49 PM, Norman Harman wrote: > >> I want to use {% url %} to point into portions of the admin site(and >> change the default url structure). I hacked this generally >> unfullfilling but working version with old admin. > > > This is not yet supported in the newforms-admin branch. See ticket > #6470 [1]. At this point your best bet is to hardcode the URLs. > > [1]:http://code.djangoproject.com/ticket/6470
Actually, I figured out this workaround. Which I call "not pretty, but mostly works". # tie into django user mgmnt user = kwargs=dict(app_label="auth", model_name="user") group = kwargs=dict(app_label="auth", model_name="group") urlpatterns += patterns("", url(r"^auth/user/$", admin.site.root, {"url":"auth/user/"}, name="dj_user"), url(r"^auth/user/add/$", admin.site.root, {"url":"auth/user/add/"}, name="dj_user_add"), url(r"^auth/user/(?P<rest_of_url>[^/]+)/$", admin.site.model_page, kwargs=user, name="dj_user_edit"), url(r"^auth/user/(?P<rest_of_url>[^/]+/password)/$", admin.site.model_page, kwargs=user, name="dj_user_passwordchange"), # "catch" other urls we don't care to name (r"^(auth/.*)$", admin.site.root), ) Has problems with deep linking cause self.root_path = re.sub(re.escape(url) + '$', '', request.path) is only in def root(...) and not in def model_page(...) or constructor or something. -- Norman J. Harman Jr. Senior Web Specialist, Austin American-Statesman ___________________________________________________________________________ You've got fun! Check out Austin360.com for all the entertainment info you need to live it up in the big city! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---