示例#1
0
def ads_urlpatterns(AdModel, AdSearchModel, AdSearchResultModel, AdForm, AdSearchView):
    urlpatterns = patterns('',
        url(r'^(?P<slug>[-\w]+)$', AdDetailView.as_view(model=AdModel, contact_form=HomeContactForm), name="view"),
        url(r'^search/$', AdSearchView.as_view(model=AdModel), name='search'),
        url(r'^search/(?P<search_id>\d+)/$', AdSearchView.as_view(), name='search'),
        url(r'^delete_search/(?P<pk>\d+)$', AdSearchDeleteView.as_view(model=AdSearchModel), name='delete_search'),
        url(r'^edit_search/(?P<pk>\d+)$', AdSearchUpdateView.as_view(model=AdSearchModel, form_class=CustomAdSearchUpdateForm), name="update_search"),
        url(r'^add/$', AdCreateView.as_view(model=AdModel, form_class=AdForm, ad_picture_form=PrettyAdPictureForm), name='add'),
        url(r'^add/complete/$', CompleteView.as_view(), name='complete'),
        url(r'^(?P<pk>\d+)/edit$', ModeratedAdUpdateView.as_view(model=AdModel, form_class=AdForm, ad_picture_form=PrettyAdPictureForm), name='edit'),
        url(r'^(?P<pk>\d+)/delete$', CustomAdDeleteView.as_view(model=AdModel), name='delete'),
        url(r'^contact_buyers/(?P<pk>\d+)$', AdPotentialBuyersView.as_view(model=AdModel, search_model=AdSearchResultModel), name="contact_buyers"),
        url(r'^contact_buyer/(?P<adsearchresult_id>\d+)$', AdPotentialBuyerContactView.as_view(model_class=AdSearchResultModel), name="contact_buyer"),
    )
    return urlpatterns
示例#2
0
def ads_urlpatterns(AdModel, AdSearchModel, AdSearchResultModel, AdForm,
                    AdSearchView):
    urlpatterns = patterns(
        '',
        url(r'^(?P<slug>[-\w]+)$',
            AdDetailView.as_view(model=AdModel, contact_form=HomeContactForm),
            name="view"),
        url(r'^search/$', AdSearchView.as_view(model=AdModel), name='search'),
        url(r'^search/(?P<search_id>\d+)/$',
            AdSearchView.as_view(),
            name='search'),
        url(r'^delete_search/(?P<pk>\d+)$',
            AdSearchDeleteView.as_view(model=AdSearchModel),
            name='delete_search'),
        url(r'^edit_search/(?P<pk>\d+)$',
            AdSearchUpdateView.as_view(model=AdSearchModel,
                                       form_class=CustomAdSearchUpdateForm),
            name="update_search"),
        url(r'^add/$',
            AdCreateView.as_view(model=AdModel,
                                 form_class=AdForm,
                                 ad_picture_form=PrettyAdPictureForm),
            name='add'),
        url(r'^add/complete/$', CompleteView.as_view(), name='complete'),
        url(r'^(?P<pk>\d+)/edit$',
            ModeratedAdUpdateView.as_view(model=AdModel,
                                          form_class=AdForm,
                                          ad_picture_form=PrettyAdPictureForm),
            name='edit'),
        url(r'^(?P<pk>\d+)/delete$',
            CustomAdDeleteView.as_view(model=AdModel),
            name='delete'),
        url(r'^contact_buyers/(?P<pk>\d+)$',
            AdPotentialBuyersView.as_view(model=AdModel,
                                          search_model=AdSearchResultModel),
            name="contact_buyers"),
        url(r'^contact_buyer/(?P<adsearchresult_id>\d+)$',
            AdPotentialBuyerContactView.as_view(
                model_class=AdSearchResultModel),
            name="contact_buyer"),
    )
    return urlpatterns
    CompleteView,
    AdPotentialBuyersView,
    AdPotentialBuyerContactView,
)

from sites.louersanscom.ads.models import HomeForRentAd, HomeForRentAdSearch, HomeForRentAdSearchResult
from sites.louersanscom.ads.forms import HomeForRentAdForm
from sites.louersanscom.ads.views import HomeForRentAdSearchView

from utils.views import ModeratedAdUpdateView, CustomAdDeleteView
from utils.forms import PrettyAdPictureForm
from homeads.forms import HomeContactForm

urlpatterns = patterns(
    "",
    url(r"^(?P<slug>[-\w]+)$", AdDetailView.as_view(model=HomeForRentAd, contact_form=HomeContactForm), name="view"),
    url(r"^search/$", HomeForRentAdSearchView.as_view(), name="search"),
    url(r"^search/(?P<search_id>\d+)/$", HomeForRentAdSearchView.as_view(), name="search"),
    url(r"^delete_search/(?P<pk>\d+)$", AdSearchDeleteView.as_view(model=HomeForRentAdSearch), name="delete_search"),
    url(r"^edit_search/(?P<pk>\d+)$", AdSearchUpdateView.as_view(model=HomeForRentAdSearch), name="update_search"),
    url(
        r"^add/$",
        AdCreateView.as_view(model=HomeForRentAd, form_class=HomeForRentAdForm, ad_picture_form=PrettyAdPictureForm),
        name="add",
    ),
    url(r"^add/complete/$", CompleteView.as_view(), name="complete"),
    url(
        r"^(?P<pk>\d+)/edit$",
        ModeratedAdUpdateView.as_view(
            model=HomeForRentAd, form_class=HomeForRentAdForm, ad_picture_form=PrettyAdPictureForm
        ),
示例#4
0
from django.conf.urls.defaults import patterns, url
from geoads.views import (AdDetailView, AdSearchUpdateView,
                          AdPotentialBuyerContactView, AdSearchDeleteView,
                          AdCreateView, CompleteView, AdPotentialBuyersView)
from sites.achetersanscom.ads.models import HomeForSaleAd, HomeForSaleAdSearch, HomeForSaleAdSearchResult
from sites.achetersanscom.ads.forms import HomeForSaleAdForm
from sites.achetersanscom.ads.views import HomeForSaleAdSearchView

from utils.views import ModeratedAdUpdateView, CustomAdDeleteView
from utils.forms import PrettyAdPictureForm
from homeads.forms import HomeContactForm

urlpatterns = patterns(
    '',
    url(r'^(?P<slug>[-\w]+)$',
        AdDetailView.as_view(model=HomeForSaleAd,
                             contact_form=HomeContactForm),
        name="view"),
    url(r'^search/$', HomeForSaleAdSearchView.as_view(), name='search'),
    url(r'^search/(?P<search_id>\d+)/$',
        HomeForSaleAdSearchView.as_view(),
        name='search'),
    url(r'^delete_search/(?P<pk>\d+)$',
        AdSearchDeleteView.as_view(model=HomeForSaleAdSearch),
        name='delete_search'),
    url(r'^edit_search/(?P<pk>\d+)$',
        AdSearchUpdateView.as_view(model=HomeForSaleAdSearch),
        name="update_search"),
    url(r'^add/$',
        AdCreateView.as_view(model=HomeForSaleAd,
                             form_class=HomeForSaleAdForm,
                             ad_picture_form=PrettyAdPictureForm),
示例#5
0
文件: urls.py 项目: wd5/django-geoads
from django.conf.urls.defaults import patterns, url
from geoads.views import (AdSearchView, AdDetailView, AdSearchDeleteView,
    AdCreateView,  AdUpdateView, CompleteView, AdDeleteView)
from example_project.customads.models import TestAd
from example_project.customads.forms import TestAdForm
# this import below, unused, is to instantiate the filter with metaclass and set the model filterset var
from example_project.customads.filtersets import TestAdFilterSet
# may be line below could be placed in an __init__.py file somewhere in an app


urlpatterns = patterns('',
    url(r'^(?P<slug>[-\w]+)$', AdDetailView.as_view(model=TestAd), name="view"),
    url(r'^search/$', AdSearchView.as_view(model=TestAd), name='search'),
    url(r'^search/(?P<search_id>\d+)/$', AdSearchView.as_view(model=TestAd), name='search'),
    url(r'^delete_search/(?P<pk>\d+)$', AdSearchDeleteView.as_view(), name='delete_search'),
    url(r'^add/$', AdCreateView.as_view(model=TestAd, form_class=TestAdForm), name='add'),
    url(r'^add/complete/$', CompleteView.as_view(), name='complete'),
    url(r'^(?P<pk>\d+)/edit$', AdUpdateView.as_view(model=TestAd, form_class=TestAdForm), name='edit'),
    url(r'^(?P<pk>\d+)/delete$', AdDeleteView.as_view(model=TestAd), name='delete'),
)
示例#6
0
from django.conf.urls import patterns, url
from geoads.views import (AdSearchView, AdDetailView, AdSearchDeleteView,
                          AdCreateView,  AdUpdateView, CompleteView, AdDeleteView, 
                          AdPotentialBuyersView, AdPotentialBuyerContactView)
from geoads.models import AdSearchResult
from tests.customads.models import TestAd
from tests.customads.forms import TestAdForm
# this import below, unused, is to instantiate the filter with metaclass and set the model filterset var
from tests.customads.filtersets import TestAdFilterSet

from moderation.helpers import auto_discover
auto_discover()


urlpatterns = patterns('',
    url(r'^(?P<slug>[-\w]+)$', AdDetailView.as_view(model=TestAd), name="view"),
    url(r'^search/$', AdSearchView.as_view(model=TestAd), name='search'),
    url(r'^search/(?P<search_id>\d+)/$', AdSearchView.as_view(model=TestAd), name='search'),
    url(r'^delete_search/(?P<pk>\d+)$', AdSearchDeleteView.as_view(), name='delete_search'),
    url(r'^add/$', AdCreateView.as_view(model=TestAd, form_class=TestAdForm), name='add'),
    url(r'^add/complete/$', CompleteView.as_view(), name='complete'),
    url(r'^(?P<pk>\d+)/edit$', AdUpdateView.as_view(model=TestAd, form_class=TestAdForm), name='edit'),
    url(r'^(?P<pk>\d+)/delete$', AdDeleteView.as_view(model=TestAd), name='delete'),
    url(r'^contact_buyers/(?P<pk>\d+)$', AdPotentialBuyersView.as_view(model=TestAd), name="contact_buyers"),
    url(r'^contact_buyer/(?P<adsearchresult_id>\d+)$', AdPotentialBuyerContactView.as_view(), name="contact_buyer"),
)
"""
AcheterSansCom urls.py

"""
from django.conf.urls.defaults import patterns, url
from geoads.views import (AdDetailView, AdSearchUpdateView, AdPotentialBuyerContactView, AdSearchDeleteView, AdCreateView, CompleteView, AdPotentialBuyersView)
from sites.achetersanscom.ads.models import HomeForSaleAd, HomeForSaleAdSearch, HomeForSaleAdSearchResult
from sites.achetersanscom.ads.forms import HomeForSaleAdForm
from sites.achetersanscom.ads.views import HomeForSaleAdSearchView

from utils.views import ModeratedAdUpdateView, CustomAdDeleteView
from utils.forms import PrettyAdPictureForm
from homeads.forms import HomeContactForm


urlpatterns = patterns('',
    url(r'^(?P<slug>[-\w]+)$', AdDetailView.as_view(model=HomeForSaleAd, contact_form=HomeContactForm), name="view"),
    url(r'^search/$', HomeForSaleAdSearchView.as_view(), name='search'),
    url(r'^search/(?P<search_id>\d+)/$', HomeForSaleAdSearchView.as_view(), name='search'),
    url(r'^delete_search/(?P<pk>\d+)$', AdSearchDeleteView.as_view(model=HomeForSaleAdSearch), name='delete_search'),
    url(r'^edit_search/(?P<pk>\d+)$', AdSearchUpdateView.as_view(model=HomeForSaleAdSearch), name="update_search"),
    url(r'^add/$', AdCreateView.as_view(model=HomeForSaleAd, form_class=HomeForSaleAdForm, ad_picture_form=PrettyAdPictureForm), name='add'),
    url(r'^add/complete/$', CompleteView.as_view(), name='complete'),
    url(r'^(?P<pk>\d+)/edit$', ModeratedAdUpdateView.as_view(model=HomeForSaleAd, form_class=HomeForSaleAdForm, ad_picture_form=PrettyAdPictureForm), name='edit'),
    url(r'^(?P<pk>\d+)/delete$', CustomAdDeleteView.as_view(model=HomeForSaleAd), name='delete'),
    url(r'^contact_buyers/(?P<pk>\d+)$', AdPotentialBuyersView.as_view(model=HomeForSaleAd, search_model=HomeForSaleAdSearchResult), name="contact_buyers"),
    url(r'^contact_buyer/(?P<adsearchresult_id>\d+)$', AdPotentialBuyerContactView.as_view(), name="contact_buyer"),
)