diff --git a/.gitignore b/.gitignore index 1e5f322..916e04e 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ # Python cache: __pycache__/ # Tests: -.coverage \ No newline at end of file +.coverage +*.sqlite3 \ No newline at end of file diff --git a/src/django_project/asgi.py b/src/django_project/asgi.py new file mode 100644 index 0000000..ef05464 --- /dev/null +++ b/src/django_project/asgi.py @@ -0,0 +1,12 @@ +""" +For more information on this file, see +https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_project.settings') + +application = get_asgi_application() diff --git a/src/django_project/settings.py b/src/django_project/settings.py index 7c0dcb7..7bc1817 100644 --- a/src/django_project/settings.py +++ b/src/django_project/settings.py @@ -31,6 +31,7 @@ ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ + 'django_stockfin_db', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', diff --git a/src/django_project/wsgi.py b/src/django_project/wsgi.py new file mode 100644 index 0000000..f56cf19 --- /dev/null +++ b/src/django_project/wsgi.py @@ -0,0 +1,12 @@ +""" +For more information on this file, see +https://docs.djangoproject.com/en/4.0/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_project.settings') + +application = get_wsgi_application() diff --git a/src/django_stockfin_db/admin.py b/src/django_stockfin_db/admin.py index 8c38f3f..2f83493 100644 --- a/src/django_stockfin_db/admin.py +++ b/src/django_stockfin_db/admin.py @@ -1,3 +1,8 @@ from django.contrib import admin -# Register your models here. +from django_stockfin_db.models import FinancialPosition + + +@admin.register(FinancialPosition) +class FinancialPositionAdmin(admin.ModelAdmin): + pass diff --git a/src/django_stockfin_db/models.py b/src/django_stockfin_db/models.py index 861494f..bbc1fc3 100644 --- a/src/django_stockfin_db/models.py +++ b/src/django_stockfin_db/models.py @@ -84,6 +84,7 @@ class CompanyName(AbstractBaseModel): on_delete=CASCADE ) name = CharField( + max_length=1024, db_index=True, verbose_name=_("Name") )