Skip to content

Commit

Permalink
Merge pull request #66 from yduman/python-3-port
Browse files Browse the repository at this point in the history
Python 3 port
  • Loading branch information
ckleemann committed Mar 23, 2017
2 parents edd29fa + 39df26f commit 7ec92d2
Show file tree
Hide file tree
Showing 76 changed files with 1,642 additions and 1,227 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
cache: pip

python:
- "2.7"
- "3.6.0"

install:
- pip install -r requirements.txt
Expand Down
8 changes: 4 additions & 4 deletions src/feedback/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

class PersonAdmin(admin.ModelAdmin):
"""Admin View für Personen"""
list_display = ('__unicode__', 'email', 'fachgebiet')
list_display = ('__str__', 'email', 'fachgebiet')
search_fields = ['vorname', 'nachname', 'email', ]
list_filter = ('fachgebiet',)

Expand All @@ -37,8 +37,8 @@ def assign_fachgebiet_action(self, request, queryset):
for person in queryset:
person_id_str = str(person.id)
if person_id_str in selected_persons:
proposed_fachgebiet_id = request.POST.get("fachgebiet_" + person_id_str, 0);
if proposed_fachgebiet_id > 0:
proposed_fachgebiet_id = request.POST.get("fachgebiet_" + person_id_str, 0)
if int(proposed_fachgebiet_id) > 0:
proposed_fachgebiet = Fachgebiet.objects.get(id=proposed_fachgebiet_id)
person.fachgebiet = proposed_fachgebiet
person.save()
Expand Down Expand Up @@ -130,7 +130,7 @@ def status_aendern_action(self, request, queryset):

class SemesterAdmin(admin.ModelAdmin):
"""Admin View für Semester"""
list_display = ('__unicode__', 'sichtbarkeit', 'fragebogen')
list_display = ('__str__', 'sichtbarkeit', 'fragebogen')
list_filter = ('sichtbarkeit', 'fragebogen')
ordering = ('-semester',)

Expand Down
4 changes: 2 additions & 2 deletions src/feedback/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from django.contrib.auth.models import User
from django.contrib.auth.backends import RemoteUserBackend, ModelBackend
from django.contrib.auth.middleware import RemoteUserMiddleware
from django.utils.encoding import smart_unicode
from django.utils.encoding import smart_text

from feedback.models.base import Veranstaltung

Expand Down Expand Up @@ -53,7 +53,7 @@ def clean_username(self, username):
if settings.DEBUG:
credentials = b64decode(username.split()[1])
user = credentials.split(':')[0]
return smart_unicode(user)
return (smart_text(user))
else:
return username

Expand Down
8 changes: 4 additions & 4 deletions src/feedback/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Meta:
def __init__(self, *args, **kwargs):
super(VeranstaltungEvaluationForm, self).__init__(*args, **kwargs)

for k, field in self.fields.items():
for k, field in list(self.fields.items()):
field.required = True


Expand Down Expand Up @@ -60,7 +60,7 @@ def __init__(self, *args, **kwargs):
self.fields['typ'].choices = choices

# Wenn Evaluation oder Vollerhebung, dann sind alle anderen Felder notwendig
for k, field in self.fields.items():
for k, field in list(self.fields.items()):
field.required = True

class Meta:
Expand Down Expand Up @@ -96,7 +96,7 @@ class VeranstaltungDozentDatenForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(VeranstaltungDozentDatenForm, self).__init__(*args, **kwargs)

for k, field in self.fields.items():
for k, field in list(self.fields.items()):
field.required = True

class Meta:
Expand Down Expand Up @@ -166,7 +166,7 @@ def __init__(self, *args, **kwargs):
veranst = kwargs.pop('veranstaltung', None)

if veranst is None:
raise KeyError(u'This form needs an veranstaltung=... parameter to function properly.')
raise KeyError('This form needs an veranstaltung=... parameter to function properly.')

super(KommentarModelForm, self).__init__(*args, **kwargs)
self.fields['autor'].queryset = veranst.veranstalter.all()
Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-02 02:10
from __future__ import unicode_literals


from django.db import migrations, models
import django.db.models.deletion
Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0002_auto_20161002_2250.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-02 22:50
from __future__ import unicode_literals


from django.db import migrations, models
import django.db.models.deletion
Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0003_auto_20161002_2253.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-02 22:53
from __future__ import unicode_literals


from django.db import migrations, models

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0004_auto_20161121_2200.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-21 22:00
from __future__ import unicode_literals


from django.db import migrations, models
import django.db.models.deletion
Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0004_auto_20161122_1951.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-22 19:51
from __future__ import unicode_literals


from django.db import migrations, models
import django.db.models.deletion
Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0005_alternativvorname.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-28 17:43
from __future__ import unicode_literals


from django.db import migrations, models
import django.db.models.deletion
Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0005_merge_20161126_2007.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-26 20:07
from __future__ import unicode_literals


from django.db import migrations

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0006_auto_20161128_1806.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-28 18:06
from __future__ import unicode_literals


from django.db import migrations, models

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0007_merge_20161128_2226.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-28 22:26
from __future__ import unicode_literals


from django.db import migrations

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0007_veranstaltung_status.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-12-01 22:18
from __future__ import unicode_literals


from django.db import migrations, models

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0008_auto_20161204_1713.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-04 17:13
from __future__ import unicode_literals


from django.db import migrations, models
import django.db.models.deletion
Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0008_barcodeallowedstate.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-12-06 09:41
from __future__ import unicode_literals


from django.db import migrations, models
import django.db.models.deletion
Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0009_auto_20161204_1747.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-04 17:47
from __future__ import unicode_literals


from django.db import migrations, models

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0009_auto_20161208_0928.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-12-08 09:28
from __future__ import unicode_literals


from django.db import migrations, models

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0010_veranstaltung_old_status.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-04 18:03
from __future__ import unicode_literals


from django.db import migrations, models

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0011_auto_20161205_1344.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-12-05 13:44
from __future__ import unicode_literals


from django.db import migrations, models

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0012_auto_20161205_2346.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-05 23:46
from __future__ import unicode_literals


from django.db import migrations, models

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0013_auto_20161205_2354.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-05 23:54
from __future__ import unicode_literals


from django.db import migrations, models

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0014_auto_20161206_0000.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-06 00:00
from __future__ import unicode_literals


from django.db import migrations, models

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0015_auto_20161206_0012.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-06 00:12
from __future__ import unicode_literals


from django.db import migrations, models

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0016_merge_20161208_1442.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-08 14:42
from __future__ import unicode_literals


from django.db import migrations

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0017_auto_20161208_1532.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-08 15:32
from __future__ import unicode_literals


from django.db import migrations, models
import django.db.models.deletion
Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0018_auto_20161208_1949.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-08 19:49
from __future__ import unicode_literals


from django.db import migrations

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-08 17:12
from __future__ import unicode_literals


from django.db import migrations, models

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0019_merge_20161209_1404.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-12-09 14:04
from __future__ import unicode_literals


from django.db import migrations

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0020_auto_20161213_2056.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-13 20:56
from __future__ import unicode_literals


from django.conf import settings
from django.db import migrations, models
Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0020_merge_20161209_1436.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-12-09 14:36
from __future__ import unicode_literals


from django.db import migrations

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0021_merge_20161215_1708.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-15 17:08
from __future__ import unicode_literals


from django.db import migrations

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0022_auto_20161223_1621.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-12-23 16:21
from __future__ import unicode_literals


from django.db import migrations, models

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0023_auto_20161224_1714.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-24 17:14
from __future__ import unicode_literals


from django.db import migrations, models
import django.db.models.deletion
Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0024_auto_20161224_1801.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-24 18:01
from __future__ import unicode_literals


from django.db import migrations, models
import django.db.models.deletion
Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0025_auto_20161226_1924.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-26 19:24
from __future__ import unicode_literals


from django.db import migrations, models
import django.db.models.deletion
Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0026_auto_20161226_1957.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-26 19:57
from __future__ import unicode_literals


from django.db import migrations, models
import django.db.models.deletion
Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0027_auto_20161227_1106.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-27 11:06
from __future__ import unicode_literals


from django.db import migrations, models
import django.db.models.deletion
Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0028_auto_20161227_1132.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-27 11:32
from __future__ import unicode_literals


from django.db import migrations, models
import django.db.models.deletion
Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0029_auto_20161227_1258.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-27 12:58
from __future__ import unicode_literals


from django.db import migrations, models

Expand Down
2 changes: 1 addition & 1 deletion src/feedback/migrations/0030_auto_20170108_1300.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-08 13:00
from __future__ import unicode_literals


from django.db import migrations, models

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-15 04:12
from __future__ import unicode_literals


from django.db import migrations, models
import django.db.models.deletion
Expand Down
Loading

0 comments on commit 7ec92d2

Please sign in to comment.