urls.py for my application looks like this: urlpatterns = patterns('ms.masterstroy.views', (r'^(?P<title>[^/]+)$', 'page'), ... )
As i want to allow site editor to edit pages in convenient way without built-in django admin, i use request.GET parameters like "http:// localhost:8000/somepage?action=edit" and than process it in my views.py like this: def page(request, title): page = Page.objects.get(url_name=title) ... if 'action' in request.GET: action = request.GET['action'] if action == 'delete': target_name = request.GET.get('target', '') target_page = get_object_or_404(Page, url_name=target_name) target_page.delete() return http.HttpResponseRedirect('/') if action == 'edit': .... and so on... A lot of people from russian django group (http://groups.google.com/ group/django-russian/browse_thread/thread/678e725e12ccca46 - russian language) told me that it's very bad decision as im losing some important django advantages. What they talking about? I have no idea. I have clear and simple urls and my urls is much closer to REST princeiples then django admin site with all this "http://localhost:8000/admin/my_cms/page/4/delete/" wich is not REST at all. Btw, REST is kind of religion so you can follow it or you can not. I just dont want to have large trees of url-patterns in my urls.py and move all actions with my model in one view with a couple of "if action == ...: elseif action ==..." And i still can use url reversing in my templates like "{% url page 'pagename' %}?action=edit" So, what is the problem? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---