remove old config migrations
authorrougeronj
Wed, 10 Jun 2015 12:14:04 +0200
changeset 150 78e82bf8ff89
parent 149 8e117699857a
child 151 5f5fe16b076f
remove old config migrations update import path (ammico to ammicosrv.ammico) move wsgi to be next to manage.py
server/ammicosrv/ammico/serializers/ammico.py
server/ammicosrv/ammico/serializers/extractors.py
server/ammicosrv/ammico/urls.py
server/ammicosrv/ammico/views.py
server/ammicosrv/authentication/views.py
server/ammicosrv/wsgi.py
server/src/ammico/migrations/0001_initial.py
server/src/authentication/migrations/0001_initial.py
server/wsgi.py
--- a/server/ammicosrv/ammico/serializers/ammico.py	Wed Jun 10 10:57:27 2015 +0200
+++ b/server/ammicosrv/ammico/serializers/ammico.py	Wed Jun 10 12:14:04 2015 +0200
@@ -1,8 +1,8 @@
 from rest_framework import serializers
 
-from ammico.models import Book, Slide
-from ammico.serializers.extractors import extractFromMIMO, extractFromJameSpot
-from ammico.serializers.taggit import TaggitSerializer, TagListSerializerField
+from ammicosrv.ammico.models import Book, Slide
+from ammicosrv.ammico.serializers.extractors import extractFromMIMO, extractFromJameSpot
+from ammicosrv.ammico.serializers.taggit import TaggitSerializer, TagListSerializerField
 
 
 class BookSerializer(serializers.ModelSerializer):
--- a/server/ammicosrv/ammico/serializers/extractors.py	Wed Jun 10 10:57:27 2015 +0200
+++ b/server/ammicosrv/ammico/serializers/extractors.py	Wed Jun 10 12:14:04 2015 +0200
@@ -4,7 +4,7 @@
 import requests
 import xmltodict
 
-from ammico.utils import fetchJson, MyHTMLParser
+from ammicosrv.ammico.utils import fetchJson, MyHTMLParser
 
 
 def extractFromMIMO(slide):
--- a/server/ammicosrv/ammico/urls.py	Wed Jun 10 10:57:27 2015 +0200
+++ b/server/ammicosrv/ammico/urls.py	Wed Jun 10 12:14:04 2015 +0200
@@ -1,6 +1,6 @@
 from django.conf.urls import patterns, url, include
 
-from ammicosrv.views import ListBooks, InfoBook, ListSlides, InfoSlide, SlidesOrder, PublicBooks, AmmicoView, api_root
+from ammicosrv.ammico.views import ListBooks, InfoBook, ListSlides, InfoSlide, SlidesOrder, PublicBooks, AmmicoView, api_root
 
 
 urlpatterns = patterns('',
@@ -12,7 +12,7 @@
     url(r'^public', PublicBooks.as_view(), name='publicBooks'),
     url(r'^slides$', ListSlides.as_view(), name='slides'),
     url(r'^slides/(?P<idSlide>[0-9]+)$', InfoSlide.as_view(), name='slide'),
-    url(r'^auth/', include('authentication.urls', namespace="authentication")),
+    url(r'^auth/', include('ammicosrv.authentication.urls', namespace="authentication")),
     
     url(r'^$', api_root, name='api-root'),
 )
--- a/server/ammicosrv/ammico/views.py	Wed Jun 10 10:57:27 2015 +0200
+++ b/server/ammicosrv/ammico/views.py	Wed Jun 10 12:14:04 2015 +0200
@@ -20,8 +20,8 @@
 from rest_framework.response import Response
 from rest_framework.views import APIView
 
-from ammicosrv.models import Book, Slide, Exposition
-from ammicosrv.serializers.ammico import BookSerializer, SlideSerializer
+from ammicosrv.ammico.models import Book, Slide, Exposition
+from ammicosrv.ammico.serializers.ammico import BookSerializer, SlideSerializer
 
 
 #from django.contrib.auth import login, logout
--- a/server/ammicosrv/authentication/views.py	Wed Jun 10 10:57:27 2015 +0200
+++ b/server/ammicosrv/authentication/views.py	Wed Jun 10 12:14:04 2015 +0200
@@ -8,8 +8,8 @@
 from rest_framework.response import Response
 from rest_framework.views import APIView
 
-from config import URL_JAMESPOT
 from ammicosrv.ammico.views import populateVisit
+from django.conf import settings
 
 
 #from ammico.views import populateVisit
@@ -36,7 +36,7 @@
             user_data = {field: data for (field, data) in request.DATA.items() if field in VALID_USER_FIELDS}
             
             params = {'o': 'user', 'f': 'get', 'mail': user_data['email']}
-            r = requests.get(URL_JAMESPOT, params=params)
+            r = requests.get(settings.URL_JAMESPOT, params=params)
             infoUser = json.loads(r.content.decode('utf-8'))
             if ('idUser' in infoUser['VAL']):
                 user_data.update({"idUser":infoUser['VAL']['idUser']})
--- a/server/ammicosrv/wsgi.py	Wed Jun 10 10:57:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-"""
-WSGI config for ammico project.
-
-It exposes the WSGI callable as a module-level variable named ``application``.
-
-For more information on this file, see
-https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
-"""
-
-import os
-os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ammicosrv.settings.dev")
-
-from django.core.wsgi import get_wsgi_application
-application = get_wsgi_application()
--- a/server/src/ammico/migrations/0001_initial.py	Wed Jun 10 10:57:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from django.db import models, migrations
-import taggit.managers
-import datetime
-from django.conf import settings
-
-
-class Migration(migrations.Migration):
-
-    dependencies = [
-        ('taggit', '0001_initial'),
-        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
-    ]
-
-    operations = [
-        migrations.CreateModel(
-            name='Book',
-            fields=[
-                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
-                ('id_article', models.CharField(blank=True, null=True, max_length=512)),
-                ('title', models.CharField(blank=True, max_length=512)),
-                ('description', models.CharField(blank=True, null=True, max_length=512)),
-                ('image', models.URLField(blank=True, max_length=2048)),
-                ('date', models.DateTimeField(default=datetime.datetime.now)),
-                ('public', models.BooleanField(default=False, db_index=True)),
-            ],
-            options={
-            },
-            bases=(models.Model,),
-        ),
-        migrations.CreateModel(
-            name='Exposition',
-            fields=[
-                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
-                ('title', models.CharField(blank=True, max_length=512)),
-                ('description', models.CharField(blank=True, max_length=1024)),
-                ('url_exalead', models.URLField(blank=True, max_length=2048)),
-                ('url_orpheo', models.URLField(blank=True, max_length=2048)),
-                ('url_jamespot', models.URLField(blank=True, max_length=2048)),
-                ('active', models.BooleanField(default=True, db_index=True)),
-            ],
-            options={
-            },
-            bases=(models.Model,),
-        ),
-        migrations.CreateModel(
-            name='Slide',
-            fields=[
-                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
-                ('id_stop', models.CharField(blank=True, max_length=512)),
-                ('id_inventory', models.CharField(blank=True, max_length=512)),
-                ('title', models.CharField(blank=True, max_length=512)),
-                ('description', models.CharField(blank=True, max_length=1024)),
-                ('image', models.URLField(blank=True, max_length=2048)),
-                ('date', models.DateTimeField(default=datetime.datetime.now)),
-                ('favorite', models.BooleanField(default=False, db_index=True)),
-                ('book', models.ForeignKey(related_name='slides', to='ammico.Book')),
-                ('tags', taggit.managers.TaggableManager(blank=True, to='taggit.Tag', through='taggit.TaggedItem', verbose_name='Tags', help_text='A comma-separated list of tags.')),
-            ],
-            options={
-            },
-            bases=(models.Model,),
-        ),
-        migrations.AlterOrderWithRespectTo(
-            name='slide',
-            order_with_respect_to='book',
-        ),
-        migrations.AddField(
-            model_name='book',
-            name='exposition',
-            field=models.ForeignKey(related_name='exposition', to='ammico.Exposition'),
-            preserve_default=True,
-        ),
-        migrations.AddField(
-            model_name='book',
-            name='parent_visit',
-            field=models.ForeignKey(blank=True, null=True, to='ammico.Book', related_name='books_copy'),
-            preserve_default=True,
-        ),
-        migrations.AddField(
-            model_name='book',
-            name='user',
-            field=models.ForeignKey(related_name='books', to=settings.AUTH_USER_MODEL),
-            preserve_default=True,
-        ),
-    ]
--- a/server/src/authentication/migrations/0001_initial.py	Wed Jun 10 10:57:27 2015 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-# -*- coding: utf-8 -*-
-from __future__ import unicode_literals
-
-from django.db import models, migrations
-from django.conf import settings
-import django.utils.timezone
-
-
-class Migration(migrations.Migration):
-
-    dependencies = [
-    ]
-
-    operations = [
-        migrations.CreateModel(
-            name='AmmicoUser',
-            fields=[
-                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
-                ('password', models.CharField(verbose_name='password', max_length=128)),
-                ('last_login', models.DateTimeField(default=django.utils.timezone.now, verbose_name='last login')),
-                ('email', models.EmailField(verbose_name='email address', unique=True, max_length=255)),
-                ('idUser', models.IntegerField(blank=True, verbose_name='identifiant utilisateur', null=True)),
-                ('is_active', models.BooleanField(default=True)),
-                ('is_admin', models.BooleanField(default=False)),
-            ],
-            options={
-                'abstract': False,
-            },
-            bases=(models.Model,),
-        ),
-        migrations.CreateModel(
-            name='Profile',
-            fields=[
-                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
-                ('image', models.URLField(blank=True, max_length=2048)),
-                ('user', models.OneToOneField(to=settings.AUTH_USER_MODEL)),
-            ],
-            options={
-            },
-            bases=(models.Model,),
-        ),
-    ]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/server/wsgi.py	Wed Jun 10 12:14:04 2015 +0200
@@ -0,0 +1,14 @@
+"""
+WSGI config for ammico project.
+
+It exposes the WSGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
+"""
+
+import os
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ammicosrv.settings.dev")
+
+from django.core.wsgi import get_wsgi_application
+application = get_wsgi_application()