django server settings

This commit is contained in:
Maximilian Fajnberg 2022-01-02 16:55:40 +01:00
parent df31c1aa49
commit 84879b89d1
6 changed files with 34 additions and 2 deletions

3
.gitignore vendored
View File

@ -8,4 +8,5 @@
# Python cache:
__pycache__/
# Tests:
.coverage
.coverage
*.sqlite3

View File

@ -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()

View File

@ -31,6 +31,7 @@ ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'django_stockfin_db',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',

View File

@ -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()

View File

@ -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

View File

@ -84,6 +84,7 @@ class CompanyName(AbstractBaseModel):
on_delete=CASCADE
)
name = CharField(
max_length=1024,
db_index=True,
verbose_name=_("Name")
)