url(r'^(?P<slug_genre>[^/]+)/(?P<slug>[^/]+)/news/(?P<slug_item>[^/]+)$', views.GameNewsItem.as_view(), name="view_news_view")
get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
url(r’^:slug_genre/:slug/news/:slug_item$', views.GameNewsItem.as_view(), name="view_news_view")
--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/etPan.5386069d.57e4ccaf.406%40MacBook-Pro-dude.local.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/201405281953.35201.shai%40platonix.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAKFtT_0KEgdyusp%3DhSn0z361zp%3DQvsy0f3-AOgi0UncveNNdsQ%40mail.gmail.com.
surl('/year/<int4:year>/', 'year.view'), surl('/year/<int4:year>/<word:month>/', 'month.view’),
And surlex example/articles/<year:Y>/<slug:s>/(<page:#>/)
Surlex looks more user-friendly.
I think need to have a look for such libraries, make choose about patterns formatting and implement this right way into django.
Ruby rails way looks simplest of this two. Also we can check ror routing patterns and make choose.
What you think?
alex.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/83f9b1db-8585-4499-bcb7-b1fe160e8299%40googlegroups.com.
I'm in favour of introducing another URL resolver, as a simpler option not as a replacement. My motivation is not "because it's nicer", rather to lower the boundary to entry. The Regex syntax is difficult for beginners.
There are many competing options, those mentioned and also hurl (github.com/oinopion/hurl). There are probably more around.
At the moment, I'm unsure about which format is preferable, and I'd be more interested to see changes to Django to make it easier to change the URL resolving system, including reversal. Having a standards API documented which allows patterns/URL/resolve to be intermingled with analogues with different rules is a good idea. It's not quite a 'urlbackend' as I'd like different ones to work in the same project, but that's the idea. This would also make handling complex URL resolving concepts easier to do outside of Django (e.g. a ContinueResolving exception views can raise to try later patterns)
I'm not saying any of this is not currently possible - it is. But I'd prefer to introduce a stable, robust API and then look at exact implementations of format.
Marc
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/etPan.53861b7a.79a1deaa.406%40MacBook-Pro-dude.local.
I'm not saying any of this is not currently possible - it is. But I'd prefer to introduce a stable, robust API and then look at exact implementations of format.
--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAK8PqJFvwXw65BZ7jQEgGbiigv5AHDXsGd-4rDXUXBQq%2Bztx5Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMwjO1EBzJ2R35PN87MZUH%2BYWkm9e_3xT-Kbd6px_6tW4qkSrA%40mail.gmail.com.
IMHO, option C is too ugly, but option B is the most natural for a beginner to use, especially when used with a named group, see point 2.
Option A is more Pythonic than option A, but I like option C better.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/cc342e75-05bf-416b-822a-4c2eb3bbcb80%40googlegroups.com.
Sorry for the typo. I meant to say that I think option A is more Pythonic than option B.
I personally like the approach Marc suggested, which is introducing another URL resolver, rather than modifying the existing one.
Moayad
Sorry for the typo. I meant to say that I think option A is more Pythonic than option B.
No problem :)
I used function for possibility to support parameters filtering in future. Maybe to add macro name validation or pattern.
I personally like the approach Marc suggested, which is introducing another URL resolver, rather than modifying the existing one.
Very good idea too.
But will it make any overhead or problems i don’t know for now, because know django core not soo deep for now. Use it as primary framework only for about 6 months. But backends and pipelines style is very good i think anyway.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CA%2BxKnP-_TETH4odFH6-5GrZVZVNkAf2%3Dc%2BMqcBba_PAVhJBNZQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/97618885-FC3E-4160-801C-03325ABEA485%40polytechnique.org.