Skip to content
Snippets Groups Projects
Commit 4d9c28d0 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Init model for meal plan

parent b295a853
No related branches found
No related tags found
1 merge request!86Merge school-apps
# Generated by Django 2.0.7 on 2018-11-28 16:09
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('aub', '0004_auto_20181031_1617'),
]
operations = [
migrations.AlterField(
model_name='aub',
name='created_by',
field=models.ForeignKey(default=3, on_delete=models.SET(3), related_name='aubs',
to=settings.AUTH_USER_MODEL),
),
]
# Generated by Django 2.0.7 on 2018-11-28 16:14
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='MealPlan',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('calendar_week', models.IntegerField()),
('year', models.IntegerField()),
('pdf', models.FileField(upload_to='mealplan/%Y/')),
],
),
]
from django.db import models
# Create your models here.
class MealPlan(models.Model):
calendar_week = models.IntegerField()
year = models.IntegerField()
pdf = models.FileField(upload_to="mealplan/%Y/")
from django.urls import path
from . import views
urlpatterns = [
]
......@@ -44,6 +44,7 @@ INSTALLED_APPS = [
'aub.apps.AubConfig',
'untisconnect.apps.UntisconnectConfig',
'timetable.apps.TimetableConfig',
'mealplan.apps.MealplanConfig',
'dbsettings',
'django.contrib.admin',
'django.contrib.auth',
......
......@@ -40,6 +40,11 @@ urlpatterns = [
#############
path('timetable/', include('timetable.urls')),
#############
# MEAL PLAN #
#############
path('mealplan/', include('mealplan.urls')),
#########
# Admin #
#########
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment