From f4c373f5a1d758a0032e0c0ff0c7cb97e7d79439 Mon Sep 17 00:00:00 2001 From: EsGeh Date: Tue, 12 Nov 2019 11:01:59 +0100 Subject: [PATCH] python boilerplate to .gitignore, added migrations --- .gitignore | 107 +++++++++++++++++++++- eoaforthcoming/migrations/0001_initial.py | 52 +++++++++++ eoaforthcoming/migrations/__init__.py | 0 3 files changed, 156 insertions(+), 3 deletions(-) create mode 100644 eoaforthcoming/migrations/0001_initial.py create mode 100644 eoaforthcoming/migrations/__init__.py diff --git a/.gitignore b/.gitignore index e3aab5b..894a44c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,104 @@ -/eoaforthcoming/migrations/ -/dist/ -/django_eoaforthcoming.egg-info/ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ diff --git a/eoaforthcoming/migrations/0001_initial.py b/eoaforthcoming/migrations/0001_initial.py new file mode 100644 index 0000000..6b65ae5 --- /dev/null +++ b/eoaforthcoming/migrations/0001_initial.py @@ -0,0 +1,52 @@ +# Generated by Django 2.1.11 on 2019-11-11 17:27 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ('cms', '0022_auto_20180620_1551'), + ] + + operations = [ + migrations.CreateModel( + name='EOAForthcomingListModel', + fields=[ + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='eoaforthcoming_eoaforthcominglistmodel', serialize=False, to='cms.CMSPlugin')), + ], + options={ + 'abstract': False, + }, + bases=('cms.cmsplugin',), + ), + migrations.CreateModel( + name='EOAForthcomingModel', + fields=[ + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='eoaforthcoming_eoaforthcomingmodel', serialize=False, to='cms.CMSPlugin')), + ], + options={ + 'abstract': False, + }, + bases=('cms.cmsplugin',), + ), + migrations.CreateModel( + name='Forthcoming', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=200, unique=True)), + ('series', models.CharField(choices=[('Sources', 'Sources'), ('Studies', 'Studies'), ('Proceedings', 'Proceedings'), ('Textbooks', 'Textbooks')], max_length=20)), + ('author', models.CharField(max_length=200, unique=True)), + ('description', models.CharField(max_length=1000)), + ('cover', models.ImageField(upload_to='eoaforthcoming/images')), + ], + ), + migrations.AddField( + model_name='eoaforthcomingmodel', + name='eoaforthcoming', + field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='eoaforthcoming.Forthcoming'), + ), + ] diff --git a/eoaforthcoming/migrations/__init__.py b/eoaforthcoming/migrations/__init__.py new file mode 100644 index 0000000..e69de29