Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Should namespaces be used to clean up url names [RSS Feed]

#1 Jan. 15, 2011 19:23:08

Vitaly B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Should namespaces be used to clean up url names


The url docs talks about naming urls like this: myapp-comment, does it make
sense to do this still when we have namespaces? With a namespace we could do
myapp:comment this way the url name only describes the view and has
no reference to the application name that its in.

--
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
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 15, 2011 19:50:01

Mike R.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Should namespaces be used to clean up url names


On Saturday, January 15, 2011 11:23:02 am Vitaly Babiy wrote:
> The url docs talks about naming urls like this: myapp-comment, does it make
> sense to do this still when we have namespaces? With a namespace we could
> do myapp:comment this way the url name only describes the view and has no
> reference to the application name that its in.

Personally I don't use named urls that way, I give each a unique name that is
relevant to the view it's going to, like index, gallery-index, etc.... While
my naming convention may mimic the app-view that namespaces would use. It
doesn't have to be. The rule of thumb for me is "a unique name that fits the
purpose of url". But last time I used django, I had started to use namespaces
more than named urls.

Mike
--
Fights between cats and dogs are prohibited by statute in Barber, North
Carolina.

--
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
django-users+unsubscr...@googlegroups.com.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » Should namespaces be used to clean up url names [RSS Feed]

Board footer

Moderator control

Enjoy the 21st of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support