3

\N                 @   s`   d dl mZ d dlmZ d dlmZ G dd deZG dd deZG dd	 d	eeZe Z	d
S )    )url)Application)	get_classc                   sH   e Zd ZdZeddZeddZeddZeddZ fdd	Z	  Z
S )
BaseCatalogueApplication	cataloguezcatalogue.viewsZProductDetailViewZCatalogueViewZProductCategoryViewzoffer.viewsZRangeDetailViewc          	      sd   t  j }|td| jj ddtd| jj ddtd| jj ddtd| jj d	dg7 }| j|S )
Nz^$index)namez'^(?P<product_slug>[\w-]*)_(?P<pk>\d+)/$detailz;^category/(?P<category_slug>[\w-]+(/[\w-]+)*)_(?P<pk>\d+)/$categoryz^ranges/(?P<slug>[\w-]+)/$range)	superget_urlsr   catalogue_viewas_viewdetail_viewcategory_view
range_viewpost_process_urls)selfurlpatterns)	__class__ 3/var/www/html/oscar2019/oscar/apps/catalogue/app.pyr      s    
z!BaseCatalogueApplication.get_urls)__name__
__module____qualname__r   r   r   r   r   r   r   __classcell__r   r   )r   r   r      s   



r   c                   s*   e Zd ZdZeddZ fddZ  ZS )ReviewsApplicationNzcatalogue.reviews.appapplicationc                s(   t  j }|td| jjg7 }| j|S )Nz6^(?P<product_slug>[\w-]*)_(?P<product_pk>\d+)/reviews/)r   r   r   reviews_appurlsr   )r   r   )r   r   r   r      s
    
zReviewsApplication.get_urls)r   r   r   r   r   r   r   r   r   r   )r   r   r      s   
r   c               @   s   e Zd ZdZdS )CatalogueApplicationz9
    Composite class combining Products with Reviews
    N)r   r   r   __doc__r   r   r   r   r!   (   s   r!   N)
django.conf.urlsr   oscar.core.applicationr   oscar.core.loadingr   r   r   r!   r   r   r   r   r   <module>   s   