hi,

when specifying view-functions in the urlconfs, you can either specify 
them by their name as a string, or by referencing them "pythonically" 
(importing them, and giving the urlconf the callable).

which is the "preferred" way?

i'm always using the "pythonic" way (import the view function, and give 
it to the urlconf), and assumed that this is the recommended way.

but what always worried me is that you still have to enter that 
"string-prefix", which is of course an empty-string in my case, but 
still, it's quite ugly there.

so i wondered whether the pythonic-way is really the preferred one.

so i went to check the django-documentation...

the documentation on the django-site:

http://www.djangoproject.com/documentation/tutorial03/#design-your-urls

uses the string-based syntax.

but the django-book:

http://www.djangobook.com/en/beta/chapter03/

uses the pythonic-syntax.

so:

1. which is the preferred way?
2. will django support both ways "forever"?
3. would it make sense to make the tutorial and the book more consistent 
  by using the same urlconf-style?

thanks,
gabor

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to