Beispiel #1
0
from django.contrib.auth.decorators import login_required
from django.db.models import Count, Q, Sum
from django.views.generic import ListView, DeleteView, CreateView, UpdateView

from sabot.decorators import user_is_staff
from sabot.multiYear import YSXMLListView, YSCreateView, getActiveYear
from sabot.views import ParticipantsView, OwnerSettingCreateView, PermCheckUpdateView, EmailOutputView, XMLListView, MultipleListView, PropertySetterView, PermCheckPropertySetterView, PermCheckSimpleDeleteView, ArchiveCreatorView
from sponsor.forms import SponsorContactForm, SponsorPackageForm, PackagesImporterForm
from sponsor.models import Sponsoring, SponsoringParticipants, SponsorContact, SponsorPackage
from sponsor.views import PackagesImporterView

urlpatterns = [
    url(r'^new',
        user_is_staff(
            YSCreateView.as_view(model=SponsorPackage,
                                 form_class=SponsorPackageForm,
                                 template_name="sponsor/package/update.html",
                                 success_url="./{id}")),
        name="sponsorpackage_new"),
    url(r'^(?P<pk>[0-9]+)$',
        user_is_staff(
            UpdateView.as_view(model=SponsorPackage,
                               form_class=SponsorPackageForm,
                               template_name="sponsor/package/update.html",
                               success_url="list")),
        name="sponsorpackage_update"),
    url(r'^list/?',
        user_is_staff(
            MultipleListView.as_view(
                template_name="sponsor/package/list.html",
                template_params={
from django.conf.urls import include, url

from django.views.generic import ListView, DeleteView, CreateView, UpdateView
from sponsor.models import SponsorMailAttachment
from sabot.decorators import user_is_staff

urlpatterns = [
	url(r'^new',
		user_is_staff(CreateView.as_view(
			model = SponsorMailAttachment,
			fields = [
				"name",
				"attachment",
			],
			template_name = "sponsor/mailattachment/update.html",
			success_url = "list")),
		name = "sponsormailattachment_new"),
	url(r'^(?P<pk>[0-9]+)$',
		user_is_staff(UpdateView.as_view(
			model = SponsorMailAttachment,
			fields = [
				"name",
				"attachment",
			],
			template_name = "sponsor/mailattachment/update.html",
			success_url = "list")),
		name = "sponsormailattachment_update"),
	url(r'^list/?',
		user_is_staff(ListView.as_view(
			queryset = SponsorMailAttachment.objects.all(),
			template_name = "sponsor/mailattachment/list.html")),
Beispiel #3
0
     TokenLoginView.as_view(),
     name="auth_token"),
 url(r'^profile/?$',
     login_required(UserProfileView.as_view()),
     name="auth_user_profile"),
 url(r'^activatepw/(?P<activation_key>\w+)/$',
     ActivateAndSetPWView.as_view(),
     name="auth_activate_pw"),
 url(r'^register/?$',
     RegistrationView.as_view(
         form_class=RegistrationFormNameAndUniqueEmail),
     name="auth_register_with_name"),
 # staff pages
 url(r'^list+projects/?$',
     user_is_staff(
         ListView.as_view(
             model=User,
             template_name="registration/userAffiliation.html")),
     name="auth_user_affil"),
 url(r'^list/?$',
     user_is_staff(
         ListView.as_view(model=User,
                          template_name="registration/userList.html")),
     name="auth_user_list"),
 url(r'^(?P<pk>\d+)/makestaff$',
     user_is_staff(
         PropertySetterView.as_view(model=User,
                                    property_name="is_staff",
                                    property_value=True,
                                    next_view="auth_user_list")),
     name="auth_user_makestaff"),
 url(r'^(?P<pk>\d+)/revokestaff$',
Beispiel #4
0
from django.conf.urls import include, url
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.db.models import Count, Q, Sum
from django.views.generic import ListView, DeleteView, CreateView, UpdateView

from sabot.decorators import user_is_staff
from invoice.models import DocumentTemplate

urlpatterns = [
    url(r'^new',
        user_is_staff(
            CreateView.as_view(
                model=DocumentTemplate,
                fields=[
                    "description",
                    "template",
                    "docType",
                ],
                template_name="invoice/documenttemplate/update.html",
                success_url="./{id}")),
        name="documenttemplate_new"),
    url(r'^(?P<pk>[0-9]+)$',
        user_is_staff(
            UpdateView.as_view(
                model=DocumentTemplate,
                fields=[
                    "description",
                    "template",
                    "docType",
                ],
                template_name="invoice/documenttemplate/update.html",
Beispiel #5
0
from invoice import views
from invoice.models import Invoice
from sabot.decorators import user_is_finance, user_is_staff
from sabot.multiYear import getActiveYear
from sabot.views import PropertySetterView, MultipleListView, ObjectFileDownloader
from sponsor.models import Sponsoring

urlpatterns = [
    url(r"^invoices$",
        user_is_staff(
            MultipleListView.as_view(template_params={
                "object_list":
                lambda req, kwargs: Sponsoring.objects.select_related().filter(
                    year=getActiveYear(req),
                    commitment=True,
                    clearedForBilling=True),
                "today":
                lambda req, kwargs: datetime.date.today(),
            },
                                     template_name="invoice/invoices.html")),
        name="invoice_overview"),
    url(r"^create/(?P<spk>\d+)$",
        user_is_finance(
            views.InvoiceCreateUpdateView.as_view(
                next_view="invoice_overview")),
        name="invoice_create"),
    url(r"^downloadinvoice/(?P<pk>\d+)$",
        user_is_staff(
            ObjectFileDownloader.as_view(model=Invoice,
                                         upload_field="pdf",
Beispiel #6
0
from django.contrib.auth.decorators import login_required
from django.db.models import Count, Q, Sum
from django.views.generic import ListView, DeleteView, CreateView, UpdateView

from sabot.decorators import user_is_staff
from sabot.multiYear import YSXMLListView, YSCreateView, getActiveYear
from sabot.views import ParticipantsView, OwnerSettingCreateView, PermCheckUpdateView, EmailOutputView, XMLListView, MultipleListView, PropertySetterView, PermCheckPropertySetterView, PermCheckSimpleDeleteView, ArchiveCreatorView
from sponsor.forms import SponsorContactForm, SponsorPackageForm, PackagesImporterForm
from sponsor.models import Sponsoring, SponsoringParticipants, SponsorContact, SponsorPackage
from sponsor.views import PackagesImporterView

urlpatterns = [
	url(r'^new',
		user_is_staff(YSCreateView.as_view(
			model = SponsorPackage,
			form_class = SponsorPackageForm,
			template_name = "sponsor/package/update.html",
			success_url = "./{id}")),
		name = "sponsorpackage_new"),
	url(r'^(?P<pk>[0-9]+)$',
		user_is_staff(UpdateView.as_view(
			model = SponsorPackage,
			form_class = SponsorPackageForm,
			template_name = "sponsor/package/update.html",
			success_url = "list")),
		name = "sponsorpackage_update"),
	url(r'^list/?',
		user_is_staff(MultipleListView.as_view(
			template_name = "sponsor/package/list.html",
			template_params = {
				"object_list" : lambda req, kwargs : SponsorPackage.objects.filter(year=getActiveYear(req)),
Beispiel #7
0
from django.conf.urls import include, url
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.db.models import Count, Q, Sum
from django.views.generic import ListView, DeleteView, CreateView, UpdateView

from sabot.decorators import user_is_staff
from invoice.models import DocumentTemplate

urlpatterns = [
	url(r'^new',
		user_is_staff(CreateView.as_view(
			model = DocumentTemplate,
			fields = [
				"description",
				"template",
				"docType",
			],
			template_name = "invoice/documenttemplate/update.html",
			success_url = "./{id}")),
		name = "documenttemplate_new"),
	url(r'^(?P<pk>[0-9]+)$',
		user_is_staff(UpdateView.as_view(
			model = DocumentTemplate,
			fields = [
				"description",
				"template",
				"docType",
			],
			template_name = "invoice/documenttemplate/update.html",
			success_url = "./{id}")),
Beispiel #8
0
		login_required(PermCheckUpdateView.as_view(
			model = Exhibitor,
			form_class = ExhibitorBoothForm,
			template_name = "exhibitor/booth.html",
			success_url = "/exhibitors/%(id)s/booth")),
		name = "exhibitor_update_booth"),
	url(r'^(?P<pk>[0-9]+)/participants$',
		login_required(ParticipantsView.as_view(
			object_class = Exhibitor,
			connection_table_class = ExhibitorParticipants,
			template_name = "exhibitor/participants.html")),
		name="exhibitor_participants"),
	url(r'^(?P<pk>[0-9]+)/accept$',
		user_is_staff(PropertySetterView.as_view(
			model = Exhibitor,
			property_name = "accepted",
			property_value = True,
			next_view = "exhibitor_list")),
		name="exhibitor_accept"),
	url(r'^(?P<pk>[0-9]+)/unaccept$',
		user_is_staff(PropertySetterView.as_view(
			model = Exhibitor,
			property_name = "accepted",
			property_value = False,
			next_view = "exhibitor_list")),
		name="exhibitor_unaccept"),
	url(r'^participants/remove/(?P<pk>[0-9]+)$',
		login_required(PermCheckSimpleDeleteView.as_view(
			model = ExhibitorParticipants,
			permission_checker = lambda obj, user: obj.project.has_write_permission(user),
			redirect = lambda obj, kwargs: reverse("exhibitor_participants", kwargs = { "pk" : obj.project_id }) )),
Beispiel #9
0
from django.contrib.auth.decorators import login_required
from django.db.models import Count, Q, Sum

from django.views.generic import ListView, DeleteView, CreateView, UpdateView
from sponsor.views import SponsorCreateView, SponsorUpdateView, SponsorEmailingView, sponsorMailPreview, SponsorContactResetEmailView, loadResponseInfoFromRT
from sponsor.forms import SponsorContactForm, SponsorPackageForm
from sponsor.models import Sponsoring, SponsoringParticipants, SponsorContact, SponsorPackage
from sabot.views import ParticipantsView, OwnerSettingCreateView, PermCheckUpdateView, EmailOutputView, XMLListView, MultipleListView, PropertySetterView, PermCheckPropertySetterView, PermCheckSimpleDeleteView, ArchiveCreatorView
from sabot.decorators import user_is_staff

urlpatterns = patterns(
    '',
    url(r'^new',
        user_is_staff(
            CreateView.as_view(model=SponsorContact,
                               form_class=SponsorContactForm,
                               template_name="sponsor/contact/update.html",
                               success_url="%(id)s")),
        name="sponsorcontact_new"),
    url(r'^(?P<pk>[0-9]+)$',
        user_is_staff(
            UpdateView.as_view(model=SponsorContact,
                               form_class=SponsorContactForm,
                               template_name="sponsor/contact/update.html",
                               success_url="list#contact-%(id)s")),
        name="sponsorcontact_update"),
    url(r'^list/?',
        user_is_staff(
            ListView.as_view(queryset=SponsorContact.objects.select_related(),
                             template_name="sponsor/contact/list.html")),
        name="sponsorcontact_list"),
from django.conf.urls import patterns, include, url
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.db.models import Count, Q, Sum
from django.views.generic import ListView, DeleteView, CreateView, UpdateView

from sabot.decorators import user_is_staff
from invoice.models import DocumentTemplate

urlpatterns = patterns('',
	url(r'^new',
		user_is_staff(CreateView.as_view(
			model = DocumentTemplate,
			template_name = "invoice/documenttemplate/update.html",
			success_url = "%(id)s")),
		name = "documenttemplate_new"),
	url(r'^(?P<pk>[0-9]+)$',
		user_is_staff(UpdateView.as_view(
			model = DocumentTemplate,
			template_name = "invoice/documenttemplate/update.html",
			success_url = "%(id)s")),
		name = "documenttemplate_update"),
	url(r'^list/?',
		user_is_staff(ListView.as_view(
			queryset = DocumentTemplate.objects.all(),
			template_name = "invoice/documenttemplate/list.html")),
			name="documenttemplate_list"),
	url(r'^del/(?P<pk>[0-9]+)$',
		user_is_staff(DeleteView.as_view(
			model = DocumentTemplate,
			template_name= "invoice/documenttemplate/del.html",
Beispiel #11
0
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.db.models import Count, Q, Sum

from django.views.generic import ListView, DeleteView, CreateView, UpdateView
from sponsor.views import SponsorCreateView, SponsorUpdateView, SponsorEmailingView, sponsorMailPreview, SponsorContactResetEmailView, loadResponseInfoFromRT
from sponsor.forms import SponsorContactForm, SponsorPackageForm
from sponsor.models import Sponsoring, SponsoringParticipants, SponsorContact, SponsorPackage
from sabot.views import ParticipantsView, OwnerSettingCreateView, PermCheckUpdateView, EmailOutputView, XMLListView, MultipleListView, PropertySetterView, PermCheckPropertySetterView, PermCheckSimpleDeleteView, ArchiveCreatorView
from sabot.decorators import user_is_staff

urlpatterns = [
	url(r'^new',
		user_is_staff(CreateView.as_view(
			model = SponsorContact,
			form_class = SponsorContactForm,
			template_name = "sponsor/contact/update.html",
			success_url = "./{id}")),
		name = "sponsorcontact_new"),
	url(r'^(?P<pk>[0-9]+)$',
		user_is_staff(UpdateView.as_view(
			model = SponsorContact,
			form_class = SponsorContactForm,
			template_name = "sponsor/contact/update.html",
			success_url = "list#contact-{id}")),
		name = "sponsorcontact_update"),
	url(r'^list/?',
		user_is_staff(ListView.as_view(
			queryset = SponsorContact.objects.select_related(),
			template_name = "sponsor/contact/list.html")),
			name="sponsorcontact_list"),
Beispiel #12
0
    if obj.sponsoring is not None:
        return reverse("sponsor_update", kwargs={"pk": obj.sponsoring_id
                                                 }) + "#parcel"
    else:
        return reverse("parcel_list")


urlpatterns = patterns(
    '',
    url(r'^S-(?P<spk>[0-9]+)/newpacket$',
        login_required(ParcelCreateView.as_view()),
        name="parcel_add"),
    url(r'^newpacket$',
        user_is_staff(
            CreateView.as_view(model=SponsorParcel,
                               form_class=SponsorParcelAdminForm,
                               template_name="sponsor/parcel/update.html",
                               success_url="list")),
        name="parcel_add_admin"),
    url(r'^(?P<pk>[0-9]+)/view$',
        login_required(ParcelUpdateView.as_view()),
        name="parcel_update"),
    url(r'^(?P<pk>[0-9]+)/delete$',
        login_required(
            PermCheckDeleteView.as_view(
                model=SponsorParcel,
                redirect=lambda obj,
                kwargs: reverse("sponsor_update",
                                kwargs={"pk": obj.sponsoring_id}) + "#parcel",
                template_name="sponsor/parcel/del.html")),
        name="parcel_del"),
Beispiel #13
0
from django.conf.urls import patterns, include, url
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.db.models import Count, Q, Sum
from django.views.generic import ListView, DeleteView, CreateView, UpdateView

from sabot.decorators import user_is_staff
from invoice.models import DocumentTemplate

urlpatterns = patterns(
    '',
    url(r'^new',
        user_is_staff(
            CreateView.as_view(
                model=DocumentTemplate,
                template_name="invoice/documenttemplate/update.html",
                success_url="%(id)s")),
        name="documenttemplate_new"),
    url(r'^(?P<pk>[0-9]+)$',
        user_is_staff(
            UpdateView.as_view(
                model=DocumentTemplate,
                template_name="invoice/documenttemplate/update.html",
                success_url="%(id)s")),
        name="documenttemplate_update"),
    url(r'^list/?',
        user_is_staff(
            ListView.as_view(
                queryset=DocumentTemplate.objects.all(),
                template_name="invoice/documenttemplate/list.html")),
        name="documenttemplate_list"),
Beispiel #14
0
import datetime

from django.conf.urls import url, patterns
from django.views.generic import ListView

from sabot.decorators import user_is_finance, user_is_staff
from sabot.views import PropertySetterView, MultipleListView
from invoice import views
from invoice.models import Invoice
from sponsor.models import Sponsoring

urlpatterns = patterns('',
	url(r"^invoices$",
		user_is_staff(MultipleListView.as_view(
			template_params = {
				"object_list" : Sponsoring.objects.select_related().filter(commitment=True,clearedForBilling=True),
				"today" : lambda req, kwargs : datetime.date.today(),
			},
			template_name = "invoice/invoices.html")),
		name = "invoice_overview"),
	url(r"^create/(?P<spk>\d+)$",
		user_is_finance(views.InvoiceCreateUpdateView.as_view(
			next_view="invoice_overview")),
		name = "invoice_create"),
	url(r"^sendinvoice/(?P<spk>\d+)$",
		user_is_finance(views.RTinvoiceView.as_view()),
		name = "invoice_sendinvoice"),
	url(r"^snailmailinvoice/(?P<spk>\d+)$",
		user_is_finance(views.InvoiceSnailMailView.as_view()),
		name = "invoice_snailmailinvoice"),
	url(r"^snailmailstatussink/(?P<invId>[0-9a-zA-Z-]+_?)$",
		views.SMSKaufenStatusUpdate,
Beispiel #15
0
from django.db.models import Count, Q, Sum
from django.views.generic import ListView, DeleteView, CreateView, UpdateView, TemplateView

from invoice.forms import OfferForm
from sponsor.views import SponsorCreateView, SponsorUpdateView, SponsorEmailingView, sponsorMailPreview, SponsorContactResetEmailView, loadResponseInfoFromRT, ParcelCreateView, ParcelUpdateView
from sponsor.forms import SponsorContactForm, SponsorPackageForm
from sponsor.models import Sponsoring, SponsoringParticipants, SponsorContact, SponsorPackage, SponsorParcel
from sponsor.helpers import sponsor_filesanitize

from sabot.views import ParticipantsView, OwnerSettingCreateView, PermCheckUpdateView, EmailOutputView, XMLListView, MultipleListView, PropertySetterView, PermCheckPropertySetterView, PermCheckSimpleDeleteView, ArchiveCreatorView, PermCheckDeleteView, PermCheckDetailView
from sabot.decorators import user_is_staff

urlpatterns = patterns(
    '',
    url(r'^new/(?P<pk>[0-9]+)$',
        user_is_staff(SponsorCreateView.as_view()),
        name="sponsor_new"),
    url(r'^(?P<pk>[0-9]+)/?$',
        login_required(SponsorUpdateView.as_view()),
        name="sponsor_update"),
    url(r'^(?P<pk>[0-9]+)/participants$',
        login_required(
            ParticipantsView.as_view(
                object_class=Sponsoring,
                connection_table_class=SponsoringParticipants,
                template_name="sponsor/participants.html")),
        name="sponsor_participants"),
    url(r'^(?P<pk>[0-9]+)/overview$',
        login_required(
            PermCheckDetailView.as_view(
                model=Sponsoring, template_name="sponsor/overview.html")),
Beispiel #16
0
		login_required(PermCheckUpdateView.as_view(
			model = Devroom,
			form_class = DevroomProgramForm,
			template_name = "devroom/program.html",
			success_url = "/devrooms/%(id)s/program")),
		name = "devroom_update_program"),
	url(r'^(?P<pk>[0-9]+)/participants$',
		login_required(ParticipantsView.as_view(
			object_class = Devroom,
			connection_table_class = DevroomParticipants,
			template_name = "devroom/participants.html")),
		name="devroom_participants"),
	url(r'^(?P<pk>[0-9]+)/accept$',
		user_is_staff(PropertySetterView.as_view(
			model = Devroom,
			property_name = "accepted",
			property_value = True,
			next_view = "devroom_list")),
		name="devroom_accept"),
	url(r'^(?P<pk>[0-9]+)/unaccept$',
		user_is_staff(PropertySetterView.as_view(
			model = Devroom,
			property_name = "accepted",
			property_value = False,
			next_view = "devroom_list")),
		name="devroom_unaccept"),
	url(r'^(?P<pk>[0-9]+)/setroom$',
		user_is_staff(SetRoomView.as_view(
			success_url = "/devrooms/list")),
		name="devroom_setroom"),
	url(r'^participants/remove/(?P<pk>[0-9]+)$',
from django.conf.urls import include, url

from django.views.generic import ListView, DeleteView, CreateView, UpdateView
from sponsor.models import SponsorMailTemplate
from sabot.decorators import user_is_staff

urlpatterns = [
	url(r'^new',
		user_is_staff(CreateView.as_view(
			model = SponsorMailTemplate,
			fields = [
				"templateName",
				"template",
			],
			template_name = "sponsor/dbtemplate/update.html",
			success_url = "list")),
		name = "sponsordbtemplate_new"),
	url(r'^(?P<pk>[0-9]+)$',
		user_is_staff(UpdateView.as_view(
			model = SponsorMailTemplate,
			fields = [
				"templateName",
				"template",
			],
			template_name = "sponsor/dbtemplate/update.html",
			success_url = "list")),
		name = "sponsordbtemplate_update"),
	url(r'^list/?',
		user_is_staff(ListView.as_view(
			queryset = SponsorMailTemplate.objects.all(),
			template_name = "sponsor/dbtemplate/list.html")),
Beispiel #18
0
def parcel_delete_next(obj, kwargs):
	if obj.sponsoring is not None:
		return reverse("sponsor_update", kwargs = { "pk" : obj.sponsoring_id }) + "#parcel"
	else:
		return reverse("parcel_list")


urlpatterns = patterns('',
	url(r'^S-(?P<spk>[0-9]+)/newpacket$',
		login_required(ParcelCreateView.as_view()),
		name="parcel_add"),
	url(r'^newpacket$',
		user_is_staff(CreateView.as_view(
			model = SponsorParcel,
			form_class = SponsorParcelAdminForm,
			template_name = "sponsor/parcel/update.html",
			success_url="list")),
		name="parcel_add_admin"),
	url(r'^(?P<pk>[0-9]+)/view$',
		login_required(ParcelUpdateView.as_view()),
		name="parcel_update"),
	url(r'^(?P<pk>[0-9]+)/delete$',
		login_required(PermCheckDeleteView.as_view(
			model = SponsorParcel,
			redirect = lambda obj, kwargs: reverse("sponsor_update", kwargs = { "pk" : obj.sponsoring_id }) + "#parcel",
			template_name = "sponsor/parcel/del.html"
		)),
		name="parcel_del"),
	url(r'^list',
		user_is_staff(MultipleListView.as_view(
Beispiel #19
0
from django.conf.urls import include, url

from django.views.generic import ListView, DeleteView, CreateView, UpdateView
from sponsor.models import SponsorMail
from sabot.decorators import user_is_staff

urlpatterns = [
    url(r'^new',
        user_is_staff(
            CreateView.as_view(model=SponsorMail,
                               fields=[
                                   "mailTemplateName",
                                   "template",
                                   "mailSubject",
                                   "attachments",
                               ],
                               template_name="sponsor/mail/update.html",
                               success_url="list")),
        name="sponsormail_new"),
    url(r'^(?P<pk>[0-9]+)$',
        user_is_staff(
            UpdateView.as_view(model=SponsorMail,
                               fields=[
                                   "mailTemplateName",
                                   "template",
                                   "mailSubject",
                                   "attachments",
                               ],
                               template_name="sponsor/mail/update.html",
                               success_url="list")),
        name="sponsormail_update"),
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.db.models import Count, Q, Sum

from django.views.generic import ListView, DeleteView, CreateView, UpdateView
from sponsor.views import SponsorCreateView, SponsorUpdateView, SponsorEmailingView, sponsorMailPreview, SponsorContactResetEmailView, loadResponseInfoFromRT
from sponsor.forms import SponsorContactForm, SponsorPackageForm
from sponsor.models import Sponsoring, SponsoringParticipants, SponsorContact, SponsorPackage
from sabot.views import ParticipantsView, OwnerSettingCreateView, PermCheckUpdateView, EmailOutputView, XMLListView, MultipleListView, PropertySetterView, PermCheckPropertySetterView, PermCheckSimpleDeleteView, ArchiveCreatorView
from sabot.decorators import user_is_staff

urlpatterns = patterns('',
	url(r'^new',
		user_is_staff(CreateView.as_view(
			model = SponsorPackage,
			form_class = SponsorPackageForm,
			template_name = "sponsor/package/update.html",
			success_url = "%(id)s")),
		name = "sponsorpackage_new"),
	url(r'^(?P<pk>[0-9]+)$',
		user_is_staff(UpdateView.as_view(
			model = SponsorPackage,
			form_class = SponsorPackageForm,
			template_name = "sponsor/package/update.html",
			success_url = "list")),
		name = "sponsorpackage_update"),
	url(r'^list/?',
		user_is_staff(ListView.as_view(
			queryset = SponsorPackage.objects.all(),
			template_name = "sponsor/package/list.html")),
			name="sponsorpackage_list"),
Beispiel #21
0
from django.views.generic import ListView, CreateView, DeleteView, UpdateView

from parcel.forms import ParcelAdminForm
from parcel.models import Parcel
from parcel.views import queryParcelOwners, packageQuickStore 
from sabot.decorators import user_is_finance, user_is_staff
from sabot.multiYear import getActiveYear, YSCreateView
from sabot.views import MultipleListView
from sponsor.models import Sponsoring

urlpatterns = [
	url(r'^list/?',
		user_is_staff(MultipleListView.as_view(
			template_params = {
				"object_list" :
					lambda req, kwargs : Sponsoring.objects.filter(year=getActiveYear(req)).select_related(),
				"parcel_list" :
					lambda req, kwargs : Parcel.objects.filter(year=getActiveYear(req)).select_related(),
			},
			template_name = "parcel/admin/list.html")),
		name = "parcel_list"),
	url(r'^new',
		user_is_staff(YSCreateView.as_view(
			model = Parcel,
			form_class = ParcelAdminForm,
			template_name = "parcel/admin/update.html",
			success_url = "parcel_list")),
		name = "parcel_new"),
	url(r'^(?P<pk>[0-9]+)$',
		user_is_staff(UpdateView.as_view(
			model = Parcel,
			form_class = ParcelAdminForm,
Beispiel #22
0
from django.contrib.auth.decorators import login_required
from django.db.models import Count, Q, Sum
from django.views.generic import ListView, DeleteView, CreateView, UpdateView, TemplateView

from invoice.forms import OfferForm
from sponsor.views import SponsorCreateView, SponsorUpdateView, SponsorEmailingView, sponsorMailPreview, SponsorContactResetEmailView, loadResponseInfoFromRT, ParcelCreateView, ParcelUpdateView
from sponsor.forms import SponsorContactForm, SponsorPackageForm
from sponsor.models import Sponsoring, SponsoringParticipants, SponsorContact, SponsorPackage, SponsorParcel
from sponsor.helpers import sponsor_filesanitize

from sabot.views import ParticipantsView, OwnerSettingCreateView, PermCheckUpdateView, EmailOutputView, XMLListView, MultipleListView, PropertySetterView, PermCheckPropertySetterView, PermCheckSimpleDeleteView, ArchiveCreatorView, PermCheckDeleteView, PermCheckDetailView
from sabot.decorators import user_is_staff

urlpatterns = patterns('',
	url(r'^new/(?P<pk>[0-9]+)$',
		user_is_staff(SponsorCreateView.as_view()), name="sponsor_new"),
	url(r'^(?P<pk>[0-9]+)/?$',
		login_required(SponsorUpdateView.as_view()), name="sponsor_update"),
	url(r'^(?P<pk>[0-9]+)/participants$',
		login_required(ParticipantsView.as_view(
			object_class = Sponsoring,
			connection_table_class = SponsoringParticipants,
			template_name = "sponsor/participants.html")),
		name="sponsor_participants"),
	url(r'^(?P<pk>[0-9]+)/overview$',
		login_required(PermCheckDetailView.as_view(
			model = Sponsoring,
			template_name = "sponsor/overview.html")),
		name="sponsor_overview"),
	url(r'^(?P<pk>[0-9]+)/faq$',
		login_required(TemplateView.as_view(
Beispiel #23
0
from parcel.forms import ParcelAdminForm
from parcel.models import Parcel
from parcel.views import queryParcelOwners, packageQuickStore
from sabot.decorators import user_is_finance, user_is_staff
from sabot.multiYear import getActiveYear, YSCreateView
from sabot.views import MultipleListView
from sponsor.models import Sponsoring

urlpatterns = [
    url(r'^list/?',
        user_is_staff(
            MultipleListView.as_view(template_params={
                "object_list":
                lambda req, kwargs: Sponsoring.objects.filter(
                    year=getActiveYear(req)).select_related(),
                "parcel_list":
                lambda req, kwargs: Parcel.objects.filter(year=getActiveYear(
                    req)).select_related(),
            },
                                     template_name="parcel/admin/list.html")),
        name="parcel_list"),
    url(r'^new',
        user_is_staff(
            YSCreateView.as_view(model=Parcel,
                                 form_class=ParcelAdminForm,
                                 template_name="parcel/admin/update.html",
                                 success_url="parcel_list")),
        name="parcel_new"),
    url(r'^(?P<pk>[0-9]+)$',
        user_is_staff(
            UpdateView.as_view(model=Parcel,
Beispiel #24
0
from account.views import TokenLoginView, UserProfileView, ActivateAndSetPWView, GenerateAuthTokenView
from account.forms import RegistrationFormNameAndUniqueEmail
from account.models import UserProfile


urlpatterns = [
	url(r'^token/(?P<token>[0-9a-z]+)$', TokenLoginView.as_view(), name="auth_token"),
	url(r'^profile$', login_required(UserProfileView.as_view()), name="auth_user_profile"),
	url(r'^activatepw/(?P<activation_key>\w+)/$', ActivateAndSetPWView.as_view(), name="auth_activate_pw"),
	url(r'^register/?$', RegistrationView.as_view(
							form_class=RegistrationFormNameAndUniqueEmail),
						name = "auth_register_with_name"),
	# staff pages
	url(r'^list+projects/?$',
		user_is_staff(ListView.as_view(
			model = User,
			template_name = "registration/userAffiliation.html")),
		name = "auth_user_affil"),
	url(r'^list/?$',
		user_is_staff(ListView.as_view(
			model = User,
			template_name = "registration/userList.html")),
		name = "auth_user_list"),
	url(r'^(?P<pk>\d+)/makestaff$',
		user_is_staff(PropertySetterView.as_view(
			model = User,
			property_name = "is_staff",
			property_value = True,
			next_view = "auth_user_list")),
		name = "auth_user_makestaff"),
	url(r'^(?P<pk>\d+)/revokestaff$',
Beispiel #25
0
from django.views.generic import ListView

from invoice import views
from invoice.models import Invoice
from sabot.decorators import user_is_finance, user_is_staff
from sabot.multiYear import getActiveYear
from sabot.views import PropertySetterView, MultipleListView, ObjectFileDownloader
from sponsor.models import Sponsoring

urlpatterns = [
	url(r"^invoices$",
		user_is_staff(MultipleListView.as_view(
			template_params = {
				"object_list" : lambda req, kwargs : Sponsoring.objects.select_related().filter(
					year=getActiveYear(req),
					commitment=True,
					clearedForBilling=True
				),
				"today" : lambda req, kwargs : datetime.date.today(),
			},
			template_name = "invoice/invoices.html")),
		name = "invoice_overview"),
	url(r"^create/(?P<spk>\d+)$",
		user_is_finance(views.InvoiceCreateUpdateView.as_view(
			next_view="invoice_overview")),
		name = "invoice_create"),
	url(r"^downloadinvoice/(?P<pk>\d+)$",
		user_is_staff(ObjectFileDownloader.as_view(
			model = Invoice,
			upload_field = "pdf",
			content_type = "application/pdf")),
		name = "invoice_download"),