reformat code;

This commit is contained in:
Marco Zeisler 2021-04-30 16:18:20 +02:00
parent a4e6a64444
commit 3e3bf1263a
3 changed files with 11 additions and 12 deletions

View File

@ -1,15 +1,19 @@
from django.db import models from django.db import models
# Create your models here. # Create your models here.
class User(models.Model): class User(models.Model):
... ...
class Tweet(models.Model): class Tweet(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE) user = models.ForeignKey(User, on_delete=models.CASCADE)
class Feed(models.Model): class Feed(models.Model):
url = models.CharField(max_length=100) url = models.CharField(max_length=100)
active = models.BooleanField() active = models.BooleanField()
class FeedEntry(models.Model): class FeedEntry(models.Model):
tweeted = models.BooleanField() tweeted = models.BooleanField()

View File

@ -8,12 +8,10 @@ https://docs.djangoproject.com/en/2.0/ref/settings/
import datetime import datetime
import os import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
# Quick-start development settings - unsuitable for production # Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ # See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/
@ -63,7 +61,6 @@ REST_FRAMEWORK = {
) )
} }
# configuration of jason web token authentication # configuration of jason web token authentication
JWT_AUTH = { JWT_AUTH = {
'JWT_VERIFY': True, 'JWT_VERIFY': True,
@ -113,7 +110,6 @@ TEMPLATES = [
WSGI_APPLICATION = 'app_be.wsgi.application' WSGI_APPLICATION = 'app_be.wsgi.application'
# Database # Database
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases # https://docs.djangoproject.com/en/2.0/ref/settings/#databases
@ -214,4 +210,3 @@ LOGGING = {
# increase the maximum upload size of files # increase the maximum upload size of files
DATA_UPLOAD_MAX_MEMORY_SIZE = 104857600 DATA_UPLOAD_MAX_MEMORY_SIZE = 104857600

View File

@ -7,9 +7,9 @@ services:
container_name: waecm_g4_be_container container_name: waecm_g4_be_container
hostname: waecm_g4_be hostname: waecm_g4_be
image: pfingstfrosch/waecm-2021-group-04-bsp-1-be image: pfingstfrosch/waecm-2021-group-04-bsp-1-be
# build: # build:
# context: ./backend # context: ./backend
# dockerfile: ./Dockerfile # dockerfile: ./Dockerfile
command: python manage.py runserver 0.0.0.0:8000 command: python manage.py runserver 0.0.0.0:8000
ports: ports:
- 8000:8000 - 8000:8000
@ -18,8 +18,8 @@ services:
container_name: waecm_g4_fe_container container_name: waecm_g4_fe_container
hostname: waecm_g4_fe hostname: waecm_g4_fe
image: pfingstfrosch/waecm-2021-group-04-bsp-1-fe image: pfingstfrosch/waecm-2021-group-04-bsp-1-fe
# build: # build:
# context: ./frontend # context: ./frontend
# dockerfile: ./Dockerfile # dockerfile: ./Dockerfile
ports: ports:
- 4200:80 - 4200:80