From 868510857e033e5a84318119c7fd5a24628a94dd Mon Sep 17 00:00:00 2001 From: mdrio Date: Tue, 9 May 2017 14:50:32 +0200 Subject: [PATCH 1/2] removed migrations --- src/most/web/authentication/migrations/__init__.py | 0 src/most/web/exams/migrations/__init__.py | 0 src/most/web/users/migrations/0001_initial.py | 87 ----------- src/most/web/users/migrations/__init__.py | 0 src/provider/oauth2/migrations/0001_initial.py | 153 ------------------- .../migrations/0002_auto__chg_field_client_user.py | 101 ------------- .../migrations/0003_auto__add_field_client_name.py | 102 ------------- ...n_created__add_field_accesstoken_modified__a.py | 166 --------------------- .../0005_auto__chg_field_redirect_uri.py | 98 ------------ .../0006_auto__add_index_accesstoken_token.py | 106 ------------- .../migrations/0007_auto__allow_null_users.py | 118 --------------- src/provider/oauth2/migrations/__init__.py | 0 12 files changed, 931 deletions(-) delete mode 100644 src/most/web/authentication/migrations/__init__.py delete mode 100644 src/most/web/exams/migrations/__init__.py delete mode 100644 src/most/web/users/migrations/0001_initial.py delete mode 100644 src/most/web/users/migrations/__init__.py delete mode 100644 src/provider/oauth2/migrations/0001_initial.py delete mode 100644 src/provider/oauth2/migrations/0002_auto__chg_field_client_user.py delete mode 100644 src/provider/oauth2/migrations/0003_auto__add_field_client_name.py delete mode 100644 src/provider/oauth2/migrations/0004_auto__add_field_accesstoken_created__add_field_accesstoken_modified__a.py delete mode 100644 src/provider/oauth2/migrations/0005_auto__chg_field_redirect_uri.py delete mode 100644 src/provider/oauth2/migrations/0006_auto__add_index_accesstoken_token.py delete mode 100644 src/provider/oauth2/migrations/0007_auto__allow_null_users.py delete mode 100644 src/provider/oauth2/migrations/__init__.py diff --git a/src/most/web/authentication/migrations/__init__.py b/src/most/web/authentication/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/most/web/exams/migrations/__init__.py b/src/most/web/exams/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/most/web/users/migrations/0001_initial.py b/src/most/web/users/migrations/0001_initial.py deleted file mode 100644 index ef0101a..0000000 --- a/src/most/web/users/migrations/0001_initial.py +++ /dev/null @@ -1,87 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import models, migrations -import most.web.utils -import django.utils.timezone -from django.conf import settings - - -class Migration(migrations.Migration): - - dependencies = [ - ('auth', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='MostUser', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('password', models.CharField(max_length=128, verbose_name='password')), - ('last_login', models.DateTimeField(default=django.utils.timezone.now, verbose_name='last login')), - ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')), - ('username', models.CharField(unique=True, max_length=30, verbose_name='Username')), - ('email', models.EmailField(max_length=255, verbose_name='User email address')), - ('first_name', models.CharField(max_length=50, verbose_name='User first name')), - ('last_name', models.CharField(max_length=50, verbose_name='User last name')), - ('date_joined', models.DateTimeField(auto_now_add=True)), - ('is_active', models.BooleanField(default=True, verbose_name='Is the user active?')), - ('is_staff', models.BooleanField(default=True, verbose_name='Is the user staff?')), - ('birth_date', models.DateField(null=True, verbose_name='User birth date', blank=True)), - ('is_admin', models.BooleanField(default=False, verbose_name='Is the user superuser?')), - ('uuid', models.CharField(default=most.web.utils.pkgen, unique=True, max_length=40)), - ('numeric_password', models.CharField(help_text='5 numbers code', max_length=5, null=True, verbose_name='Numeric password', blank=True)), - ('user_type', models.CharField(default=b'ST', max_length=2, verbose_name='User type', choices=[(b'AD', 'Administrative'), (b'TE', 'Technician'), (b'CL', 'Clinician'), (b'ST', 'Student')])), - ('gender', models.CharField(default=b'U', max_length=1, verbose_name='Gender', choices=[(b'M', 'Male'), (b'F', 'Female'), (b'U', 'Unknown')])), - ('phone', models.CharField(max_length=20, null=True, verbose_name='Phone', blank=True)), - ('mobile', models.CharField(max_length=20, null=True, verbose_name='Mobile phone', blank=True)), - ('certified_email', models.EmailField(max_length=75, null=True, verbose_name='Certified email', blank=True)), - ('creation_timestamp', models.DateTimeField(auto_now_add=True)), - ('last_modified_timestamp', models.DateTimeField(auto_now=True)), - ('groups', models.ManyToManyField(related_query_name='user', related_name='user_set', to='auth.Group', blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of his/her group.', verbose_name='groups')), - ('user_permissions', models.ManyToManyField(related_query_name='user', related_name='user_set', to='auth.Permission', blank=True, help_text='Specific permissions for this user.', verbose_name='user permissions')), - ], - options={ - 'abstract': False, - }, - bases=(models.Model,), - ), - migrations.CreateModel( - name='ClinicianUser', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('clinician_type', models.CharField(max_length=2, verbose_name='Clinician type', choices=[(b'DR', 'Doctor'), (b'OP', 'Operator')])), - ('specialization', models.CharField(max_length=50, null=True, verbose_name='Clinical specialization', blank=True)), - ('is_health_care_provider', models.BooleanField(default=True, verbose_name='Is health care provider?')), - ('user', models.ForeignKey(related_name='clinician_related', to=settings.AUTH_USER_MODEL, unique=True)), - ], - options={ - 'db_table': 'most_clinician_user', - 'verbose_name': 'Clinician User', - 'verbose_name_plural': 'Clinician Users', - }, - bases=(models.Model,), - ), - migrations.CreateModel( - name='TaskGroup', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('name', models.CharField(unique=True, max_length=100, verbose_name='Name')), - ('description', models.CharField(help_text='e.g. "Pediatric Cardiology"', max_length=100, verbose_name='Description')), - ('task_group_type', models.CharField(max_length=2, verbose_name='Task group type', choices=[(b'SP', b'Service Provider'), (b'HF', b'Health Care Facility')])), - ('hospital', models.CharField(default=None, max_length=100, null=True, verbose_name='Hospital', blank=True)), - ('is_health_care_provider', models.BooleanField(default=True, verbose_name='Is health care provider?')), - ('is_active', models.BooleanField(default=True, verbose_name='Is active?')), - ('uuid', models.CharField(default=most.web.utils.pkgen, unique=True, max_length=40)), - ('related_task_groups', models.ManyToManyField(related_name='specialist_task_group', null=True, to='users.TaskGroup', blank=True)), - ('users', models.ManyToManyField(related_name='task_group_related', null=True, verbose_name='MOST Users', to=settings.AUTH_USER_MODEL, blank=True)), - ], - options={ - 'db_table': 'most_task_group', - 'verbose_name': 'Task Group', - 'verbose_name_plural': 'Task Groups', - }, - bases=(models.Model,), - ), - ] diff --git a/src/most/web/users/migrations/__init__.py b/src/most/web/users/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/provider/oauth2/migrations/0001_initial.py b/src/provider/oauth2/migrations/0001_initial.py deleted file mode 100644 index 52797bf..0000000 --- a/src/provider/oauth2/migrations/0001_initial.py +++ /dev/null @@ -1,153 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -from provider.compat import user_model_label - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding model 'Client' - db.create_table('oauth2_client', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm[user_model_label])), - ('url', self.gf('django.db.models.fields.URLField')(max_length=200)), - ('redirect_uri', self.gf('django.db.models.fields.URLField')(max_length=200)), - ('client_id', self.gf('django.db.models.fields.CharField')(default='37b581bdc702c732aa65', max_length=255)), - ('client_secret', self.gf('django.db.models.fields.CharField')(default='5cf90561f7566aa81457f8a32187dcb8147c7b73', max_length=255)), - ('client_type', self.gf('django.db.models.fields.IntegerField')()), - )) - db.send_create_signal('oauth2', ['Client']) - - # Adding model 'Grant' - db.create_table('oauth2_grant', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm[user_model_label])), - ('client', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['oauth2.Client'])), - ('code', self.gf('django.db.models.fields.CharField')(default='f0cda1a5f4ae915431ff93f477c012b38e2429c4', max_length=255)), - ('expires', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2012, 2, 8, 10, 43, 45, 620301))), - ('redirect_uri', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)), - ('scope', self.gf('django.db.models.fields.IntegerField')(default=0)), - )) - db.send_create_signal('oauth2', ['Grant']) - - # Adding model 'AccessToken' - db.create_table('oauth2_accesstoken', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm[user_model_label])), - ('token', self.gf('django.db.models.fields.CharField')(default='b10b8f721e95117cb13c', max_length=255)), - ('client', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['oauth2.Client'])), - ('expires', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2013, 2, 7, 10, 33, 45, 618854))), - ('scope', self.gf('django.db.models.fields.IntegerField')(default=0)), - )) - db.send_create_signal('oauth2', ['AccessToken']) - - # Adding model 'RefreshToken' - db.create_table('oauth2_refreshtoken', ( - ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), - ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm[user_model_label])), - ('token', self.gf('django.db.models.fields.CharField')(default='84035a870dab7c820c2c501fb0b10f86fdf7a3fe', max_length=255)), - ('access_token', self.gf('django.db.models.fields.related.OneToOneField')(related_name='refresh_token', unique=True, to=orm['oauth2.AccessToken'])), - ('client', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['oauth2.Client'])), - ('expired', self.gf('django.db.models.fields.BooleanField')(default=False)), - )) - db.send_create_signal('oauth2', ['RefreshToken']) - - - def backwards(self, orm): - - # Deleting model 'Client' - db.delete_table('oauth2_client') - - # Deleting model 'Grant' - db.delete_table('oauth2_grant') - - # Deleting model 'AccessToken' - db.delete_table('oauth2_accesstoken') - - # Deleting model 'RefreshToken' - db.delete_table('oauth2_refreshtoken') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - user_model_label: { - 'Meta': {'object_name': user_model_label.split('.')[-1]}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'oauth2.accesstoken': { - 'Meta': {'object_name': 'AccessToken'}, - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['oauth2.Client']"}), - 'expires': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 2, 7, 10, 33, 45, 624553)'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'scope': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'token': ('django.db.models.fields.CharField', [], {'default': "'d5c1f65020ebdc89f20c'", 'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % user_model_label}) - }, - 'oauth2.client': { - 'Meta': {'object_name': 'Client'}, - 'client_id': ('django.db.models.fields.CharField', [], {'default': "'306fb26cbcc87dd33cdb'", 'max_length': '255'}), - 'client_secret': ('django.db.models.fields.CharField', [], {'default': "'7e5785add4898448d53767f15373636b918cf0e3'", 'max_length': '255'}), - 'client_type': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'redirect_uri': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % user_model_label}) - }, - 'oauth2.grant': { - 'Meta': {'object_name': 'Grant'}, - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['oauth2.Client']"}), - 'code': ('django.db.models.fields.CharField', [], {'default': "'310b2c63e27306ecf5307569dd62340cc4994b73'", 'max_length': '255'}), - 'expires': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 8, 10, 43, 45, 625956)'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'redirect_uri': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'scope': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % user_model_label}) - }, - 'oauth2.refreshtoken': { - 'Meta': {'object_name': 'RefreshToken'}, - 'access_token': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'refresh_token'", 'unique': 'True', 'to': "orm['oauth2.AccessToken']"}), - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['oauth2.Client']"}), - 'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'token': ('django.db.models.fields.CharField', [], {'default': "'ef0ab76037f17769ab2975a816e8f41a1c11d25e'", 'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % user_model_label}) - } - } - - complete_apps = ['oauth2'] diff --git a/src/provider/oauth2/migrations/0002_auto__chg_field_client_user.py b/src/provider/oauth2/migrations/0002_auto__chg_field_client_user.py deleted file mode 100644 index eab4fa5..0000000 --- a/src/provider/oauth2/migrations/0002_auto__chg_field_client_user.py +++ /dev/null @@ -1,101 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -from provider.compat import user_model_label - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'Client.user' - db.alter_column('oauth2_client', 'user_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm[user_model_label], null=True)) - - - def backwards(self, orm): - - # User chose to not deal with backwards NULL issues for 'Client.user' - raise RuntimeError("Cannot reverse this migration. 'Client.user' and its values cannot be restored.") - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - user_model_label: { - 'Meta': {'object_name': user_model_label.split('.')[-1]}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'oauth2.accesstoken': { - 'Meta': {'object_name': 'AccessToken'}, - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['oauth2.Client']"}), - 'expires': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 2, 7, 10, 34, 7, 491068)'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'scope': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'token': ('django.db.models.fields.CharField', [], {'default': "'ed2ee3f5209076916309'", 'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % user_model_label}) - }, - 'oauth2.client': { - 'Meta': {'object_name': 'Client'}, - 'client_id': ('django.db.models.fields.CharField', [], {'default': "'b1f489e6693d6ba20770'", 'max_length': '255'}), - 'client_secret': ('django.db.models.fields.CharField', [], {'default': "'ac43f96040354c910c8e57a4952d9a8e92f83555'", 'max_length': '255'}), - 'client_type': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'redirect_uri': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % user_model_label, 'null': 'True', 'blank': 'True'}) - }, - 'oauth2.grant': { - 'Meta': {'object_name': 'Grant'}, - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['oauth2.Client']"}), - 'code': ('django.db.models.fields.CharField', [], {'default': "'d62c4606c1d7743b59480a85bf8a691aec67df0a'", 'max_length': '255'}), - 'expires': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 8, 10, 44, 7, 492506)'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'redirect_uri': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'scope': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % user_model_label}) - }, - 'oauth2.refreshtoken': { - 'Meta': {'object_name': 'RefreshToken'}, - 'access_token': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'refresh_token'", 'unique': 'True', 'to': "orm['oauth2.AccessToken']"}), - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['oauth2.Client']"}), - 'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'token': ('django.db.models.fields.CharField', [], {'default': "'9b79a016e6b5220883d0d576f34bcbee29ce36b1'", 'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % user_model_label}) - } - } - - complete_apps = ['oauth2'] diff --git a/src/provider/oauth2/migrations/0003_auto__add_field_client_name.py b/src/provider/oauth2/migrations/0003_auto__add_field_client_name.py deleted file mode 100644 index 3280407..0000000 --- a/src/provider/oauth2/migrations/0003_auto__add_field_client_name.py +++ /dev/null @@ -1,102 +0,0 @@ -# encoding: utf-8 -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -from provider.compat import user_model_label - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Adding field 'Client.name' - db.add_column('oauth2_client', 'name', self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True), keep_default=False) - - - def backwards(self, orm): - - # Deleting field 'Client.name' - db.delete_column('oauth2_client', 'name') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - user_model_label: { - 'Meta': {'object_name': user_model_label.split('.')[-1]}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'oauth2.accesstoken': { - 'Meta': {'object_name': 'AccessToken'}, - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['oauth2.Client']"}), - 'expires': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 2, 7, 10, 40, 0, 790902)'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'scope': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'token': ('django.db.models.fields.CharField', [], {'default': "'d9373f4d09149181e1c5'", 'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % user_model_label}) - }, - 'oauth2.client': { - 'Meta': {'object_name': 'Client'}, - 'client_id': ('django.db.models.fields.CharField', [], {'default': "'00385d74e0b239deac42'", 'max_length': '255'}), - 'client_secret': ('django.db.models.fields.CharField', [], {'default': "'460de077126ccc746473f8b2afab6a8aef9f542a'", 'max_length': '255'}), - 'client_type': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'redirect_uri': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % user_model_label, 'null': 'True', 'blank': 'True'}) - }, - 'oauth2.grant': { - 'Meta': {'object_name': 'Grant'}, - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['oauth2.Client']"}), - 'code': ('django.db.models.fields.CharField', [], {'default': "'ae889a1d0fc0c8569b47a7037c3d2da5cb7d0d43'", 'max_length': '255'}), - 'expires': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 8, 10, 50, 0, 788579)'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'redirect_uri': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'scope': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % user_model_label}) - }, - 'oauth2.refreshtoken': { - 'Meta': {'object_name': 'RefreshToken'}, - 'access_token': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'refresh_token'", 'unique': 'True', 'to': "orm['oauth2.AccessToken']"}), - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['oauth2.Client']"}), - 'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'token': ('django.db.models.fields.CharField', [], {'default': "'50d5f3e805e02073364c4ebfc55a94328afe25bd'", 'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['%s']" % user_model_label}) - } - } - - complete_apps = ['oauth2'] diff --git a/src/provider/oauth2/migrations/0004_auto__add_field_accesstoken_created__add_field_accesstoken_modified__a.py b/src/provider/oauth2/migrations/0004_auto__add_field_accesstoken_created__add_field_accesstoken_modified__a.py deleted file mode 100644 index 2730dd5..0000000 --- a/src/provider/oauth2/migrations/0004_auto__add_field_accesstoken_created__add_field_accesstoken_modified__a.py +++ /dev/null @@ -1,166 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -from provider.compat import user_model_label - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding field 'AccessToken.created' - db.add_column('oauth2_accesstoken', 'created', - self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, auto_now_add=True, null=True, blank=True), - keep_default=False) - - # Adding field 'AccessToken.modified' - db.add_column('oauth2_accesstoken', 'modified', - self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, auto_now=True, null=True, blank=True), - keep_default=False) - - # Adding field 'Client.created' - db.add_column('oauth2_client', 'created', - self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, auto_now_add=True, null=True, blank=True), - keep_default=False) - - # Adding field 'Client.modified' - db.add_column('oauth2_client', 'modified', - self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, auto_now=True, null=True, blank=True), - keep_default=False) - - # Adding field 'RefreshToken.created' - db.add_column('oauth2_refreshtoken', 'created', - self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, auto_now_add=True, null=True, blank=True), - keep_default=False) - - # Adding field 'RefreshToken.modified' - db.add_column('oauth2_refreshtoken', 'modified', - self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, auto_now=True, null=True, blank=True), - keep_default=False) - - # Adding field 'Grant.created' - db.add_column('oauth2_grant', 'created', - self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, auto_now_add=True, null=True, blank=True), - keep_default=False) - - # Adding field 'Grant.modified' - db.add_column('oauth2_grant', 'modified', - self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now, auto_now=True, null=True, blank=True), - keep_default=False) - - - def backwards(self, orm): - # Deleting field 'AccessToken.created' - db.delete_column('oauth2_accesstoken', 'created') - - # Deleting field 'AccessToken.modified' - db.delete_column('oauth2_accesstoken', 'modified') - - # Deleting field 'Client.created' - db.delete_column('oauth2_client', 'created') - - # Deleting field 'Client.modified' - db.delete_column('oauth2_client', 'modified') - - # Deleting field 'RefreshToken.created' - db.delete_column('oauth2_refreshtoken', 'created') - - # Deleting field 'RefreshToken.modified' - db.delete_column('oauth2_refreshtoken', 'modified') - - # Deleting field 'Grant.created' - db.delete_column('oauth2_grant', 'created') - - # Deleting field 'Grant.modified' - db.delete_column('oauth2_grant', 'modified') - - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - user_model_label: { - 'Meta': {'object_name': user_model_label.split('.')[-1]}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'oauth2.accesstoken': { - 'Meta': {'object_name': 'AccessToken'}, - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['oauth2.Client']"}), - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'expires': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 1, 12, 0, 0)'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'null': 'True', 'blank': 'True'}), - 'scope': ('django.db.models.fields.IntegerField', [], {'default': '2'}), - 'token': ('django.db.models.fields.CharField', [], {'default': "'78c91610e54cf3eae7158552d68f407c76c7b001'", 'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'oauth2.client': { - 'Meta': {'object_name': 'Client'}, - 'client_id': ('django.db.models.fields.CharField', [], {'default': "'b9067d76f0f2c265ed4b'", 'max_length': '255'}), - 'client_secret': ('django.db.models.fields.CharField', [], {'default': "'9cafed6ab0bc5ca06a276475f8232f1beea6bef7'", 'max_length': '255'}), - 'client_type': ('django.db.models.fields.IntegerField', [], {}), - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'null': 'True', 'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'redirect_uri': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'oauth2_client'", 'null': 'True', 'to': "orm['auth.User']"}) - }, - 'oauth2.grant': { - 'Meta': {'object_name': 'Grant'}, - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['oauth2.Client']"}), - 'code': ('django.db.models.fields.CharField', [], {'default': "'e70adc880e03fc75d9fe3c3487237ad5a16aa146'", 'max_length': '255'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'expires': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 11, 13, 0, 0)'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'null': 'True', 'blank': 'True'}), - 'redirect_uri': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'scope': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'oauth2.refreshtoken': { - 'Meta': {'object_name': 'RefreshToken'}, - 'access_token': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'refresh_token'", 'unique': 'True', 'to': "orm['oauth2.AccessToken']"}), - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['oauth2.Client']"}), - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}), - 'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'auto_now': 'True', 'null': 'True', 'blank': 'True'}), - 'token': ('django.db.models.fields.CharField', [], {'default': "'f9798e71d48fee1252a18eed7bb27300966622c1'", 'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['oauth2'] \ No newline at end of file diff --git a/src/provider/oauth2/migrations/0005_auto__chg_field_redirect_uri.py b/src/provider/oauth2/migrations/0005_auto__chg_field_redirect_uri.py deleted file mode 100644 index 799d417..0000000 --- a/src/provider/oauth2/migrations/0005_auto__chg_field_redirect_uri.py +++ /dev/null @@ -1,98 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - -from provider.compat import user_model_label - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Changing field 'Client.redirect_uri' - db.alter_column('oauth2_client', 'redirect_uri', self.gf('django.db.models.fields.TextField')()) - - def backwards(self, orm): - # Changing field 'Client.redirect_uri' - db.alter_column('oauth2_client', 'redirect_uri', self.gf('django.db.models.fields.URLField')(max_length=200)) - - models = { - 'auth.group': { - 'Meta': {'object_name': 'Group'}, - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - 'auth.permission': { - 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - user_model_label: { - 'Meta': {'object_name': user_model_label.split('.')[-1]}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - 'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - 'oauth2.accesstoken': { - 'Meta': {'object_name': 'AccessToken'}, - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['oauth2.Client']"}), - 'expires': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 1, 12, 0, 0)'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'scope': ('django.db.models.fields.IntegerField', [], {'default': '2'}), - 'token': ('django.db.models.fields.CharField', [], {'default': "'87c85bc889d7541395f63f1c8244818dc80f6e00'", 'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'oauth2.client': { - 'Meta': {'object_name': 'Client'}, - 'client_id': ('django.db.models.fields.CharField', [], {'default': "'8c5aaa32c25f94cb8d93'", 'max_length': '255'}), - 'client_secret': ('django.db.models.fields.CharField', [], {'default': "'ee822b8b3ce8f2228e2d73d2bd923fc95cae00fd'", 'max_length': '255'}), - 'client_type': ('django.db.models.fields.IntegerField', [], {}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'redirect_uri': ('django.db.models.fields.TextField', [], {}), - 'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'oauth2_client'", 'null': 'True', 'to': "orm['auth.User']"}) - }, - 'oauth2.grant': { - 'Meta': {'object_name': 'Grant'}, - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['oauth2.Client']"}), - 'code': ('django.db.models.fields.CharField', [], {'default': "'8918930615a81c12fc19496d6abfbb75723e6848'", 'max_length': '255'}), - 'expires': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 11, 13, 0, 0)'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'redirect_uri': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'scope': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - }, - 'oauth2.refreshtoken': { - 'Meta': {'object_name': 'RefreshToken'}, - 'access_token': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'refresh_token'", 'unique': 'True', 'to': "orm['oauth2.AccessToken']"}), - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['oauth2.Client']"}), - 'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'token': ('django.db.models.fields.CharField', [], {'default': "'b20035ed4485dcdae8887100ed991ab1fcf004de'", 'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) - } - } - - complete_apps = ['oauth2'] \ No newline at end of file diff --git a/src/provider/oauth2/migrations/0006_auto__add_index_accesstoken_token.py b/src/provider/oauth2/migrations/0006_auto__add_index_accesstoken_token.py deleted file mode 100644 index 3adafd4..0000000 --- a/src/provider/oauth2/migrations/0006_auto__add_index_accesstoken_token.py +++ /dev/null @@ -1,106 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - # Adding index on 'AccessToken', fields ['token'] - db.create_index('oauth2_accesstoken', ['token']) - - - def backwards(self, orm): - # Removing index on 'AccessToken', fields ['token'] - db.delete_index('oauth2_accesstoken', ['token']) - - - models = { - u'auth.group': { - 'Meta': {'object_name': 'Group'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - u'auth.permission': { - 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - u'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - u'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - u'oauth2.accesstoken': { - 'Meta': {'object_name': 'AccessToken'}, - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['oauth2.Client']"}), - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'expires': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 5, 8, 0, 0)'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}), - 'scope': ('django.db.models.fields.IntegerField', [], {'default': '2'}), - 'token': ('django.db.models.fields.CharField', [], {'default': "'979003d8d743eb64135d1dad2ad372430449556a'", 'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) - }, - u'oauth2.client': { - 'Meta': {'object_name': 'Client'}, - 'client_id': ('django.db.models.fields.CharField', [], {'default': "'54f70d27bc9a34274912'", 'max_length': '255'}), - 'client_secret': ('django.db.models.fields.CharField', [], {'default': "'e8af8c741ad0b3d2ff9e3fad5a15c97777a15291'", 'max_length': '255'}), - 'client_type': ('django.db.models.fields.IntegerField', [], {}), - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'redirect_uri': ('django.db.models.fields.TextField', [], {}), - 'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'oauth2_client'", 'null': 'True', 'to': u"orm['auth.User']"}) - }, - u'oauth2.grant': { - 'Meta': {'object_name': 'Grant'}, - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['oauth2.Client']"}), - 'code': ('django.db.models.fields.CharField', [], {'default': "'8e8e3c363074130f350af47f2b7b7b4411af44bb'", 'max_length': '255'}), - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'expires': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 4, 8, 0, 0)'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}), - 'redirect_uri': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'scope': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) - }, - u'oauth2.refreshtoken': { - 'Meta': {'object_name': 'RefreshToken'}, - 'access_token': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'refresh_token'", 'unique': 'True', 'to': u"orm['oauth2.AccessToken']"}), - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['oauth2.Client']"}), - 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}), - 'token': ('django.db.models.fields.CharField', [], {'default': "'b2e06b03ceb3120782a5288e38bee72af7263fa5'", 'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}) - } - } - - complete_apps = ['oauth2'] \ No newline at end of file diff --git a/src/provider/oauth2/migrations/0007_auto__allow_null_users.py b/src/provider/oauth2/migrations/0007_auto__allow_null_users.py deleted file mode 100644 index a098a77..0000000 --- a/src/provider/oauth2/migrations/0007_auto__allow_null_users.py +++ /dev/null @@ -1,118 +0,0 @@ -# -*- coding: utf-8 -*- -from south.utils import datetime_utils as datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - - # Changing field 'AccessToken.user' - db.alter_column(u'oauth2_accesstoken', 'user_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True)) - - # Changing field 'RefreshToken.user' - db.alter_column(u'oauth2_refreshtoken', 'user_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True)) - - # Changing field 'Grant.user' - db.alter_column(u'oauth2_grant', 'user_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'], null=True)) - - def backwards(self, orm): - - # Changing field 'AccessToken.user' - db.alter_column(u'oauth2_accesstoken', 'user_id', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['auth.User'])) - - # Changing field 'RefreshToken.user' - db.alter_column(u'oauth2_refreshtoken', 'user_id', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['auth.User'])) - - # Changing field 'Grant.user' - db.alter_column(u'oauth2_grant', 'user_id', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['auth.User'])) - - models = { - u'auth.group': { - 'Meta': {'object_name': 'Group'}, - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), - 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) - }, - u'auth.permission': { - 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, - 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) - }, - u'auth.user': { - 'Meta': {'object_name': 'User'}, - 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), - 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), - 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), - 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), - 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), - 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), - 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) - }, - u'contenttypes.contenttype': { - 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, - 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) - }, - u'oauth2.accesstoken': { - 'Meta': {'object_name': 'AccessToken'}, - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['oauth2.Client']"}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'expires': ('django.db.models.fields.DateTimeField', [], {}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified_at': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}), - 'scope': ('django.db.models.fields.IntegerField', [], {'default': '2'}), - 'token': ('django.db.models.fields.CharField', [], {'default': "'ba5fdf293185440fabeee8bd927c8ef8cf2f4e09'", 'max_length': '255', 'db_index': 'True'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}) - }, - u'oauth2.client': { - 'Meta': {'object_name': 'Client'}, - 'client_id': ('django.db.models.fields.CharField', [], {'default': "'2130c9b4be2a97365fe1'", 'max_length': '255'}), - 'client_secret': ('django.db.models.fields.CharField', [], {'default': "'d06115dfc3696c8172304d542daa2e965a870613'", 'max_length': '255'}), - 'client_type': ('django.db.models.fields.IntegerField', [], {}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified_at': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}), - 'name': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'redirect_uri': ('django.db.models.fields.TextField', [], {}), - 'url': ('django.db.models.fields.URLField', [], {'max_length': '200'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'oauth2_client'", 'null': 'True', 'to': u"orm['auth.User']"}) - }, - u'oauth2.grant': { - 'Meta': {'object_name': 'Grant'}, - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['oauth2.Client']"}), - 'code': ('django.db.models.fields.CharField', [], {'default': "'823cf72ae2632fe53c27e0cee395ab63f1906568'", 'max_length': '255'}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'expires': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2014, 3, 25, 0, 0)'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified_at': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}), - 'redirect_uri': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), - 'scope': ('django.db.models.fields.IntegerField', [], {'default': '0'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}) - }, - u'oauth2.refreshtoken': { - 'Meta': {'object_name': 'RefreshToken'}, - 'access_token': ('django.db.models.fields.related.OneToOneField', [], {'related_name': "'refresh_token'", 'unique': 'True', 'to': u"orm['oauth2.AccessToken']"}), - 'client': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['oauth2.Client']"}), - 'created_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now', 'blank': 'True'}), - 'expired': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), - u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), - 'modified_at': ('django.db.models.fields.DateTimeField', [], {'blank': 'True'}), - 'token': ('django.db.models.fields.CharField', [], {'default': "'12486a6374498a730fcd4716d32fc604d5eca0bf'", 'max_length': '255'}), - 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}) - } - } - - complete_apps = ['oauth2'] \ No newline at end of file diff --git a/src/provider/oauth2/migrations/__init__.py b/src/provider/oauth2/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 From 59e8e6c964647360c3c9a5ec2246a0ca3c1f3bcb Mon Sep 17 00:00:00 2001 From: Vittorio Meloni Date: Wed, 10 May 2017 15:56:16 +0200 Subject: [PATCH 2/2] Changed documentation --- docs/source/authentication/authentication.rst | 37 ++++++++++++++++- docs/source/conf.py | 4 +- docs/source/most-web-APIs.rst | 60 +++++++++++++-------------- docs/source/users/clinician_user/apis.rst | 10 ++--- docs/source/users/most_user/apis.rst | 16 +++---- docs/source/users/task_group/apis.rst | 34 +++++++-------- 6 files changed, 98 insertions(+), 63 deletions(-) diff --git a/docs/source/authentication/authentication.rst b/docs/source/authentication/authentication.rst index 4b083d4..de5126c 100644 --- a/docs/source/authentication/authentication.rst +++ b/docs/source/authentication/authentication.rst @@ -1,2 +1,37 @@ Authentication -~~~~ \ No newline at end of file +============== + +Authentication is performed using OAuth2 protocol. The implementation is based on +`django-oauth2-providers `_ Django application so for generale +documentation overview refer to the official documentation. Here we only explain the difference of the MOST implementation. + +MOST implementation requires also the *taskgroup* field to get an access_token in the REST call. + +REST API +******** + +.. http:post:: /oauth2/access_token/ + + It authenticates the client providing an access token which can be used in subsequent REST calls. + The request data are: + + * client_id: the id of an OAuth2 client as configured in database + * client_secret: the client secret, + * grant_type: password|pincode, + * username: the username, + * password|pincode: the password or the pincode depending on the grant_type value, + * taskgroup: the id of the taskgroup of the user + + :reqheader Content-Type: application/json + :resheader Content-Type: application/json + + **Example of correct response** + + .. sourcecode:: json + + {"access_token": "25735f2de89eff6fa7576b7f8ca5efb952a23ef7", + "expires_in": 31535999, + "refresh_token": "e2a310b568aba5f92bf8683715f862b98b1d714d", + "scope": "read", + "token_type": "Bearer" + } diff --git a/docs/source/conf.py b/docs/source/conf.py index e05bd86..06b4ad2 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -44,9 +44,9 @@ 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', - 'sphinx.ext.pngmath', + 'sphinx.ext.imgmath', 'sphinx.ext.viewcode', - 'sphinx_http_domain', + 'sphinxcontrib.httpdomain', ] # Add any paths that contain templates here, relative to this directory. diff --git a/docs/source/most-web-APIs.rst b/docs/source/most-web-APIs.rst index 176baba..5ffa380 100644 --- a/docs/source/most-web-APIs.rst +++ b/docs/source/most-web-APIs.rst @@ -119,7 +119,7 @@ API Methods MostUser ```````` - .. http:method:: POST /users/user/new/ + .. http:post:: /users/user/new/ Create new user. @@ -146,7 +146,7 @@ MostUser :parameter json `data`: if success is True, it contains the created user data in json format - .. http:method:: POST /users/user/login/ + .. http:post:: /users/user/login/ Log a user in the system @@ -160,7 +160,7 @@ MostUser :parameter json `data`: if success is True, it contains the logged user data in json format - .. http:method:: GET /users/user/logout/ + .. http:get:: /users/user/logout/ Log a user out of the system @@ -172,7 +172,7 @@ MostUser :parameter str `errors`: an error string that explains the raised problems - .. http:method:: GET /users/user/(user_id)/get_user_info/ + .. http:get:: /users/user/(user_id)/get_user_info/ Get the information of the user identified by `user_id` @@ -185,7 +185,7 @@ MostUser :parameter json `data`: if success is True, it contains the data of user identified by `user_id`, in json format - .. http:method:: GET /users/user/search/ + .. http:get:: /users/user/search/ Get a list of users matching a query string in fields: username, last_name, first_name, email or certified_email @@ -201,7 +201,7 @@ MostUser data of users matching the query string, in json format - .. http:method:: POST /users/user/(user_id)/edit/ + .. http:post:: /users/user/(user_id)/edit/ Edit the information of the user identified by `user_id` @@ -214,7 +214,7 @@ MostUser :parameter json `data`: if success is True, it contains the updated data of user identified by `user_id`, in json format - .. http:method:: POST /users/user/(user_id)/deactivate/ + .. http:post:: /users/user/(user_id)/deactivate/ Deactivate the user identified by `user_id` @@ -227,7 +227,7 @@ MostUser :parameter json `data`: if success is True, it contains the keys `id` (for the user id) and `is_active` (for the activation state): - .. http:method:: POST /users/user/(user_id)/activate/ + .. http:post:: /users/user/(user_id)/activate/ Activate the user identified by `user_id` @@ -243,7 +243,7 @@ MostUser ClinicianUser ````````````` - .. http:method:: POST /users/clinician_user/new/ + .. http:post:: /users/clinician_user/new/ Create new clinician user. @@ -260,7 +260,7 @@ ClinicianUser :parameter json `data`: if success is True, it contains the created user data in json format - .. http:method:: GET /users/clinician_user/(user_id)/is_provider/ + .. http:get:: /users/clinician_user/(user_id)/is_provider/ Investigate if the clinician user, with related user identified by `user_id`, is health care provider @@ -273,7 +273,7 @@ ClinicianUser :parameter json `data`: if success is True, it contains the keys `user_id` (for the related user id) and `is_health_care_provider` (for the health care provider state) - .. http:method:: POST /users/clinician_user/(user_id)/set_provider/ + .. http:post:: /users/clinician_user/(user_id)/set_provider/ Set the clinician user, with related user identified by `user_id`, health care provider state to True @@ -286,7 +286,7 @@ ClinicianUser :parameter json `data`: if success is True, it contains the keys `user_id` (for the related user id) and `is_health_care_provider` (for the health care provider state) - .. http:method:: GET /users/clinician_user/search/ + .. http:get:: /users/clinician_user/search/ Get a list of clinician users matching a query string in fields: username, last_name, first_name, email, certified_email or specialization @@ -302,7 +302,7 @@ ClinicianUser data of clinician users matching the query string, in json format - .. http:method:: GET /users/clinician_user/(user_id)/get_user_info/ + .. http:get:: /users/clinician_user/(user_id)/get_user_info/ Get the information of the clinician user, with related user identified by `user_id` @@ -318,7 +318,7 @@ ClinicianUser TaskGroup ````````` - .. http:method:: POST /users/task_group/new/ + .. http:post:: /users/task_group/new/ Create new task group @@ -339,7 +339,7 @@ TaskGroup :parameter json `data`: if success is True, it contains the created task group data in json format - .. http:method:: GET /users/task_group/search/ + .. http:get:: /users/task_group/search/ Get a list of task group matching a query string in fields: title, description or hospital @@ -355,7 +355,7 @@ TaskGroup data of task groups matching the query string, in json format - .. http:method:: POST /users/task_group/(task_group_id)/edit/ + .. http:post:: /users/task_group/(task_group_id)/edit/ Edit the information of the task group identified by `task_group_id` @@ -369,7 +369,7 @@ TaskGroup - .. http:method:: GET /users/task_group/list_available_states/ + .. http:get:: /users/task_group/list_available_states/ Get a list of available state of activation @@ -382,7 +382,7 @@ TaskGroup :parameter json `data`: if success is True, it contains an array of available activation states in json format - .. http:method:: POST /users/task_group/(task_group_id)/set_active_state/(active_state)/ + .. http:post:: /users/task_group/(task_group_id)/set_active_state/(active_state)/ Set the activation state `active_state` (active or inactive) to the task group identified by `task_group_id` @@ -395,7 +395,7 @@ TaskGroup :parameter json `data`: if success is True, it contains the keys `id` (for the task group id) and `is_active` (for the activation state), in json format - .. http:method:: GET /users/task_group/(task_group_id)/is_provider/ + .. http:get:: /users/task_group/(task_group_id)/is_provider/ Investigate if the task group identified by `task_group_id` is health care provider @@ -408,7 +408,7 @@ TaskGroup :parameter json `data`: if success is True, it contains the keys `id` (for the task group id) and `is_health_care_provider` (for the health care provider state) - .. http:method:: POST /users/task_group/(task_group_id)/set_provider/ + .. http:post:: /users/task_group/(task_group_id)/set_provider/ Set the task group identified by `task_group_id` as health care provider @@ -421,7 +421,7 @@ TaskGroup :parameter json `data`: if success is True, it contains the keys `id` (for the task group id) and `is_active` (for the activation state), in json format - .. http:method:: POST /users/task_group/(task_group_id)/add_user/(user_id)/ + .. http:post:: /users/task_group/(task_group_id)/add_user/(user_id)/ Add the user identified by `user_id` to the task group identified by `task_group_id` @@ -434,7 +434,7 @@ TaskGroup :parameter json `data`: if success is True, it contains the keys `task_group_id` (for the task group id) and `user_id` (for the user just added to the task group), in json format - .. http:method:: POST /users/task_group/(task_group_id)/remove_user/(user_id)/ + .. http:post:: /users/task_group/(task_group_id)/remove_user/(user_id)/ Remove the user identified by `user_id` from the task group identified by `task_group_id` @@ -447,7 +447,7 @@ TaskGroup :parameter json `data`: if success is True, it contains the keys `task_group_id` (for the task group id) and `user_id` (for the user just removed from the task group), in json format - .. http:method:: GET /users/task_group/(task_group_id)/list_users/ + .. http:get:: /users/task_group/(task_group_id)/list_users/ List all users that belong to the task group identified by `task_group_id` @@ -460,7 +460,7 @@ TaskGroup :parameter json `data`: if success is True, it contains an array of data of users that belong to the task group, in json format - .. http:method:: POST /users/task_group/(task_group_id)/add_related_task_group/(related_task_group_id)/ + .. http:post:: /users/task_group/(task_group_id)/add_related_task_group/(related_task_group_id)/ Add the related task group identified by `related_task_group_id` to the task group identified by `task_group_id` @@ -473,7 +473,7 @@ TaskGroup :parameter json `data`: if success is True, it contains the keys `task_group_id` (for the task group id) and `related_task_group_id` (for the related task group just added to the task group), in json format - .. http:method:: POST /users/task_group/(task_group_id)/remove_related_task_group/(related_task_group_id)/ + .. http:post:: /users/task_group/(task_group_id)/remove_related_task_group/(related_task_group_id)/ Remove the related task group identified by `related_task_group_id` from the task group identified by `task_group_id` @@ -486,7 +486,7 @@ TaskGroup :parameter json `data`: if success is True, it contains the keys `task_group_id` (for the task group id) and `related_task_group_id` (for the related task group just removed from the task group), in json format - .. http:method:: GET /users/task_group/(task_group_id)/list_related_task_groups/ + .. http:get:: /users/task_group/(task_group_id)/list_related_task_groups/ List all related task groups that belong to the task group identified by `task_group_id` @@ -499,7 +499,7 @@ TaskGroup :parameter json `data`: if success is True, it contains an array of data of related task groups that belong to the task group, in json format - .. http:method:: GET /users/task_group/(task_group_id)/has_clinicians/ + .. http:get:: /users/task_group/(task_group_id)/has_clinicians/ Investigate if the task group identified by `task_group_id` has clinician users @@ -512,7 +512,7 @@ TaskGroup :parameter json `data`: if success is True, it contains the keys `task_group_id` (for the task group id) and `clinicians_count` (for the number of clinician user that belong to task group) - .. http:method:: GET /users/task_group/(task_group_id)/list_clinicians/ + .. http:get:: /users/task_group/(task_group_id)/list_clinicians/ List all related clinician users that belong to the task group identified by `task_group_id` @@ -525,7 +525,7 @@ TaskGroup :parameter json `data`: if success is True, it contains an array of data of clinician users that belong to the task group, in json format - .. http:method:: GET /users/task_group/(task_group_id)/has_clinician_provider/ + .. http:get:: /users/task_group/(task_group_id)/has_clinician_provider/ Investigate if the task group identified by `task_group_id` has health care provider clinician users @@ -538,7 +538,7 @@ TaskGroup :parameter json `data`: if success is True, it contains the keys `task_group_id` (for the task group id) and `clinicians_count` (for the number of health care provider clinician user that belong to task group) - .. http:method:: GET /users/task_group/(task_group_id)/list_clinician_providers/ + .. http:get:: /users/task_group/(task_group_id)/list_clinician_providers/ List all health care provider clinician users that belong to the task group identified by `task_group_id` diff --git a/docs/source/users/clinician_user/apis.rst b/docs/source/users/clinician_user/apis.rst index 2ec3a76..780f139 100644 --- a/docs/source/users/clinician_user/apis.rst +++ b/docs/source/users/clinician_user/apis.rst @@ -1,7 +1,7 @@ APIs ~~~~ - .. http:method:: POST /users/clinician_user/new/ + .. http:post:: /users/clinician_user/new/ Create new clinician user. @@ -18,7 +18,7 @@ APIs :parameter json `data`: if success is True, it contains the created user data in json format - .. http:method:: GET /users/clinician_user/(user_id)/is_provider/ + .. http:get:: /users/clinician_user/(user_id)/is_provider/ Investigate if the clinician user, with related user identified by `user_id`, is health care provider @@ -31,7 +31,7 @@ APIs :parameter json `data`: if success is True, it contains the keys `user_id` (for the related user id) and `is_health_care_provider` (for the health care provider state) - .. http:method:: POST /users/clinician_user/(user_id)/set_provider/ + .. http:post:: /users/clinician_user/(user_id)/set_provider/ Set the clinician user, with related user identified by `user_id`, health care provider state to True @@ -44,7 +44,7 @@ APIs :parameter json `data`: if success is True, it contains the keys `user_id` (for the related user id) and `is_health_care_provider` (for the health care provider state) - .. http:method:: GET /users/clinician_user/search/ + .. http:get:: /users/clinician_user/search/ Get a list of clinician users matching a query string in fields: username, last_name, first_name, email, certified_email or specialization @@ -60,7 +60,7 @@ APIs data of clinician users matching the query string, in json format - .. http:method:: GET /users/clinician_user/(user_id)/get_user_info/ + .. http:get:: /users/clinician_user/(user_id)/get_user_info/ Get the information of the clinician user, with related user identified by `user_id` diff --git a/docs/source/users/most_user/apis.rst b/docs/source/users/most_user/apis.rst index 55b84ea..a444875 100644 --- a/docs/source/users/most_user/apis.rst +++ b/docs/source/users/most_user/apis.rst @@ -1,7 +1,7 @@ APIs ~~~~ - .. http:method:: POST /users/user/new/ + .. http:post:: /users/user/new/ Create new user. @@ -28,7 +28,7 @@ APIs :parameter json `data`: if success is True, it contains the created user data in json format - .. http:method:: POST /users/user/login/ + .. http:post:: /users/user/login/ Log a user in the system @@ -42,7 +42,7 @@ APIs :parameter json `data`: if success is True, it contains the logged user data in json format - .. http:method:: GET /users/user/logout/ + .. http:get:: /users/user/logout/ Log a user out of the system @@ -54,7 +54,7 @@ APIs :parameter str `errors`: an error string that explains the raised problems - .. http:method:: GET /users/user/(user_id)/get_user_info/ + .. http:get:: /users/user/(user_id)/get_user_info/ Get the information of the user identified by `user_id` @@ -67,7 +67,7 @@ APIs :parameter json `data`: if success is True, it contains the data of user identified by `user_id`, in json format - .. http:method:: GET /users/user/search/ + .. http:get:: /users/user/search/ Get a list of users matching a query string in fields: username, last_name, first_name, email or certified_email @@ -83,7 +83,7 @@ APIs data of users matching the query string, in json format - .. http:method:: POST /users/user/(user_id)/edit/ + .. http:post:: /users/user/(user_id)/edit/ Edit the information of the user identified by `user_id` @@ -96,7 +96,7 @@ APIs :parameter json `data`: if success is True, it contains the updated data of user identified by `user_id`, in json format - .. http:method:: POST /users/user/(user_id)/deactivate/ + .. http:post:: /users/user/(user_id)/deactivate/ Deactivate the user identified by `user_id` @@ -109,7 +109,7 @@ APIs :parameter json `data`: if success is True, it contains the keys `id` (for the user id) and `is_active` (for the activation state): - .. http:method:: POST /users/user/(user_id)/activate/ + .. http:post:: /users/user/(user_id)/activate/ Activate the user identified by `user_id` diff --git a/docs/source/users/task_group/apis.rst b/docs/source/users/task_group/apis.rst index 47414d8..8ca356d 100644 --- a/docs/source/users/task_group/apis.rst +++ b/docs/source/users/task_group/apis.rst @@ -1,7 +1,7 @@ APIs ~~~~ - .. http:method:: POST /users/task_group/new/ + .. http:post:: /users/task_group/new/ Create new task group @@ -22,7 +22,7 @@ APIs :parameter json `data`: if success is True, it contains the created task group data in json format - .. http:method:: GET /users/task_group/search/ + .. http:get:: /users/task_group/search/ Get a list of task group matching a query string in fields: title, description or hospital @@ -38,7 +38,7 @@ APIs data of task groups matching the query string, in json format - .. http:method:: POST /users/task_group/(task_group_id)/edit/ + .. http:post:: /users/task_group/(task_group_id)/edit/ Edit the information of the task group identified by `task_group_id` @@ -52,7 +52,7 @@ APIs - .. http:method:: GET /users/task_group/list_available_states/ + .. http:get:: /users/task_group/list_available_states/ Get a list of available state of activation @@ -65,7 +65,7 @@ APIs :parameter json `data`: if success is True, it contains an array of available activation states in json format - .. http:method:: POST /users/task_group/(task_group_id)/set_active_state/(active_state)/ + .. http:post:: /users/task_group/(task_group_id)/set_active_state/(active_state)/ Set the activation state `active_state` (active or inactive) to the task group identified by `task_group_id` @@ -78,7 +78,7 @@ APIs :parameter json `data`: if success is True, it contains the keys `id` (for the task group id) and `is_active` (for the activation state), in json format - .. http:method:: GET /users/task_group/(task_group_id)/is_provider/ + .. http:get:: /users/task_group/(task_group_id)/is_provider/ Investigate if the task group identified by `task_group_id` is health care provider @@ -91,7 +91,7 @@ APIs :parameter json `data`: if success is True, it contains the keys `id` (for the task group id) and `is_health_care_provider` (for the health care provider state) - .. http:method:: POST /users/task_group/(task_group_id)/set_provider/ + .. http:post:: /users/task_group/(task_group_id)/set_provider/ Set the task group identified by `task_group_id` as health care provider @@ -104,7 +104,7 @@ APIs :parameter json `data`: if success is True, it contains the keys `id` (for the task group id) and `is_active` (for the activation state), in json format - .. http:method:: POST /users/task_group/(task_group_id)/add_user/(user_id)/ + .. http:post:: /users/task_group/(task_group_id)/add_user/(user_id)/ Add the user identified by `user_id` to the task group identified by `task_group_id` @@ -117,7 +117,7 @@ APIs :parameter json `data`: if success is True, it contains the keys `task_group_id` (for the task group id) and `user_id` (for the user just added to the task group), in json format - .. http:method:: POST /users/task_group/(task_group_id)/remove_user/(user_id)/ + .. http:post:: /users/task_group/(task_group_id)/remove_user/(user_id)/ Remove the user identified by `user_id` from the task group identified by `task_group_id` @@ -130,7 +130,7 @@ APIs :parameter json `data`: if success is True, it contains the keys `task_group_id` (for the task group id) and `user_id` (for the user just removed from the task group), in json format - .. http:method:: GET /users/task_group/(task_group_id)/list_users/ + .. http:get:: /users/task_group/(task_group_id)/list_users/ List all users that belong to the task group identified by `task_group_id` @@ -143,7 +143,7 @@ APIs :parameter json `data`: if success is True, it contains an array of data of users that belong to the task group, in json format - .. http:method:: POST /users/task_group/(task_group_id)/add_related_task_group/(related_task_group_id)/ + .. http:post:: /users/task_group/(task_group_id)/add_related_task_group/(related_task_group_id)/ Add the related task group identified by `related_task_group_id` to the task group identified by `task_group_id` @@ -156,7 +156,7 @@ APIs :parameter json `data`: if success is True, it contains the keys `task_group_id` (for the task group id) and `related_task_group_id` (for the related task group just added to the task group), in json format - .. http:method:: POST /users/task_group/(task_group_id)/remove_related_task_group/(related_task_group_id)/ + .. http:post:: /users/task_group/(task_group_id)/remove_related_task_group/(related_task_group_id)/ Remove the related task group identified by `related_task_group_id` from the task group identified by `task_group_id` @@ -169,7 +169,7 @@ APIs :parameter json `data`: if success is True, it contains the keys `task_group_id` (for the task group id) and `related_task_group_id` (for the related task group just removed from the task group), in json format - .. http:method:: GET /users/task_group/(task_group_id)/list_related_task_groups/ + .. http:get:: /users/task_group/(task_group_id)/list_related_task_groups/ List all related task groups that belong to the task group identified by `task_group_id` @@ -182,7 +182,7 @@ APIs :parameter json `data`: if success is True, it contains an array of data of related task groups that belong to the task group, in json format - .. http:method:: GET /users/task_group/(task_group_id)/has_clinicians/ + .. http:get:: /users/task_group/(task_group_id)/has_clinicians/ Investigate if the task group identified by `task_group_id` has clinician users @@ -195,7 +195,7 @@ APIs :parameter json `data`: if success is True, it contains the keys `task_group_id` (for the task group id) and `clinicians_count` (for the number of clinician user that belong to task group) - .. http:method:: GET /users/task_group/(task_group_id)/list_clinicians/ + .. http:get:: /users/task_group/(task_group_id)/list_clinicians/ List all related clinician users that belong to the task group identified by `task_group_id` @@ -208,7 +208,7 @@ APIs :parameter json `data`: if success is True, it contains an array of data of clinician users that belong to the task group, in json format - .. http:method:: GET /users/task_group/(task_group_id)/has_clinician_provider/ + .. http:get:: /users/task_group/(task_group_id)/has_clinician_provider/ Investigate if the task group identified by `task_group_id` has health care provider clinician users @@ -221,7 +221,7 @@ APIs :parameter json `data`: if success is True, it contains the keys `task_group_id` (for the task group id) and `clinicians_count` (for the number of health care provider clinician user that belong to task group) - .. http:method:: GET /users/task_group/(task_group_id)/list_clinician_providers/ + .. http:get:: /users/task_group/(task_group_id)/list_clinician_providers/ List all health care provider clinician users that belong to the task group identified by `task_group_id`