Exemplo n.º 1
0
def dashboard_index(request):
    if not request.user.is_authenticated():
        return redirect('/account/login/?next=%s' % request.path)

    feed = all_donations_by_user(request.user)
    tda = total_donation_amount(request.user)
    user_has_donation = (tda > 0)

    user_badges = all_badges_for_user(request.user)

    return EntryIndex.as_view()(request, 'dashboard/dashboard_main.html', {
        'user_has_donation': True
    })
Exemplo n.º 2
0
"""Urls for the Zinnia archives"""
from django.conf.urls import url
from django.conf.urls import patterns

from zinnia.urls import _
from zinnia.views.archives import EntryDay
from zinnia.views.archives import EntryWeek
from zinnia.views.archives import EntryYear
from zinnia.views.archives import EntryMonth
from zinnia.views.archives import EntryToday
from zinnia.views.archives import EntryIndex

index_patterns = [
    url(r'^$', EntryIndex.as_view(), name='zinnia_entry_archive_index'),
    url(_(r'^page/(?P<page>\d+)/$'),
        EntryIndex.as_view(),
        name='zinnia_entry_archive_index_paginated')
]

year_patterns = [
    url(r'^(?P<year>\d{4})/$',
        EntryYear.as_view(),
        name='zinnia_entry_archive_year'),
    url(_(r'^(?P<year>\d{4})/page/(?P<page>\d+)/$'),
        EntryYear.as_view(),
        name='zinnia_entry_archive_year_paginated'),
]

week_patterns = [
    url(_(r'^(?P<year>\d{4})/week/(?P<week>\d+)/$'),
        EntryWeek.as_view(),
Exemplo n.º 3
0
# -*- coding: utf-8 -*-
from zinnia.views.archives import EntryIndex

urlpatterns = patterns('',
    url(r'^$', EntryIndex.as_view(), name='homepage'),
    url(r'^weblog/', include('zinnia.urls')),
    url(r'^comments/', include('django.contrib.comments.urls')),
    ) + urlpatterns
Exemplo n.º 4
0
from django.conf.urls import url
from django.conf.urls import patterns

from zinnia.urls import _

from zinnia.views.archives import EntryDay
from zinnia.views.archives import EntryWeek
from zinnia.views.archives import EntryYear
from zinnia.views.archives import EntryMonth
from zinnia.views.archives import EntryToday
from zinnia.views.archives import EntryIndex


index_patterns = [
    url(r'^$',
        EntryIndex.as_view(),
        name='zinnia_entry_archive_index'),
    url(_(r'^page/(?P<page>\d+)/$'),
        EntryIndex.as_view(),
        name='zinnia_entry_archive_index_paginated')
]

year_patterns = [
    url(r'^(?P<year>\d{4})/$',
        EntryYear.as_view(),
        name='zinnia_entry_archive_year'),
    url(_(r'^(?P<year>\d{4})/page/(?P<page>\d+)/$'),
        EntryYear.as_view(),
        name='zinnia_entry_archive_year_paginated'),
]
Exemplo n.º 5
0
"""Urls for the Zinnia archives"""
from django.urls import path

from zinnia.urls import _
from zinnia.views.archives import EntryDay
from zinnia.views.archives import EntryIndex
from zinnia.views.archives import EntryMonth
from zinnia.views.archives import EntryToday
from zinnia.views.archives import EntryWeek
from zinnia.views.archives import EntryYear

index_patterns = [
    path('', EntryIndex.as_view(), name='entry_archive_index'),
    path(_('page/<int:page>/'),
         EntryIndex.as_view(),
         name='entry_archive_index_paginated')
]

year_patterns = [
    path('<yyyy:year>/', EntryYear.as_view(), name='entry_archive_year'),
    path(_('<yyyy:year>/page/<int:page>/'),
         EntryYear.as_view(),
         name='entry_archive_year_paginated'),
]

week_patterns = [
    path(_('<yyyy:year>/week/<int:week>/'),
         EntryWeek.as_view(),
         name='entry_archive_week'),
    path(_('<yyyy:year>/week/<int:week>/page/<int:page>/'),
         EntryWeek.as_view(),
Exemplo n.º 6
0
# -*- coding: utf-8 -*-
from zinnia.views.archives import EntryIndex

urlpatterns = patterns(
    '',
    url(r'^$', EntryIndex.as_view(), name='homepage'),
    url(r'^weblog/', include('zinnia.urls', namespace="zinnia")),
    url(r'^comments/', include('django_comments.urls')),
) + urlpatterns
Exemplo n.º 7
0
"""Urls for the Zinnia archives"""
from django.conf.urls import url
from django.conf.urls import patterns

from zinnia.urls import _
from zinnia.views.archives import EntryDay
from zinnia.views.archives import EntryWeek
from zinnia.views.archives import EntryYear
from zinnia.views.archives import EntryMonth
from zinnia.views.archives import EntryToday
from zinnia.views.archives import EntryIndex


index_patterns = [
    url(r'^$',
        EntryIndex.as_view(),
        name='entry_archive_index'),
    url(_(r'^page/(?P<page>\d+)/$'),
        EntryIndex.as_view(),
        name='entry_archive_index_paginated')
]

year_patterns = [
    url(r'^(?P<year>\d{4})/$',
        EntryYear.as_view(),
        name='entry_archive_year'),
    url(_(r'^(?P<year>\d{4})/page/(?P<page>\d+)/$'),
        EntryYear.as_view(),
        name='entry_archive_year_paginated'),
]