From baef7e4aa89326f4f1fee068fe50767aa2cbc7cd Mon Sep 17 00:00:00 2001 From: Tomislav R Date: Wed, 16 Mar 2016 00:26:49 +0100 Subject: [PATCH] fixed requirements --- digitalglarus/migrations/0001_initial.py | 28 +++-- dynamicweb/settings/base.py | 83 +++++++------ hosting/migrations/0001_initial.py | 14 +++ hosting/migrations/0002_railsbetauser.py | 25 ++++ hosting/migrations/__init__.py | 0 membership/models.py | 7 +- membership/tests.py | 12 +- membership/urls.py | 10 +- requirements.txt | 148 +++++++---------------- requirements_old.txt | 102 ++++++++++++++++ 10 files changed, 265 insertions(+), 164 deletions(-) create mode 100644 hosting/migrations/0001_initial.py create mode 100644 hosting/migrations/0002_railsbetauser.py create mode 100644 hosting/migrations/__init__.py create mode 100644 requirements_old.txt diff --git a/digitalglarus/migrations/0001_initial.py b/digitalglarus/migrations/0001_initial.py index c07db037..b16e747f 100644 --- a/digitalglarus/migrations/0001_initial.py +++ b/digitalglarus/migrations/0001_initial.py @@ -1,14 +1,18 @@ # -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2016-03-13 21:39 from __future__ import unicode_literals from django.db import migrations, models +import django.db.models.deletion import filer.fields.image class Migration(migrations.Migration): + initial = True + dependencies = [ - ('filer', '0003_auto_20160306_2306'), + ('filer', '0002_auto_20150606_2003'), ('cms', '0013_urlconfrevision'), ] @@ -16,9 +20,9 @@ class Migration(migrations.Migration): migrations.CreateModel( name='DGGallery', fields=[ - ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=30)), - ('parent', models.ForeignKey(null=True, to='digitalglarus.DGGallery', blank=True)), + ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='digitalglarus.DGGallery')), ], options={ 'verbose_name_plural': 'dgGallery', @@ -27,8 +31,8 @@ class Migration(migrations.Migration): migrations.CreateModel( name='DGGalleryPlugin', fields=[ - ('cmsplugin_ptr', models.OneToOneField(primary_key=True, serialize=False, to='cms.CMSPlugin', auto_created=True, parent_link=True)), - ('dgGallery', models.ForeignKey(to='digitalglarus.DGGallery')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='cms.CMSPlugin')), + ('dgGallery', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='digitalglarus.DGGallery')), ], options={ 'abstract': False, @@ -38,16 +42,16 @@ class Migration(migrations.Migration): migrations.CreateModel( name='DGPicture', fields=[ - ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('description', models.CharField(max_length=60)), - ('gallery', models.ForeignKey(to='digitalglarus.DGGallery')), - ('image', filer.fields.image.FilerImageField(related_name='dg_gallery', to='filer.Image')), + ('gallery', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='digitalglarus.DGGallery')), + ('image', filer.fields.image.FilerImageField(on_delete=django.db.models.deletion.CASCADE, related_name='dg_gallery', to='filer.Image')), ], ), migrations.CreateModel( name='DGSupportersPlugin', fields=[ - ('cmsplugin_ptr', models.OneToOneField(primary_key=True, serialize=False, to='cms.CMSPlugin', auto_created=True, parent_link=True)), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='cms.CMSPlugin')), ], options={ 'abstract': False, @@ -57,7 +61,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Message', fields=[ - ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=200)), ('email', models.EmailField(max_length=254)), ('phone_number', models.CharField(max_length=200)), @@ -68,9 +72,9 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Supporter', fields=[ - ('id', models.AutoField(primary_key=True, serialize=False, verbose_name='ID', auto_created=True)), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=200)), - ('description', models.TextField(null=True, blank=True)), + ('description', models.TextField(blank=True, null=True)), ], ), ] diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index 89aad881..0f3a9e56 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -46,12 +46,21 @@ SECRET_KEY = env('DJANGO_SECRET_KEY') # Application definition INSTALLED_APPS = ( + #1st migrate 'membership', + 'easy_thumbnails', + 'mptt', + 'parler', + 'taggit', + 'taggit_autosuggest', + 'django_select2', + 'meta', + 'meta_mixin', + 'bootstrap3', + 'compressor', 'filer', - 'cms', # django CMS itself - 'cmsplugin_filer_image', 'djangocms_blog', - 'djangocms_admin_style', + 'cms', # django CMS itself 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', @@ -60,17 +69,22 @@ INSTALLED_APPS = ( 'django.contrib.staticfiles', 'django.contrib.sites', 'treebeard', # utilities for implementing a tree - 'menus', # helper for model independent hierarchical website navigation 'sekizai', # for javascript and css management + 'menus', # helper for model independent hierarchical website navigation + 'cmsplugin_filer_image', + #2nd migrate # django-cms plugins + 'djangocms_file', + 'djangocms_picture', + 'djangocms_video', 'djangocms_flash', 'djangocms_googlemap', 'djangocms_inherit', 'djangocms_link', - 'djangocms_snippet', 'djangocms_teaser', 'djangocms_page_meta', - # django-filer + 'djangocms_text_ckeditor', + 'djangocms_admin_style', 'cmsplugin_filer_file', 'cmsplugin_filer_folder', 'cmsplugin_filer_link', @@ -78,19 +92,6 @@ INSTALLED_APPS = ( 'cmsplugin_filer_video', # versioning 'reversion', - # ck-editor - 'djangocms_text_ckeditor', - # djangocms-blog - 'easy_thumbnails', - 'parler', - 'taggit', - 'taggit_autosuggest', - 'django_select2', - 'meta', - 'meta_mixin', - 'admin_enhancer', - 'bootstrap3', - 'compressor', # ungleich 'ungleich', 'hosting', @@ -270,30 +271,28 @@ FILE_UPLOAD_PERMISSIONS = 0o644 META_SITE_PROTOCOL = 'http' META_USE_SITES = True - MIGRATION_MODULES = { - # 'cms': 'cms.migrations', + 'cms': 'cms.migrations', # 'filer': 'filer.migrations_django', # 'menus': 'menus.migrations_django', - # 'djangocms_flash': 'djangocms_flash.migrations_django', - # 'djangocms_googlemap': 'djangocms_googlemap.migrations_django', - # 'djangocms_inherit': 'djangocms_inherit.migrations_django', - # 'djangocms_link': 'djangocms_link.migrations_django', - # 'djangocms_snippet': 'djangocms_snippet.migrations_django', - # 'djangocms_teaser': 'djangocms_teaser.migrations_django', - # 'djangocms_column': 'djangocms_column.migrations_django', - # 'djangocms_flash': 'djangocms_flash.migrations_django', - # 'djangocms_googlemap': 'djangocms_googlemap.migrations_django', - # 'djangocms_inherit': 'djangocms_inherit.migrations_django', - # 'djangocms_style': 'djangocms_style.migrations_django', - # 'cmsplugin_filer_image': 'cmsplugin_filer_image.migrations_django', - # 'cmsplugin_filer_file': 'cmsplugin_filer_file.migrations_django', - # 'cmsplugin_filer_folder': 'cmsplugin_filer_folder.migrations_django', - # 'cmsplugin_filer_link': 'cmsplugin_filer_link.migrations_django', - # 'cmsplugin_filer_teaser': 'cmsplugin_filer_teaser.migrations_django', - # 'cmsplugin_filer_utils': 'cmsplugin_filer_utils.migrations_django', - # 'cmsplugin_filer_video': 'cmsplugin_filer_video.migrations_django', - # 'djangocms_text_ckeditor': 'djangocms_text_ckeditor.migrations', + 'djangocms_flash': 'djangocms_flash.migrations_django', + 'djangocms_googlemap': 'djangocms_googlemap.migrations_django', + 'djangocms_inherit': 'djangocms_inherit.migrations_django', + 'djangocms_link': 'djangocms_link.migrations_django', + 'djangocms_teaser': 'djangocms_teaser.migrations_django', + 'djangocms_column': 'djangocms_column.migrations_django', + 'djangocms_flash': 'djangocms_flash.migrations_django', + 'djangocms_googlemap': 'djangocms_googlemap.migrations_django', + 'djangocms_inherit': 'djangocms_inherit.migrations_django', + 'djangocms_style': 'djangocms_style.migrations_django', + 'cmsplugin_filer_image': 'cmsplugin_filer_image.migrations_django', + 'cmsplugin_filer_file': 'cmsplugin_filer_file.migrations_django', + 'cmsplugin_filer_folder': 'cmsplugin_filer_folder.migrations_django', + 'cmsplugin_filer_link': 'cmsplugin_filer_link.migrations_django', + 'cmsplugin_filer_teaser': 'cmsplugin_filer_teaser.migrations_django', + 'cmsplugin_filer_utils': 'cmsplugin_filer_utils.migrations_django', + 'cmsplugin_filer_video': 'cmsplugin_filer_video.migrations_django', + 'djangocms_text_ckeditor': 'djangocms_text_ckeditor.migrations', } STATICFILES_FINDERS = ( @@ -424,3 +423,7 @@ STRIPE_DESCRIPTION_ON_PAYMENT = "Payment for ungleich GmbH services" REGISTRATION_MESSAGE = {'subject': "Validation mail", 'message': 'Please validate Your account under this link http://localhost:8000/en-us/validate/{}', 'from': 'test@test.com'} + + +#dont migrate test +# SOUTH_TESTS_MIGRATE = False diff --git a/hosting/migrations/0001_initial.py b/hosting/migrations/0001_initial.py new file mode 100644 index 00000000..7fb71ea6 --- /dev/null +++ b/hosting/migrations/0001_initial.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2016-03-13 20:58 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ] + + operations = [ + ] diff --git a/hosting/migrations/0002_railsbetauser.py b/hosting/migrations/0002_railsbetauser.py new file mode 100644 index 00000000..b5afa8de --- /dev/null +++ b/hosting/migrations/0002_railsbetauser.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2016-03-13 21:39 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('hosting', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='RailsBetaUser', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('email', models.EmailField(max_length=254, unique=True)), + ('received_date', models.DateTimeField(verbose_name='date received')), + ], + ), + ] diff --git a/hosting/migrations/__init__.py b/hosting/migrations/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/membership/models.py b/membership/models.py index 349c56a0..7c185021 100644 --- a/membership/models.py +++ b/membership/models.py @@ -4,6 +4,7 @@ from django.contrib.auth.models import User, AbstractBaseUser, BaseUserManager from django.contrib.auth.hashers import make_password from django.core.mail import send_mail from django.core.validators import RegexValidator +from django.contrib.auth.models import User REGISTRATION_MESSAGE = {'subject': "Validation mail", 'message': 'Please validate Your account under this link http://localhost:8000/en-us/validate/{}', @@ -13,8 +14,7 @@ REGISTRATION_MESSAGE = {'subject': "Validation mail", class MyUserManager(BaseUserManager): def create_user(self, email, name, password=None): """ - Creates and saves a User with the given email, date of - birth and password. + Creates and saves a User with the given email,name and password. """ if not email: raise ValueError('Users must have an email address') @@ -30,8 +30,7 @@ class MyUserManager(BaseUserManager): def create_superuser(self, email, name, password): """ - Creates and saves a superuser with the given email, date of - birth and password. + Creates and saves a superuser with the given email, name and password. """ user = self.create_user(email, password=password, diff --git a/membership/tests.py b/membership/tests.py index 7ce503c2..f50049ee 100644 --- a/membership/tests.py +++ b/membership/tests.py @@ -1,3 +1,13 @@ -from django.test import TestCase +import unittest +from django.test import TestCase,Client # Create your tests here. +class LoginTestCase(unittest.TestCase): + def test_login(self): + client = Client() + response = client.get("/login") + + + + + diff --git a/membership/urls.py b/membership/urls.py index 4fca7607..d1d1c474 100644 --- a/membership/urls.py +++ b/membership/urls.py @@ -5,9 +5,9 @@ from django.contrib.auth.decorators import login_required from . import views urlpatterns = ( - url(r"^/$", views.LoginRegistrationView.as_view(), name='login'), - url(r"^/validate/(?P.*)/$", views.validate_email), - url(r"^/membership/$", login_required(views.MembershipView.as_view()), name='membership'), - url(r"^/buy/(?P