Exemplo n.º 1
0
#     url(r"", include("idios.urls_base")),
#     url(r"^(?P<profile_slug>[\w\._-]+)/", include("idios.urls_base")),
# )

from django.conf.urls.defaults import *
from idios.views import ProfileListView, ProfileDetailView, ProfileUpdateView

# for squad.xml and squad.dtd generation - took view code from idios.views
from django.views.generic.detail import DetailView
from itwishlist.apps.profiles.views import SquadXMLView
from itwishlist.apps.profiles.models import Profile
from django.views.generic.simple import direct_to_template

urlpatterns = patterns("idios.views",
    
    # disabling ability to view list of all user profiles
    url(r"^$", ProfileListView.as_view(all_profiles=True), name="profile_list_all"),
    
    # url(r"^(?P<profile_slug>[\w\._-]+)/", include("idios.urls_base")),
    # url(r"^(?P<profile_slug>[\w\._-]+)/(?P<profile_pk>\d+)/$", ProfileDetailView.as_view(), name="profile_detail"),
    # url(r"", include("idios.urls_base")),
    
    url(r"^(?P<username>[\w\._-]+)/$", ProfileDetailView.as_view(), name="profile_detail"),
    url(r"^edit/(?P<username>[\w\._-]+)$", ProfileUpdateView.as_view(), name="profile_edit"),
)

# for squad.xml and squad.dtd generation - took view code from idios.views
urlpatterns += patterns("itwishlist.apps.profiles.views",
    url(r"^(?P<username>[\w\._-]+)/squad.dtd$", direct_to_template, {"template": "profiles/squad.dtd",}, name="squaddtd"),
    url(r"^(?P<username>[\w\._-]+)/squad.xml$", SquadXMLView.as_view(), name="squadxml"),
)
Exemplo n.º 2
0
from django.conf.urls.defaults import *

from idios.views import ProfileListView, ProfileDetailView

urlpatterns = patterns(
    "idios.views",
    url(r"^profile/(?P<username>[\w\._-]+)/$",
        ProfileDetailView.as_view(),
        name="profile_detail"),
    url(r"^(?P<profile_slug>[\w\._-]+)/profile/(?P<profile_pk>\d+)/$",
        ProfileDetailView.as_view(),
        name="profile_detail"),
    url(r"^all/$",
        ProfileListView.as_view(all_profiles=True),
        name="profile_list_all"),
    url(r"", include("idios.urls_base")),
    url(r"^(?P<profile_slug>[\w\._-]+)/", include("idios.urls_base")),
)
Exemplo n.º 3
0
Arquivo: urls.py Projeto: Tuxis/idios
from django.conf.urls.defaults import patterns, url

import idios
from idios.views import ProfileListView, ProfileDetailView, ProfileUpdateView, ProfileCreateView


if not idios.settings.USE_USERNAME:
    profile_detail_default = url(r"^profile/(?P<pk>\d+)/$", ProfileDetailView.as_view(), name="profile_detail")
else:
    profile_detail_default = url(r"^profile/(?P<username>[\w\._+@-]+)/$", ProfileDetailView.as_view(), name="profile_detail")


urlpatterns = patterns("idios.views",
    
    url(r"^$", ProfileListView.as_view(), name="profile_list"),
    url(r"^all/$", ProfileListView.as_view(all_profiles=True), name="profile_list_all"),
        
    url(r"^edit/$", ProfileUpdateView.as_view(), name="profile_edit"),
    url(r"^(?P<profile_slug>[\w\._+@-]+)/edit/$", ProfileUpdateView.as_view(), name="profile_edit"),
    
    url(r"^create/$", ProfileCreateView.as_view(), name="profile_create"),
    url(r"^(?P<profile_slug>[\w\._+@-]+)/create/$", ProfileCreateView.as_view(), name="profile_create"),
    
    profile_detail_default,
    url(r"^(?P<profile_slug>[\w\._+@-]+)/profile/(?P<pk>\d+)/$", ProfileDetailView.as_view(), name="profile_detail"),
    
    url(r"^(?P<profile_slug>[\w\._+@-]+)/$", ProfileListView.as_view(), name="profile_list"),
)
Exemplo n.º 4
0
from django.conf.urls.defaults import *
from idios.views import ProfileListView, ProfileCreateView, ProfileUpdateView


urlpatterns = patterns("idios.views",
    url(r"^$", ProfileListView.as_view(), name="profile_list"),
    url(r"^edit/$", ProfileUpdateView.as_view(), name="profile_edit"),
    url(r"^create/$", ProfileCreateView.as_view(), name="profile_create"),
)
Exemplo n.º 5
0
import idios
from idios.views import ProfileListView, ProfileDetailView, ProfileUpdateView, ProfileCreateView

if not idios.settings.USE_USERNAME:
    profile_detail_default = url(r"^profile/(?P<pk>\d+)/$",
                                 ProfileDetailView.as_view(),
                                 name="profile_detail")
else:
    profile_detail_default = url(r"^profile/(?P<username>[\w\._-]+)/$",
                                 ProfileDetailView.as_view(),
                                 name="profile_detail")

urlpatterns = patterns(
    "idios.views",
    url(r"^$", ProfileListView.as_view(), name="profile_list"),
    url(r"^all/$",
        ProfileListView.as_view(all_profiles=True),
        name="profile_list_all"),
    url(r"^edit/$", ProfileUpdateView.as_view(), name="profile_edit"),
    url(r"^(?P<profile_slug>[\w\._-]+)/edit/$",
        ProfileUpdateView.as_view(),
        name="profile_edit"),
    url(r"^create/$", ProfileCreateView.as_view(), name="profile_create"),
    url(r"^(?P<profile_slug>[\w\._-]+)/create/$",
        ProfileCreateView.as_view(),
        name="profile_create"),
    profile_detail_default,
    url(r"^(?P<profile_slug>[\w\._-]+)/profile/(?P<pk>\d+)/$",
        ProfileDetailView.as_view(),
        name="profile_detail"),
Exemplo n.º 6
0
from django.conf.urls.defaults import *

from idios.views import ProfileListView, ProfileDetailView


urlpatterns = patterns("idios.views",
    url(r"^profile/(?P<username>[\w\._-]+)/$", ProfileDetailView.as_view(), name="profile_detail"),
    url(r"^(?P<profile_slug>[\w\._-]+)/profile/(?P<profile_pk>\d+)/$", ProfileDetailView.as_view(), name="profile_detail"),
    url(r"^all/$", ProfileListView.as_view(all_profiles=True), 
            name="profile_list_all"),
    url(r"", include("idios.urls_base")),
    url(r"^(?P<profile_slug>[\w\._-]+)/", include("idios.urls_base")),
)
Exemplo n.º 7
0
from django.conf.urls.defaults import *

from idios.views import ProfileListView, ProfileCreateView, ProfileUpdateView

urlpatterns = patterns(
    "idios.views",
    url(r"^$", ProfileListView.as_view(), name="profile_list"),
    url(r"^edit/$", ProfileUpdateView.as_view(), name="profile_edit"),
    url(r"^create/$", ProfileCreateView.as_view(), name="profile_create"),
)