commit
ece772540f
@ -10,7 +10,7 @@
|
||||
:license: GNU GPL, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from django.conf.urls.defaults import url, patterns
|
||||
from django.conf.urls import url, patterns
|
||||
from openslides.agenda.views import (Overview, View, SetClosed, ItemUpdate,
|
||||
ItemCreate, ItemDelete, AgendaPDF)
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
:license: GNU GPL, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from django.conf.urls.defaults import url, patterns
|
||||
from django.conf.urls import url, patterns
|
||||
|
||||
from openslides.assignment.views import (ViewPoll, AssignmentPDF,
|
||||
AssignmentPollPDF, AssignmentPollDelete, CreateAgendaItem)
|
||||
|
@ -318,7 +318,7 @@ class AssignmentPollDelete(DeleteView):
|
||||
return reverse('assignment_view', args=[self.assignment.id])
|
||||
|
||||
def get_success_message(self):
|
||||
return _('Ballot was successfully deleted.') % self.object
|
||||
return _('Ballot was successfully deleted.') % self.object
|
||||
|
||||
|
||||
class AssignmentPDF(PDFView):
|
||||
|
@ -11,7 +11,7 @@
|
||||
"""
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls.defaults import patterns, url
|
||||
from django.conf.urls import patterns, url
|
||||
from django.utils.importlib import import_module
|
||||
|
||||
from openslides.config.views import GeneralConfig, VersionConfig
|
||||
|
@ -10,7 +10,7 @@
|
||||
:license: GNU GPL, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from django.conf.urls.defaults import url, patterns
|
||||
from django.conf.urls import url, patterns
|
||||
|
||||
from openslides.motion.views import (MotionDelete, ViewPoll,
|
||||
MotionPDF, MotionPollPDF, CreateAgendaItem, SupportView)
|
||||
|
@ -10,7 +10,7 @@
|
||||
:license: GNU GPL, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from django.conf.urls.defaults import url, patterns
|
||||
from django.conf.urls import url, patterns
|
||||
|
||||
from openslides.participant.views import (
|
||||
UserOverview, UserCreateView, UserDetailView, UserUpdateView,
|
||||
|
@ -471,7 +471,7 @@ def login(request):
|
||||
extra_content = {}
|
||||
try:
|
||||
admin = User.objects.get(pk=1)
|
||||
if admin.check_password(admin.default_password):
|
||||
if admin.check_password(admin.default_password):
|
||||
extra_content['first_time_message'] = _(
|
||||
"Installation was successfully! Use %(user)s "
|
||||
"(password: %(password)s) for first login.<br>"
|
||||
|
@ -10,7 +10,7 @@
|
||||
:license: GNU GPL, see LICENSE for more details.
|
||||
"""
|
||||
|
||||
from django.conf.urls.defaults import patterns, url
|
||||
from django.conf.urls import patterns, url
|
||||
|
||||
from openslides.projector.views import (DashboardView, ActivateView,
|
||||
CustomSlideCreateView, CustomSlideUpdateView, CustomSlideDeleteView,
|
||||
|
@ -11,7 +11,7 @@
|
||||
"""
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls.defaults import patterns, url, include
|
||||
from django.conf.urls import patterns, url, include
|
||||
from django.utils.importlib import import_module
|
||||
|
||||
from openslides.utils.views import RedirectView
|
||||
|
@ -15,7 +15,7 @@ from django.template.loader_tags import BlockNode, ExtendsNode
|
||||
|
||||
|
||||
class Tab(object):
|
||||
def __init__(self, title='', url='', permission='', selected=False):
|
||||
def __init__(self, title='', url='', permission=True, selected=False):
|
||||
self.selected = False
|
||||
self.title = title
|
||||
self.permission = permission
|
||||
|
@ -241,6 +241,8 @@ class UpdateView(PermissionMixin, _UpdateView):
|
||||
|
||||
|
||||
class CreateView(PermissionMixin, _CreateView):
|
||||
apply_url = None
|
||||
|
||||
def get_success_url(self):
|
||||
messages.success(self.request, self.get_success_message())
|
||||
if 'apply' in self.request.POST:
|
||||
@ -254,7 +256,11 @@ class CreateView(PermissionMixin, _CreateView):
|
||||
return context
|
||||
|
||||
def get_apply_url(self):
|
||||
return self.apply_url
|
||||
if self.apply_url:
|
||||
return self.apply_url
|
||||
else:
|
||||
raise ImproperlyConfigured(
|
||||
"No URL to redirect to. Provide a apply_url.")
|
||||
|
||||
def form_invalid(self, form):
|
||||
messages.error(self.request, _('Please check the form for errors.'))
|
||||
|
Loading…
Reference in New Issue
Block a user