Web X.Y

Tips and tricks for development with Java, Python, Django, the Google Web Toolkit, and Linux.

Django: “newforms-admin: root() takes exactly 3 arguments (2 given)” December 4, 2008

Filed under: Django — adambossy @ 5:50 pm
Tags: , , , ,

Continued from urls problem.

Regex groups, named groups:

http://www.mail-archive.com/django-users@googlegroups.com/msg54489.html

Yes there is. You can use regex groups:

(r'^admin/(.*)', site1.root),

The string that matches .* will be passed as an extra arg.

Or named groups:

(r'^admin/(?P<url>.*)', site1.root),

Additionaly, you can pass extra args:
http://www.djangoproject.com/documentation/url_dispatch/#passing-extra-options-to-view-functions

Juanjo
Advertisement
 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.