that makes sence
so the answer to my question is: it would NOT be wise ;)
thanks
On 5/9/06, James Crasta <[EMAIL PROTECTED]> wrote:
>
> Wouldn't it be easy enough to support both strings and direct
> references to the views? The callable() function can check that
>
> The logic would be something
Wouldn't it be easy enough to support both strings and direct
references to the views? The callable() function can check that
The logic would be something like this:
if callable(viewfunc):
viewfunc()
else:
# resolve function using the older means.
or you could just check if viewfunc wa
I do like it a lot,especially when written like this:
@urlpattern('',r'^hello/$')
def my_view(request):
return HttpResponse('Hello world')
or
@simple_urlpattern( '','hello' )
def my_view(request):
return HttpResponse('Hello world')
Wiktor Sadowski
--~--~-~--~~--
+1 as well, seems more clear
I would like to see all the strings (eg INSTALLED_APPS) replaced by
the actual objects, but I am not sure whether its
a) wise
b) possible
On 5/7/06, Jason Davies <[EMAIL PROTECTED]> wrote:
>
> +1.
>
> Seems more consistent and Pythonic.
>
> Cheers,
> Jason
>
>
> >
>
+1.
Seems more consistent and Pythonic.
Cheers,
Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscri
+1
We already have to import models to use generic views,
then, for the sake of consistency, it seems normal to have to import
views as well.
Yes, keep objects as objects everywhere is possible.
--~--~-~--~~~---~--~~
You received this message because you are sub
> I'm thinking more and more that a nice, simple Django improvement
> would be to allow URLconfs to specify the view object itself, rather
> than a string representing the path to the view.
>...
Two small questions: Would the first positional argument to patterns()
just go away? Also, how would t
I'm thinking more and more that a nice, simple Django improvement
would be to allow URLconfs to specify the view object itself, rather
than a string representing the path to the view.
Old example:
urlpatterns = patterns('',
(r'^map/$', 'mysite.views.the_map'),
)
New example: