diff --git a/backend/app_be/models.py b/backend/app_be/models.py index 26811cd..a469ae6 100644 --- a/backend/app_be/models.py +++ b/backend/app_be/models.py @@ -1,15 +1,19 @@ from django.db import models + # Create your models here. class User(models.Model): ... + class Tweet(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) + class Feed(models.Model): url = models.CharField(max_length=100) active = models.BooleanField() + class FeedEntry(models.Model): tweeted = models.BooleanField() diff --git a/backend/app_be/settings.py b/backend/app_be/settings.py index 3cf6265..c4e2414 100644 --- a/backend/app_be/settings.py +++ b/backend/app_be/settings.py @@ -8,12 +8,10 @@ https://docs.djangoproject.com/en/2.0/ref/settings/ import datetime import os - # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) - # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ @@ -63,7 +61,6 @@ REST_FRAMEWORK = { ) } - # configuration of jason web token authentication JWT_AUTH = { 'JWT_VERIFY': True, @@ -113,7 +110,6 @@ TEMPLATES = [ WSGI_APPLICATION = 'app_be.wsgi.application' - # Database # https://docs.djangoproject.com/en/2.0/ref/settings/#databases @@ -214,4 +210,3 @@ LOGGING = { # increase the maximum upload size of files DATA_UPLOAD_MAX_MEMORY_SIZE = 104857600 - diff --git a/docker-compose.yml b/docker-compose.yml index 6ed0968..b916195 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,19 +7,19 @@ services: container_name: waecm_g4_be_container hostname: waecm_g4_be image: pfingstfrosch/waecm-2021-group-04-bsp-1-be -# build: -# context: ./backend -# dockerfile: ./Dockerfile + # build: + # context: ./backend + # dockerfile: ./Dockerfile command: python manage.py runserver 0.0.0.0:8000 ports: - - 8000:8000 + - 8000:8000 waecm_g4_fe: container_name: waecm_g4_fe_container hostname: waecm_g4_fe image: pfingstfrosch/waecm-2021-group-04-bsp-1-fe -# build: -# context: ./frontend -# dockerfile: ./Dockerfile + # build: + # context: ./frontend + # dockerfile: ./Dockerfile ports: - 4200:80