Ejemplo n.º 1
0
    FollowersListView,
    SimilarUsersListView,
    SimilarUsersFollowingListView,
    SimilarUsersFollowedListView,
)
from film20.recommendations.urls import genre  #

collection_view = login_required(CollectionListView.as_view(template_name=templates["MY_COLLECTION"]))
followed_view = login_required(FollowedListView.as_view(template_name=templates["DASHBOARD_FOLLOWED"]))
followers_view = login_required(FollowersListView.as_view(template_name=templates["DASHBOARD_FOLLOWERS"]))
similar_users_view = login_required(SimilarUsersListView.as_view(template_name=templates["DASHBOARD_SIMILAR_USERS"]))
similar_users_following_view = login_required(
    SimilarUsersFollowingListView.as_view(template_name=templates["DASHBOARD_SIMILAR_USERS"])
)
similar_users_followed_view = login_required(
    SimilarUsersFollowedListView.as_view(template_name=templates["DASHBOARD_SIMILAR_USERS"])
)

dashboardpatterns = patterns(
    "",
    url(r"^" + urls.urls["DASHBOARD"] + "/$", show_dashboard, name="show_dashboard"),
    url(
        r"^" + urls.urls["ARTICLES"] + "/$",
        login_required(ArticlesListView.as_view(template_name=templates["MY_ARTICLES"])),
        name="articles",
    ),
    url(r"^" + urls.urls["NEW_ARTICLE"] + "/$", new_article, name="new_article"),
    url(r"^" + urls.urls["EDIT_ARTICLE"] + "/(?P<id>\d+)/$", edit_article, name="edit_article"),
    #    url(r'^'+urls.urls["DELETE_ARTICLE"]+'/(?P<permalink>[\w\-_]+)/$', delete_article), # was: delete-post
    url(r"^" + urls.urls["FOLLOWED"] + "/$", followed_view, name="dashboard_followed"),
    url(r"^" + urls.urls["FOLLOWERS"] + "/$", followers_view, name="dashboard_followers"),
Ejemplo n.º 2
0
from film20.recommendations.urls import genre  #

collection_view = login_required(
    CollectionListView.as_view(template_name=templates['MY_COLLECTION']))
followed_view = login_required(
    FollowedListView.as_view(template_name=templates['DASHBOARD_FOLLOWED']))
followers_view = login_required(
    FollowersListView.as_view(template_name=templates['DASHBOARD_FOLLOWERS']))
similar_users_view = login_required(
    SimilarUsersListView.as_view(
        template_name=templates['DASHBOARD_SIMILAR_USERS']))
similar_users_following_view = login_required(
    SimilarUsersFollowingListView.as_view(
        template_name=templates['DASHBOARD_SIMILAR_USERS']))
similar_users_followed_view = login_required(
    SimilarUsersFollowedListView.as_view(
        template_name=templates['DASHBOARD_SIMILAR_USERS']))

dashboardpatterns = patterns(
    '',
    url(r'^' + urls.urls['DASHBOARD'] + '/$',
        show_dashboard,
        name='show_dashboard'),
    url(r'^' + urls.urls['ARTICLES'] + '/$',
        login_required(
            ArticlesListView.as_view(template_name=templates['MY_ARTICLES'])),
        name='articles'),
    url(r'^' + urls.urls["NEW_ARTICLE"] + '/$',
        new_article,
        name='new_article'),
    url(r'^' + urls.urls["EDIT_ARTICLE"] + '/(?P<id>\d+)/$',
        edit_article,
Ejemplo n.º 3
0
from django.contrib.auth.decorators import login_required

# Project
from film20.dashboard.views import *
from film20.userprofile.views import CollectionListView, RatingsListView, \
        ArticlesListView, FollowedListView, FollowersListView, \
        SimilarUsersListView, \
        SimilarUsersFollowingListView, SimilarUsersFollowedListView
from film20.recommendations.urls import genre #

collection_view = login_required(CollectionListView.as_view(template_name = templates['MY_COLLECTION']))
followed_view = login_required(FollowedListView.as_view(template_name = templates['DASHBOARD_FOLLOWED']))
followers_view = login_required(FollowersListView.as_view(template_name = templates['DASHBOARD_FOLLOWERS']))
similar_users_view = login_required(SimilarUsersListView.as_view(template_name = templates['DASHBOARD_SIMILAR_USERS']))
similar_users_following_view = login_required(SimilarUsersFollowingListView.as_view(template_name = templates['DASHBOARD_SIMILAR_USERS']))
similar_users_followed_view = login_required(SimilarUsersFollowedListView.as_view(template_name = templates['DASHBOARD_SIMILAR_USERS']))

dashboardpatterns = patterns('',
    url(r'^'+urls.urls['DASHBOARD']+'/$', show_dashboard, name = 'show_dashboard'),
    url(r'^'+urls.urls['ARTICLES']+'/$', login_required(ArticlesListView.as_view(template_name=templates['MY_ARTICLES'])), name='articles'),
    url(r'^'+urls.urls["NEW_ARTICLE"]+'/$', new_article, name='new_article'),
    url(r'^'+urls.urls["EDIT_ARTICLE"]+'/(?P<id>\d+)/$', edit_article, name='edit_article'),
#    url(r'^'+urls.urls["DELETE_ARTICLE"]+'/(?P<permalink>[\w\-_]+)/$', delete_article), # was: delete-post
    url(r'^'+urls.urls["FOLLOWED"]+'/$', followed_view, name='dashboard_followed'),
    url(r'^'+urls.urls["FOLLOWERS"]+'/$', followers_view, name='dashboard_followers'),
#   revert when http://jira.filmaster.org/browse/FLM-1898 is fixed
#    url(r'^'+urls.urls["SIMILAR_USERS"]+'/$', similar_users_view, name='similar_users_url'),
#    url(r'^'+urls.urls["SIMILAR_USERS_FOLLOWING"]+'/$', similar_users_following_view, name='similar_users_following'),
#    url(r'^'+urls.urls["SIMILAR_USERS_FOLLOWED"]+'/$', similar_users_followed_view, name='similar_users_followed'),
    url(r'^%(WISHLIST)s/$' % urls.urls, collection_view, {'kind':urls.urls['WISHLIST']}, name="wishlist" ),
    url(r'^%(SHITLIST)s/$' % urls.urls, collection_view, {'kind':urls.urls['SHITLIST']}, name="shitlist" ),
Ejemplo n.º 4
0
from film20.publicprofile.views import *
from film20.threadedcomments.views import comment
from film20.userprofile.views import CollectionListView, RatingsListView, \
        ArticlesListView, FollowedListView, FollowersListView, \
        SimilarUsersListView, SimilarUsersFollowingListView, SimilarUsersFollowedListView

from film20.usersubdomain.sitemap import sitemappatterns

collection_view = (CollectionListView.as_view(template_name = templates['PROFILE_COLLECTION']))
articles_view = (ArticlesListView.as_view(template_name=templates['PROFILE']))
ratings_view = (RatingsListView.as_view(template_name = templates['PROFILE_RATED_FILMS']))
followed_view = (FollowedListView.as_view(template_name = templates['PROFILE_FOLLOWED']))
followers_view = (FollowersListView.as_view(template_name = templates['PROFILE_FOLLOWERS']))
similar_users_view = SimilarUsersListView.as_view(template_name = templates['PROFILE_SIMILAR_USERS'])
similar_users_following_view = SimilarUsersFollowingListView.as_view(template_name = templates['PROFILE_SIMILAR_USERS'])
similar_users_followed_view = SimilarUsersFollowedListView.as_view(template_name = templates['PROFILE_SIMILAR_USERS'])

urlpatterns = patterns('',
    url(r'^$', public_profile, {'activity_option': 'user_all'}, name="show_profile"),
    url(r'^' + urls['ARTICLE'] + '/(?P<permalink>[\w\-_]+)/$', show_article, name='show_article'),
    url(r'^' + urls['CHECKIN'] + '/(?P<id>\d+)/$', show_checkin, name='show_checkin'),
    url(r'^' + urls['RATING'] + '/(?P<id>\d+)/$', show_rating, name='show_rating'),
    url(r'^' + urls['LINK'] + '/(?P<id>\d+)/$', show_link, name='show_link'),
    url(r'^' + urls['POSTER'] + '/(?P<id>\d+)/$', show_poster, name='show_poster'),
    url(r'^'+urls['ARTICLES_OLD'] + '/$', articles_view, name='articles'),
    url(r'^'+urls['ARTICLES'] + '/$', articles_view, name='articles'),
    url(r'^'+urls['WALL']+'/(?P<post_id>\d{1,10})/$', show_wall_post, name='show_wall_post'),
    url(r'^'+urls['FOLLOWED']+'/$', followed_view, name='profile_followed'),
    url(r'^'+urls['FOLLOWERS']+'/$', followers_view, name='profile_followers'),

    url(r'^'+urls['WISHLIST']+'/$', collection_view, {'kind':urls['WISHLIST']}, name="wishlist" ),