diff --git a/recipes/admin.py b/recipes/admin.py index 1542b98..7ffb902 100644 --- a/recipes/admin.py +++ b/recipes/admin.py @@ -1,3 +1,22 @@ +""" +Barn Web App - A collection of web-apps for my family's personal use, +including a recipe database. +Copyright © 2023 Benjamin Stadlbauer + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or (at +your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero +General Public License for more details. + +This program comes with a copy of the GNU Affero General Public License +file at the root of this project. +""" + from django.contrib import admin from .models import Recipe, Version, Ingredient diff --git a/recipes/apps.py b/recipes/apps.py index 1d53980..0ed261f 100644 --- a/recipes/apps.py +++ b/recipes/apps.py @@ -1,3 +1,22 @@ +""" +Barn Web App - A collection of web-apps for my family's personal use, +including a recipe database. +Copyright © 2023 Benjamin Stadlbauer + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or (at +your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero +General Public License for more details. + +This program comes with a copy of the GNU Affero General Public License +file at the root of this project. +""" + from django.apps import AppConfig diff --git a/recipes/forms.py b/recipes/forms.py index f02cf4d..e410308 100644 --- a/recipes/forms.py +++ b/recipes/forms.py @@ -1,3 +1,22 @@ +""" +Barn Web App - A collection of web-apps for my family's personal use, +including a recipe database. +Copyright © 2023 Benjamin Stadlbauer + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or (at +your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero +General Public License for more details. + +This program comes with a copy of the GNU Affero General Public License +file at the root of this project. +""" + from django.forms import ModelForm, ValidationError, modelformset_factory, BooleanField from .models import Recipe, Version, Ingredient diff --git a/recipes/models.py b/recipes/models.py index 80a66ad..bb9728f 100644 --- a/recipes/models.py +++ b/recipes/models.py @@ -1,3 +1,22 @@ +""" +Barn Web App - A collection of web-apps for my family's personal use, +including a recipe database. +Copyright © 2023 Benjamin Stadlbauer + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or (at +your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero +General Public License for more details. + +This program comes with a copy of the GNU Affero General Public License +file at the root of this project. +""" + from django.db import models from django.contrib.auth.models import User from django.urls import reverse diff --git a/recipes/templates/add-recipe.html b/recipes/templates/add-recipe.html index bd8968c..f696794 100644 --- a/recipes/templates/add-recipe.html +++ b/recipes/templates/add-recipe.html @@ -1,4 +1,22 @@ {% extends "base_main.html" %} +{% comment %} + Barn Web App - A collection of web-apps for my family's personal use, + including a recipe database. + Copyright © 2023 Benjamin Stadlbauer + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or (at + your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero + General Public License for more details. + + This program comes with a copy of the GNU Affero General Public License + file at the root of this project. +{% endcomment %} {% block title %}{{ recipe.title }}{% endblock %} {% block main %}
diff --git a/recipes/templates/add-version.html b/recipes/templates/add-version.html index e67d86b..fb403db 100644 --- a/recipes/templates/add-version.html +++ b/recipes/templates/add-version.html @@ -1,4 +1,22 @@ {% extends "base_main.html" %} +{% comment %} + Barn Web App - A collection of web-apps for my family's personal use, + including a recipe database. + Copyright © 2023 Benjamin Stadlbauer + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or (at + your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero + General Public License for more details. + + This program comes with a copy of the GNU Affero General Public License + file at the root of this project. +{% endcomment %} {% block title %}{{ recipe.title }}{% endblock %} {% block main %} diff --git a/recipes/templates/edit-recipe.html b/recipes/templates/edit-recipe.html index 09bc18e..32ce3c8 100644 --- a/recipes/templates/edit-recipe.html +++ b/recipes/templates/edit-recipe.html @@ -1,4 +1,22 @@ {% extends "base_main.html" %} +{% comment %} + Barn Web App - A collection of web-apps for my family's personal use, + including a recipe database. + Copyright © 2023 Benjamin Stadlbauer + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or (at + your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero + General Public License for more details. + + This program comes with a copy of the GNU Affero General Public License + file at the root of this project. +{% endcomment %} {% block title %}{{ recipe.title }}{% endblock %} {% block main %} diff --git a/recipes/templates/edit-version.html b/recipes/templates/edit-version.html index e3fa642..0659431 100644 --- a/recipes/templates/edit-version.html +++ b/recipes/templates/edit-version.html @@ -1,7 +1,25 @@ {% extends "base_main.html" %} +{% comment %} + Barn Web App - A collection of web-apps for my family's personal use, + including a recipe database. + Copyright © 2023 Benjamin Stadlbauer + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or (at + your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero + General Public License for more details. + + This program comes with a copy of the GNU Affero General Public License + file at the root of this project. +{% endcomment %} {% block title %}{{ recipe.title }}{% endblock %} {% block main %} - + {# TODO refactor with add-version.html#} {%csrf_token %} {{ version_form.as_table }} diff --git a/recipes/templates/recipe.html b/recipes/templates/recipe.html index 08d20d9..29f2cc0 100644 --- a/recipes/templates/recipe.html +++ b/recipes/templates/recipe.html @@ -1,4 +1,22 @@ {% extends "base_main.html" %} +{% comment %} + Barn Web App - A collection of web-apps for my family's personal use, + including a recipe database. + Copyright © 2023 Benjamin Stadlbauer + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or (at + your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero + General Public License for more details. + + This program comes with a copy of the GNU Affero General Public License + file at the root of this project. +{% endcomment %} {% block title %}{{ recipe.title }}{% endblock %} {% block main %}

{{ recipe.title }}

diff --git a/recipes/templates/recipes.html b/recipes/templates/recipes.html index faee634..67d6ab0 100644 --- a/recipes/templates/recipes.html +++ b/recipes/templates/recipes.html @@ -1,4 +1,22 @@ {% extends "base_main.html" %} +{% comment %} + Barn Web App - A collection of web-apps for my family's personal use, + including a recipe database. + Copyright © 2023 Benjamin Stadlbauer + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or (at + your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero + General Public License for more details. + + This program comes with a copy of the GNU Affero General Public License + file at the root of this project. +{% endcomment %} {% block title %}Recipes{% endblock %} {% block main %}

Recipes

diff --git a/recipes/templates/version.html b/recipes/templates/version.html index 00ad0ff..bac7ea6 100644 --- a/recipes/templates/version.html +++ b/recipes/templates/version.html @@ -1,4 +1,22 @@ {% extends "base_main.html" %} +{% comment %} + Barn Web App - A collection of web-apps for my family's personal use, + including a recipe database. + Copyright © 2023 Benjamin Stadlbauer + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or (at + your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero + General Public License for more details. + + This program comes with a copy of the GNU Affero General Public License + file at the root of this project. +{% endcomment %} {% block title %}{{ recipe.title }}{% endblock %} {% block main %}

{{ version.recipe.title }}{% if has_multiple_versions %} ({{ version.label }}){% endif %}

diff --git a/recipes/tests.py b/recipes/tests.py index 7ce503c..055fc05 100644 --- a/recipes/tests.py +++ b/recipes/tests.py @@ -1,3 +1,22 @@ +""" +Barn Web App - A collection of web-apps for my family's personal use, +including a recipe database. +Copyright © 2023 Benjamin Stadlbauer + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or (at +your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero +General Public License for more details. + +This program comes with a copy of the GNU Affero General Public License +file at the root of this project. +""" + from django.test import TestCase # Create your tests here. diff --git a/recipes/urls.py b/recipes/urls.py index 5c7a33f..3561232 100644 --- a/recipes/urls.py +++ b/recipes/urls.py @@ -1,3 +1,22 @@ +""" +Barn Web App - A collection of web-apps for my family's personal use, +including a recipe database. +Copyright © 2023 Benjamin Stadlbauer + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or (at +your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero +General Public License for more details. + +This program comes with a copy of the GNU Affero General Public License +file at the root of this project. +""" + from django.urls import path from . import views diff --git a/recipes/views.py b/recipes/views.py index 032dd20..d7eb098 100644 --- a/recipes/views.py +++ b/recipes/views.py @@ -1,3 +1,22 @@ +""" +Barn Web App - A collection of web-apps for my family's personal use, +including a recipe database. +Copyright © 2023 Benjamin Stadlbauer + +This program is free software: you can redistribute it and/or modify it +under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or (at +your option) any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero +General Public License for more details. + +This program comes with a copy of the GNU Affero General Public License +file at the root of this project. +""" + from django.shortcuts import render, get_object_or_404, redirect from .models import Recipe, Version, Ingredient from .forms import RecipeForm, VersionForm, IngredientFormSet