Re: Sick of defining urls

2009-12-04 Thread bruno desthuilliers
On 4 déc, 18:46, Todd Blanchard wrote: > First, thanks for the critiques - I'm not surprised there are better ways to > write this as I'm just learning python. Thanks _you_ for taking the critiques as they were intented !-) > Second, url mapping for me is trivial.  Its a web app, not a web site

Re: Sick of defining urls

2009-12-04 Thread Todd Blanchard
First, thanks for the critiques - I'm not surprised there are better ways to write this as I'm just learning python. Second, url mapping for me is trivial. Its a web app, not a web site. I would be fairly happy with totally opaque urls ala seaside as long as I didn't have to think about them.

Re: Sick of defining urls

2009-12-04 Thread David De La Harpe Golden
Todd Blanchard wrote: > > I've solved my urls problem for now (though I'm open to more > elegant solutions) Depends what you're doing, but if what you're doing fits into its "chained views" convention, django-catalyst will also autogen relevant urls for you - http://code.google.com/p/django-cata

Re: Sick of defining urls

2009-12-04 Thread bruno desthuilliers
On 3 déc, 08:37, Todd Blanchard wrote: (snip) > A couple observations if you don't mind: > urlpatterns += patterns('', >     > (r'^(?P[^/]+)/(?P[^/]+)/(?P[^/]+)\.(?P[^/]+)',dispatch_request), >     (r'^(?P[^/]+)/(?P[^/]+)/(?P[^/]+)',dispatch_request), >     (r'^(?P[^/]+)/(?P[^/]+)\.(?P[^/]+)',

Re: Sick of defining urls

2009-12-03 Thread Jaime Buelta
Well, if you disagree strongly with the Zen of Python maybe using Python is going to be a pain in the ass! :-D Every language has it's own phylosofy and ways to work. If your way to look at it is more "against", it comes awful. I know that. I HAVE TO use Grails (BTW, convention over configuration)

Re: Sick of defining urls

2009-12-03 Thread Christophe Pettus
On Dec 3, 2009, at 8:42 AM, Todd Blanchard wrote: > I don't see that as a feature, its a pointless time drain. Is writing URL patterns really that big of a time sink? Just off the top of my head, I've probably spent more time fiddling with comment balancing than working on URL patterns. If

Re: Sick of defining urls

2009-12-03 Thread Juan Hernandez
c'mon! is regular expressions! if that bothers you, just do a regex that woud take anything and through a smart view, define everything On Thu, Dec 3, 2009 at 3:51 PM, Max Battcher wrote: > Todd Blanchard wrote: > > settings.py has a list of applications to include (INSTALLED_APPS). > > Fine.

Re: Sick of defining urls

2009-12-03 Thread Max Battcher
Todd Blanchard wrote: > settings.py has a list of applications to include (INSTALLED_APPS). > Fine. But then, in urls.py I have to repeat myself by importing each > application's urls.py to add them. (r'^admin/', include(admin.urls)), > > And then I have to fiddle the template path so the

Re: Sick of defining urls

2009-12-03 Thread Todd Blanchard
Oh, I've already come to terms with that. So long as XCode makes indenting easy I'm OK. :-) On Dec 3, 2009, at 11:19 AM, Alex Robbins wrote: > If you start to complain about significant whitespace too, you aren't > welcome to stay either. :) -- You received this message because you are subscr

Re: Sick of defining urls

2009-12-03 Thread Alex Robbins
>You are welcomed to disagree with it, all of us hackers view things >differently. >That said, understanding what Tim is saying will help you understand Python and >the people who use it. Most of us agree with most of Tim's points. I believe >this >was mentioned not to tell you to walk away. Exa

Re: Sick of defining urls

2009-12-03 Thread Todd Blanchard
I'm quite aware how the amazon browse service works. I also know it takes a whole team of people to manage it. I'm one guy. :-) On Dec 3, 2009, at 10:31 AM, Sean Perry wrote: > Here is the page on Amazon for Learning Python: -- You received this message because you are subscribed to the Goog

Re: Sick of defining urls

2009-12-03 Thread Javier Guerra
On Thu, Dec 3, 2009 at 1:30 PM, Todd Blanchard wrote: > Not sure what you mean?  You mean something that looks through the code and > generates/expands urls for the view methods it finds? not exactly, just something like i wrote before: a small function that takes a list of views and constructs t

Re: Sick of defining urls

2009-12-03 Thread Sean Perry
On Thu Dec 3 8:42 , Todd Blanchard sent: > >I've read the little poem. I disagree with about half of it. If you can't >take constructive criticism of your toolkit (I have plenty negative to say about rails and any of the other dozen web app development environments I know too) then you sh

Re: Sick of defining urls

2009-12-03 Thread Todd Blanchard
Not sure what you mean? You mean something that looks through the code and generates/expands urls for the view methods it finds? I don't see the point of that exactly. The dynamic dispatch I'm doing does the same thing and I prefer dynamic dispatch to code generation (I abhor code generation)

Re: Sick of defining urls

2009-12-03 Thread Javier Guerra
On Thu, Dec 3, 2009 at 11:42 AM, Todd Blanchard wrote: > Django has several superior features to rails that drive me to use it.  The > admin is much better than active scaffold, there are a number of already > written apps, geodjango postgis integration, scalability, etc. > > That doesn't me

Re: Sick of defining urls

2009-12-03 Thread Todd Blanchard
On Dec 3, 2009, at 6:34 AM, Javier Guerra wrote: > first of all, if you want Rails, you know where to find it. i (and > several others, i guess) like Django in part because it's *not* Rails. > :-) Django has several superior features to rails that drive me to use it. The admin is much better t

Re: Sick of defining urls

2009-12-03 Thread Alex Robbins
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 imp

Re: Sick of defining urls

2009-12-03 Thread Javier Guerra
On Thu, Dec 3, 2009 at 2:37 AM, Todd Blanchard 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. my 2 cents: first of all, if you want Rails, you know where to find it. i (and several others, i gue

Re: Sick of defining urls

2009-12-03 Thread Daniel Roseman
On Dec 3, 7:37 am, Todd Blanchard 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 d

Re: Sick of defining urls

2009-12-02 Thread Todd Blanchard
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.con

Re: Sick of defining urls

2009-11-25 Thread Tim Valenta
I usually don't find myself writing too many redundant views, since the built-in admin site does so much of that automatically. Then I just build views specific to the site's public UI. I still find it curious that you would find yourself recreating said urls. I run a company database through th

Sick of defining urls

2009-11-25 Thread Todd Blanchard
It is mostly a waste of time and busy work. I like the rails strategy of /controller/action/id I'd like to define a similar one time couple rules in urls.py Something like /application/view/id where view is the name of the function in the views.py in that application. Anybody got a little snip