On 9/22/06, Ahmad Alhashemi <[EMAIL PROTECTED]> wrote:
>
> +1 on the idea.
>
> It is starting to make less and less sense to treat a GET and a POST
> the same way just because they use the same URL.
>
> I don't think the implementation is ugly, either. I can't see how it
> can be made cleaner, except for using constants instead of strings for
> GET, POST, ..etc. But then again, we are probably getting those as
> strings from the backends.
>
>
If these things can be done, so if it also can support some
decorators, for example:

from django.conf.urls.defaults import *

urlpatterns = patterns('',
    # Example:
    (r'^django_rest_urls/get/(?P<id>\d+)',
         {'decorator':['utils.user_need_to_admin']},
         'django_rest_urls.restful.views.get'),
    )

I don'et think carefully about the format, just an idea. So we don't
need to write the decorator in the view code, just write them in
urls.py. And I think it will be easier maintained.

-- 
I like python!
My Blog: http://www.donews.net/limodou
UliPad Site: http://wiki.woodpecker.org.cn/moin/UliPad
UliPad Maillist: http://groups.google.com/group/ulipad

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to