On 15 Dec 2005, at 3:15, Adrian Holovaty wrote:

    /admin/myproject/blog/entry/add/

+1, most readable, most compact, most guessable.

The problem with "/admin/myproject.blog.models.entry/", though, is I'm
not sure it's possible to get the Python path *to* an object. For
example, given a model Entry, how do we get the string
"myproject.blog.models.entry"?

obj.__module__ + "." + obj.__class__.__name__

Another solution could be "/admin/blog/entry/", where "blog" is the
app name (blog/models.py) and "entry" is a lowercased version of the
model class name. The disadvantage of this is (obviously) the app
namespace is only one-level deep. Granted, these disadvantages have
been present in the old system and haven't bitten us.

As Django matures and more apps arrive, namespace clashes are going to becoming more likely, I think it's important to build namespace scope in now. I fully support making everything namespaced to the project and the app.

________________________________
Afternoon, man about the Internet -- http://aftnn.org/


Reply via email to