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, 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.º 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
router.register(r'latest_news', articles.LatestNewsViewSet)
router.register(r'featured_matches', matches.FeaturedMatchesViewSet)
router.register(r'carousel', carousel.CarouselItemViewSet)

urlpatterns = patterns('',
    url(r'^api/', include(router.urls)),
)

urlpatterns += patterns('',
    url(r"^admin/", include(admin.site.urls)),
    url(r"^account/", include("recaptcha_form.account_backend.urls")),
    url(r'^social/', include('social_auth.urls')),
    url(r"^profiles/profile/(?P<slug>[\w\._-]+)/$", MyProfileDetailView.as_view(), name="profile_detail"),
    url(r"^profiles/resend_confirmation/", ResendEmailConfirmation.as_view(), name="resend_confirmation"),
    url(r"^profiles/profile/(?P<slug>[\w\._-]+)/add_membership/$", TeamMembershipCreateView.as_view(), name="membership_create"),
    url(r"^profiles/edit/$", ProfileUpdateView.as_view(form_class=model_forms.modelform_factory(Profile, exclude=('user', 'signature', 'signature_html', 'time_zone', 'language', 'post_count', 'avatar',))), name="profile_edit"),
    url(r"^profiles/membership_edit/(?P<pk>[\d]+)/$", TeamMembershipUpdateView.as_view(), name="membership_edit"),
    url(r"^profiles/membership_delete/(?P<pk>[\d]+)/$", TeamMembershipDeleteView.as_view(), name="membership_delete"),
    url(r"^profiles/", include("idios.urls")),
    url(r"^notices/", include("notification.urls")),
    url(r"^likes/", include("phileo.urls")),
    url(r"^announcements/", include("announcements.urls")),
    # url(r'^forum/', include('pybb.urls', namespace='pybb')),
    url(r'^messages/compose/(?P<recipient>[\+\w\.\-_]+)/$', compose, name='messages_compose_to'),  # we allow periods
    url(r'^messages/', include('django_messages.urls')),
    url(r'^tinymce/', include('tinymce.urls')),

    # player admin controls
    url(r'^player_admin/$', PlayerAdminView.as_view(), name="player_admin"),
    url(r'^report_match/(?P<pk>[\d]+)/$', MatchReportView.as_view(), name="report_match"),
    # captain specific
Exemplo n.º 5
0
 url(r"^profiles/profile/(?P<slug>[\w\._-]+)/$",
     MyProfileDetailView.as_view(),
     name="profile_detail"),
 url(r"^profiles/resend_confirmation/",
     ResendEmailConfirmation.as_view(),
     name="resend_confirmation"),
 url(r"^profiles/profile/(?P<slug>[\w\._-]+)/add_membership/$",
     TeamMembershipCreateView.as_view(),
     name="membership_create"),
 url(r"^profiles/edit/$",
     ProfileUpdateView.as_view(
         form_class=model_forms.modelform_factory(Profile,
                                                  exclude=(
                                                      'user',
                                                      'signature',
                                                      'signature_html',
                                                      'time_zone',
                                                      'language',
                                                      'post_count',
                                                      'avatar',
                                                  ))),
     name="profile_edit"),
 url(r"^profiles/membership_edit/(?P<pk>[\d]+)/$",
     TeamMembershipUpdateView.as_view(),
     name="membership_edit"),
 url(r"^profiles/membership_delete/(?P<pk>[\d]+)/$",
     TeamMembershipDeleteView.as_view(),
     name="membership_delete"),
 url(r"^profiles/", include("idios.urls")),
 url(r"^notices/", include("notification.urls")),
 url(r"^likes/", include("phileo.urls")),
Exemplo n.º 6
0
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(
    "hotinrome.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.º 7
0
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.º 8
0
from django.conf.urls import patterns, include, url
from idios.views import ProfileUpdateView

from profiles.forms import ProfileForm
from profiles.views import ProfileDetailView, ProfileListView


urlpatterns = patterns("",
    url(r"^profile/(?P<pk>\d+)/(?P<slug>[\w\._-]*)",
        ProfileDetailView.as_view(), name="profile_detail"),
    url(r"^edit/$", ProfileUpdateView.as_view(
        form_class=ProfileForm, template_name="profiles/profile_edit.html"),
        name="profile_edit"),
    url(r"^$", ProfileListView.as_view(), name="profile_list"),
    url(r"^all/$", ProfileListView.as_view(all_profiles=True),
        name="profile_list_all"),
)