Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Django 1.11 and all other dependencies #36

Merged
merged 38 commits into from
Aug 16, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
0e27fd8
More prefetches
OdyX Aug 14, 2017
64b8970
Update all requirements
OdyX Aug 14, 2017
7aca16d
Quick-fixes for upgrade
OdyX Aug 14, 2017
b9106a5
Upgrade dev requirements
OdyX Aug 14, 2017
666e038
Remove leftover autocomplete, fix debug bar
OdyX Aug 14, 2017
1880eee
Further orga renaming
OdyX Aug 14, 2017
517ec34
Update to latest django-filters
OdyX Aug 14, 2017
996e3bd
Fix datetimepicker through fixed grablib
OdyX Aug 14, 2017
cfa1053
Style the autocomplete somewhat more
OdyX Aug 16, 2017
eed75b3
Replace with widgets
OdyX Aug 16, 2017
8609390
Reinstate the checkbox as well
OdyX Aug 16, 2017
036348e
Fix exports in User app
OdyX Aug 16, 2017
3e3e4b8
Drop the hurtinq username patching of username that also affects edition
OdyX Aug 16, 2017
fc83c20
Fix StateManager tests
OdyX Aug 16, 2017
2cebf7e
Fix session creation without superleader
OdyX Aug 16, 2017
8a1117b
Fix flake8 superfluous imports
OdyX Aug 16, 2017
336dc4b
Fix last tests
OdyX Aug 16, 2017
10ea352
Autocomplete wind-down
OdyX Aug 14, 2017
cc6e4fb
Rename field organization to orga, for Django 1.9
OdyX Aug 14, 2017
e8f0f55
Comment away deprecated interfaces
OdyX Aug 14, 2017
ae7a257
New rolepermissions layout
OdyX Aug 14, 2017
7bcaebe
Fix URLs
OdyX Aug 14, 2017
0e53240
IBAN migration
OdyX Aug 14, 2017
7484063
Further orga renaming
OdyX Aug 14, 2017
119bdfd
Fix datepicker using our fork
OdyX Aug 15, 2017
a284022
More orga renaming fixes
OdyX Aug 15, 2017
a698e99
Autocomplete fixes
OdyX Aug 15, 2017
ad1ce24
Fix drifter base URL
OdyX Aug 15, 2017
9fd764c
Finish cleaning up orga autocomplete test
OdyX Aug 15, 2017
ca99b53
iSort
OdyX Aug 15, 2017
93aa482
More orga fixes
OdyX Aug 15, 2017
408ebb4
First autocompletes for User
OdyX Aug 15, 2017
4ee56c1
Fix further autocompletes
OdyX Aug 15, 2017
a4cb615
Fix SwissTime picker icon
OdyX Aug 16, 2017
84f8d4f
Flake8
OdyX Aug 16, 2017
beec082
Update tox.ini for py34
OdyX Aug 16, 2017
3117782
Grablib.yml needs to be present
OdyX Aug 16, 2017
86251ac
Replace grablib with submodules
OdyX Aug 16, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
More orga renaming fixes
  • Loading branch information
OdyX committed Aug 15, 2017
commit a2840226ebe50599a51cb7e363bf638d93b7fac0
2 changes: 1 addition & 1 deletion apps/challenge/templates/challenge/session_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ <h1>{% if session %}{% trans "Édition de la session" %}{% else %}{% trans "Nouv
<form method="POST" action="" class="form-horizontal">
{% csrf_token %}
<h3>{% trans "Emplacement" %}</h3>
{% bootstrap_field form.organization layout='horizontal' size='small' %}
{% bootstrap_field form.orga layout='horizontal' size='small' %}
{% bootstrap_field form.day layout='horizontal' size='small' %}
{% bootstrap_field form.begin layout='horizontal' size='small' %}
{% bootstrap_field form.place layout='horizontal' size='small' %}
Expand Down
2 changes: 1 addition & 1 deletion apps/challenge/tests/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ class SessionFactory(DjangoModelFactory):
class Meta:
model = Session

organization = factory.SubFactory(OrganizationFactory)
orga = factory.SubFactory(OrganizationFactory)
day = fuzzy.FuzzyDate(date(2015, 5, 2), date(2015, 6, 30))
16 changes: 8 additions & 8 deletions apps/challenge/tests/test_seasons.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ def setUp(self):
self.sessions = []
for canton in self.mycantons:
s = SessionFactory()
s.organization.address_canton = canton
s.organization.save()
s.orga.address_canton = canton
s.orga.save()
s.save()
self.sessions.append(s)

Expand All @@ -71,8 +71,8 @@ def setUp(self):
self.foreignsessions = []
for canton in self.foreigncantons:
s = SessionFactory()
s.organization.address_canton = canton
s.organization.save()
s.orga.address_canton = canton
s.orga.save()
s.save()
self.foreignsessions.append(s)

Expand Down Expand Up @@ -270,21 +270,21 @@ def test_session_creation(self):
'begin': '09:00',
}

# 200 because we're back on the page, because organization' empty
# 200 because we're back on the page, because orga' empty
response = self.client.post(url, initial)
self.assertEqual(response.status_code, 200, url)

orga = OrganizationFactory(
address_canton=self.foreignseason.cantons[0]
)
initial['organization'] = orga.pk
# 200 because we're back on the page, because organization is not
initial['orga'] = orga.pk
# 200 because we're back on the page, because orga is not
# in our canton
response = self.client.post(url, initial)
self.assertEqual(response.status_code, 200, url)

orga = OrganizationFactory(address_canton=self.season.cantons[0])
initial['organization'] = orga.pk
initial['orga'] = orga.pk
# That works now
response = self.client.post(url, initial)
self.assertEqual(response.status_code, 302, url)
Expand Down
12 changes: 6 additions & 6 deletions apps/challenge/views/season.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,12 @@ def get_dataset(self):
if not session_place:
session_place = (
session.address_city if session.address_city
else session.organization.address_city
else session.orga.address_city
)
col = [
date(session.day),
session.organization.address_canton,
session.organization.name,
session.orga.address_canton,
session.orga.name,
session_place,
'%s - %s' % (time(session.begin), time(session.end)),
session.n_qualifications,
Expand Down Expand Up @@ -389,12 +389,12 @@ def get_dataset(self):
if not session_place:
session_place = (
session.address_city if session.address_city
else session.organization.address_city
else session.orga.address_city
)
col = [
date(session.day),
session.organization.address_canton,
session.organization.name,
session.orga.address_canton,
session.orga.name,
session_place,
'%s - %s' % (time(session.begin), time(session.end)),
session.n_qualifications,
Expand Down
10 changes: 5 additions & 5 deletions apps/challenge/views/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def get_queryset(self):
qs = super(SessionMixin, self).get_queryset()
try:
return qs.filter(
organization__address_canton__in=self.season.cantons
orga__address_canton__in=self.season.cantons
)
except FieldError:
# For the cases qs is Qualification, not Session
Expand Down Expand Up @@ -109,7 +109,7 @@ def get_queryset(self):
return (
super(SessionDetailView, self).get_queryset()
.prefetch_related(
'organization',
'orga',
'qualifications',
'qualifications__leader',
'qualifications__leader__profile',
Expand Down Expand Up @@ -187,12 +187,12 @@ def get_dataset(self):
if not session_place:
session_place = (
session.address_city if session.address_city
else session.organization.address_city
else session.orga.address_city
)
col = [
date(session.day),
session.organization.address_canton,
session.organization.name,
session.orga.address_canton,
session.orga.name,
session_place,
'%s - %s' % (time(session.begin), time(session.end)),
session.n_qualifications,
Expand Down
2 changes: 1 addition & 1 deletion defivelo/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from django.test import Client
from django.utils.translation import activate
from faker import Faker
from rolepermissions.shortcuts import assign_role
from rolepermissions.roles import assign_role

from apps.common import DV_STATES
from apps.user import get_new_username
Expand Down