forked from zestedesavoir/zds-site
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Passage à Django 1.8 minimal (il reste plein de warnings mais ça marche)
Impacts directs obligatoires : - Une relation en base change de nom pour être python-compatible (et donc sa migration en base) - On doit maintenant préciser le paramètre --fake-initial lors d'une migration de MAJ (cf https://docs.djangoproject.com/en/1.8/ref/django-admin/#django-admin-option---fake-initial) - Debug Toolbar en v1.3 - Fix pour que oauth fonctionne, cf jazzband/django-oauth-toolkit#204
- Loading branch information
Showing
12 changed files
with
114 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
PyYAML==3.11 | ||
django-debug-toolbar==1.2.2 | ||
django-debug-toolbar==1.3 | ||
flake8==2.3.0 | ||
autopep8==1.1.1 | ||
sphinx==1.2.3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
import oauth2_provider.validators | ||
import oauth2_provider.generators | ||
from django.conf import settings | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='AccessToken', | ||
fields=[ | ||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | ||
('token', models.CharField(max_length=255, db_index=True)), | ||
('expires', models.DateTimeField()), | ||
('scope', models.TextField(blank=True)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Application', | ||
fields=[ | ||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | ||
('client_id', models.CharField(default=oauth2_provider.generators.generate_client_id, unique=True, max_length=100, db_index=True)), | ||
('redirect_uris', models.TextField(help_text='Allowed URIs list, space separated', blank=True, validators=[oauth2_provider.validators.validate_uris])), | ||
('client_type', models.CharField(max_length=32, choices=[('confidential', 'Confidential'), ('public', 'Public')])), | ||
('authorization_grant_type', models.CharField(max_length=32, choices=[('authorization-code', 'Authorization code'), ('implicit', 'Implicit'), ('password', 'Resource owner password-based'), ('client-credentials', 'Client credentials')])), | ||
('client_secret', models.CharField(default=oauth2_provider.generators.generate_client_secret, max_length=255, db_index=True, blank=True)), | ||
('name', models.CharField(max_length=255, blank=True)), | ||
('skip_authorization', models.BooleanField(default=False)), | ||
('user', models.ForeignKey(related_name='oauth2_provider_application', to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Grant', | ||
fields=[ | ||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | ||
('code', models.CharField(max_length=255, db_index=True)), | ||
('expires', models.DateTimeField()), | ||
('redirect_uri', models.CharField(max_length=255)), | ||
('scope', models.TextField(blank=True)), | ||
('application', models.ForeignKey(to=settings.OAUTH2_PROVIDER_APPLICATION_MODEL)), | ||
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='RefreshToken', | ||
fields=[ | ||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), | ||
('token', models.CharField(max_length=255, db_index=True)), | ||
('access_token', models.OneToOneField(related_name='refresh_token', to='oauth2_provider.AccessToken')), | ||
('application', models.ForeignKey(to=settings.OAUTH2_PROVIDER_APPLICATION_MODEL)), | ||
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
migrations.AddField( | ||
model_name='accesstoken', | ||
name='application', | ||
field=models.ForeignKey(to=settings.OAUTH2_PROVIDER_APPLICATION_MODEL), | ||
), | ||
migrations.AddField( | ||
model_name='accesstoken', | ||
name='user', | ||
field=models.ForeignKey(blank=True, to=settings.AUTH_USER_MODEL, null=True), | ||
), | ||
] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
from django.conf import settings | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('utils', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='comment', | ||
name='editor', | ||
field=models.ForeignKey(related_name='comments-editor+', verbose_name=b'Editeur', blank=True, to=settings.AUTH_USER_MODEL, null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters