Merge part of stable/1.5.x into master.

Conflicts:
	openslides/agenda/views.py
	openslides/mediafile/forms.py
	openslides/projector/api.py

The fix from commit 39de1924cb was removed
because of the new widget system in master branch. See GitHub Issue #1191
This commit is contained in:
Norman Jäckel 2014-04-05 15:00:48 +02:00
commit c13c0997bf
9 changed files with 20 additions and 18 deletions

View File

@ -35,6 +35,8 @@ Version 1.5.1 (unreleased)
========================== ==========================
[https://github.com/OpenSlides/OpenSlides/issues?milestone=15] [https://github.com/OpenSlides/OpenSlides/issues?milestone=15]
Agenda:
- Fixed permission error in list of speakers widget.
Participant: Participant:
- Added permission to see participants also to the manager group. - Added permission to see participants also to the manager group.
Files: Files:

View File

@ -26,7 +26,7 @@ Installation on GNU/Linux or Mac OS X
1. Check requirements 1. Check requirements
Make sure that you have installed Python Programming Language 2 (>= 2.6) Make sure that you have installed Python Programming Language 2 (>= 2.6.9)
on your system. You will also need the Python development headers. on your system. You will also need the Python development headers.
For example for Ubuntu run:: For example for Ubuntu run::
@ -77,7 +77,7 @@ portable version you should observe the following install steps.*
1. Check requirements 1. Check requirements
Make sure that you have installed Python Programming Language 2 (>= 2.6) Make sure that you have installed Python Programming Language 2 (>= 2.6.9)
and Setuptools on your system. and Setuptools on your system.
a. Download and run the `Python 32-bit MSI installer a. Download and run the `Python 32-bit MSI installer

View File

@ -68,7 +68,7 @@ class Overview(TemplateView):
if minutes < 10: if minutes < 10:
minutes = "%s%s" % (0, minutes) minutes = "%s%s" % (0, minutes)
item.duration = "%s:%s" % (hours, minutes) item.duration = "%s:%s" % (hours, minutes)
if not start is None: if start is not None:
item.tooltip = start + duration item.tooltip = start + duration
if start is None: if start is None:

View File

@ -184,7 +184,7 @@ class Assignment(SlideMixin, AbsoluteUrlMixin, models.Model):
participants.append(candidate.person) participants.append(candidate.person)
participants.sort(key=lambda person: person.sort_name) participants.sort(key=lambda person: person.sort_name)
return participants return participants
#return candidates.values_list('person', flat=True) # return candidates.values_list('person', flat=True)
def set_elected(self, person, value=True): def set_elected(self, person, value=True):
candidate = self.assignment_candidates.get(person=person) candidate = self.assignment_candidates.get(person=person)

View File

@ -220,7 +220,7 @@ class PollUpdateView(PollFormView):
def get_success_url(self): def get_success_url(self):
return_url = '' return_url = ''
if not 'apply' in self.request.POST: if 'apply' not in self.request.POST:
return_url = reverse('assignment_detail', args=[self.poll.assignment.id]) return_url = reverse('assignment_detail', args=[self.poll.assignment.id])
return return_url return return_url

View File

@ -15,7 +15,7 @@ class MediafileFormMixin(object):
""" """
Method to save the form. Here the override is to delete old files. Method to save the form. Here the override is to delete old files.
""" """
if not self.instance.pk is None: if self.instance.pk is not None:
old_file = Mediafile.objects.get(pk=self.instance.pk).mediafile old_file = Mediafile.objects.get(pk=self.instance.pk).mediafile
if not old_file == self.instance.mediafile: if not old_file == self.instance.mediafile:
old_file.delete() old_file.delete()

View File

@ -73,7 +73,7 @@ class Motion(SlideMixin, AbsoluteUrlMixin, models.Model):
""" """
# TODO: proposal # TODO: proposal
#master = models.ForeignKey('self', null=True, blank=True) # master = models.ForeignKey('self', null=True, blank=True)
class Meta: class Meta:
permissions = ( permissions = (
@ -544,8 +544,8 @@ class MotionVersion(AbsoluteUrlMixin, models.Model):
creation_time = models.DateTimeField(auto_now=True) creation_time = models.DateTimeField(auto_now=True)
"""Time when the version was saved.""" """Time when the version was saved."""
#identifier = models.CharField(max_length=255, verbose_name=ugettext_lazy("Version identifier")) # identifier = models.CharField(max_length=255, verbose_name=ugettext_lazy("Version identifier"))
#note = models.TextField(null=True, blank=True) # note = models.TextField(null=True, blank=True)
class Meta: class Meta:
unique_together = ("motion", "version_number") unique_together = ("motion", "version_number")
@ -633,11 +633,11 @@ class Category(AbsoluteUrlMixin, models.Model):
class Meta: class Meta:
ordering = ['prefix'] ordering = ['prefix']
## class Comment(models.Model): # class Comment(models.Model):
## motion_version = models.ForeignKey(MotionVersion) # motion_version = models.ForeignKey(MotionVersion)
## text = models.TextField() # text = models.TextField()
## author = PersonField() # author = PersonField()
## creation_time = models.DateTimeField(auto_now=True) # creation_time = models.DateTimeField(auto_now=True)
class MotionLog(models.Model): class MotionLog(models.Model):
@ -739,8 +739,8 @@ class MotionPoll(RelatedModelMixin, CollectInvalid, CollectVotesCast,
def set_options(self): def set_options(self):
"""Create the option class for this poll.""" """Create the option class for this poll."""
#TODO: maybe it is possible with .create() to call this without poll=self # TODO: maybe it is possible with .create() to call this without poll=self
# or call this in save() # or call this in save()
self.get_option_class()(poll=self).save() self.get_option_class()(poll=self).save()
def get_related_model(self): def get_related_model(self):

View File

@ -181,7 +181,7 @@ class MotionCreateView(MotionEditMixin, CreateView):
""" """
response = super(MotionCreateView, self).form_valid(form) response = super(MotionCreateView, self).form_valid(form)
self.object.write_log([ugettext_noop('Motion created')], self.request.user) self.object.write_log([ugettext_noop('Motion created')], self.request.user)
if (not 'submitter' in form.cleaned_data or if ('submitter' not in form.cleaned_data or
not form.cleaned_data['submitter']): not form.cleaned_data['submitter']):
self.object.add_submitter(self.request.user) self.object.add_submitter(self.request.user)
return response return response

View File

@ -134,7 +134,7 @@ class GroupForm(forms.ModelForm, CssClassMixin):
# TODO: Check this in clean_users or clean_permissions # TODO: Check this in clean_users or clean_permissions
if (self.request and if (self.request and
not self.request.user.is_superuser and not self.request.user.is_superuser and
not self.request.user in self.cleaned_data['users'] and self.request.user not in self.cleaned_data['users'] and
not Group.objects.exclude(pk=self.instance.pk).filter( not Group.objects.exclude(pk=self.instance.pk).filter(
permissions__in=[get_protected_perm()], permissions__in=[get_protected_perm()],
user__pk=self.request.user.pk).exists()): user__pk=self.request.user.pk).exists()):