How to get to a class model field through a ManyToMany field in another class

2015-08-10 Thread Александр Мусаров
I'm having two model classes Product and Category, on the one hand the Product class has a ManyToMany field ( product_categories ) which lists all the categories, a product instance may belong to, on the other hand the Category class has the category_slug field. The question is - is there any

Re: problem with get_absolute_url()

2015-08-10 Thread Александр Мусаров
THANX A LOT -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googleg

Re: problem with get_absolute_url()

2015-08-09 Thread Александр Мусаров
), суббота, 8 августа 2015 г., 0:03:40 UTC+3 пользователь James Schneider написал: > > You don't have a URL named 'catalog_product'. Check your URL's, it looks > like you are passing an arg and a kwarg to the second pattern. > > -James > On Aug 7, 2

Re: problem with get_absolute_url()

2015-08-07 Thread Александр Мусаров
27;product_slug': self.product_slug}) пятница, 7 августа 2015 г., 21:15:25 UTC+3 пользователь Александр Мусаров написал: > > Hi, just wrapping my head around django, and trying to write an ecommerce > store, when trying to pull out all products belonging to a category getting > suc

problem with get_absolute_url()

2015-08-07 Thread Александр Мусаров
Hi, just wrapping my head around django, and trying to write an ecommerce store, when trying to pull out all products belonging to a category getting such an error NoReverseMatch at /catalog/smartphony/ Reverse for 'catalog_product' with arguments '()' and keyword arguments '{'product_slug':

Re: Getting a PageNotFound 404 Error

2015-07-29 Thread Александр Мусаров
Thanks a lot!!! Damned regexes... среда, 29 июля 2015 г., 19:56:46 UTC+3 пользователь James Schneider написал: > > Instead of /w you should use \w in your URL regex, right now all you are > matching is literally - and / and w... > > -James > On Jul 29, 2015 9:52 AM, "Алек

Getting a PageNotFound 404 Error

2015-07-29 Thread Александр Мусаров
Hi, folks! I'm new to Django, now I'm writing my first e-commerce in it, and now I'm having a mistake that I can not find in code myself. Please help me.. The code is the following: The trouble URL code line : url(r'^(?P[-/w]+)/$', views.category, name = 'category_detail'), The view code :