Todd,

If you are just trying to define a restful interface to your objects,
you might look at django-piston[1]

If you really want the Rails approach, you are going to be pretty
frustrated working with Django. The python equivalent of "convention
over configuration" is "explicit is better than implicit." The
following poem sums up Python's philosophy, which I think also
motivates Django:

The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!



[1] http://bitbucket.org/jespern/django-piston/wiki/Home

On Dec 3, 3:29 am, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Dec 3, 7:37 am, Todd Blanchard <tblanch...@mac.com> wrote:
>
> > I think you've kind of missed my point as there's not a view that can 
> > render any object - but rather the name of the view is in the url.
>
> > This is the url conf for a typical rails app.
>
> >   map.connect '', :controller => "public"
> >   # Install the default route as the lowest priority.
> >   map.connect ':controller/:action/:id.:format'
> >   map.connect ':controller/:action/:id'
>
> > That is the whole thing.  Controllers are analogous to applications in 
> > django, actions are like view functions, id is typically the primary key of 
> > the object being viewed.  format is new and could be .json, .xml, 
> > .html..... I don't really use it just now.
>
> > I see no reason ever to specify a more elaborate url.  I want the 
> > equivalent setup in my urls.py and then I never want to open that file 
> > again - relying entirely on naming convention rather than configuration.
>
> <snip>
>
> I really can't help thinking, based on this and some of your other
> messages, that Django isn't a good fit with the way you think. You
> might like to try another Python framework. Pylons might be better for
> you, as it uses Routes for its url despatch mechanism, and I believe
> that is quite close to the controller/action paradigm of Rails.
> --
> DR.

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to