diff --git a/apps/tbde/__init__.py b/apps/tbde/__init__.py index e69de29..1033d16 100644 --- a/apps/tbde/__init__.py +++ b/apps/tbde/__init__.py @@ -0,0 +1 @@ +# Copyright (C) 2020 by BDE ENS Paris-Saclay diff --git a/apps/tbde/admin.py b/apps/tbde/admin.py new file mode 100644 index 0000000..2cf498f --- /dev/null +++ b/apps/tbde/admin.py @@ -0,0 +1,17 @@ +# Copyright (C) 2020 by BDE ENS Paris-Saclay + +from django.contrib import admin + +from django.utils.translation import gettext_lazy as _ + +from tbde.models import Ticket, Reward + + +@admin.register(Ticket) +class TicketAdmin(admin.ModelAdmin): + pass + + +@admin.register(Reward) +class RewardAdmin(admin.ModelAdmin): + pass diff --git a/apps/tbde/apps.py b/apps/tbde/apps.py index e69de29..8ad028b 100644 --- a/apps/tbde/apps.py +++ b/apps/tbde/apps.py @@ -0,0 +1,8 @@ +# Copyright (C) 2020 by BDE ENS Paris-Saclay + +from django.apps import AppConfig + + +class TBDEConfig(AppConfig): + name = 'tbde' + verbose_name = _('tombola') diff --git a/apps/tbde/models.py b/apps/tbde/models.py index e69de29..82d8d63 100644 --- a/apps/tbde/models.py +++ b/apps/tbde/models.py @@ -0,0 +1,37 @@ +# Copyright (C) 2020 by BDE ENS Paris-Saclay + +from django.db import models + +from django.utils.translation import gettext_lazy as _ + + +class Ticket(models.Model): + number = models.PositiveIntegerField( + verbose_name=_("number") + ) + + note = models.CharField( + max_length=255, + verbose_name=_("note") + ) + + +class Reward(models.Model): + order = models.PositiveIntegerField( + verbose_name=_("order"), + ) + + name = models.CharField( + max_length=255, + verbose_name=_("name"), + ) + + image = models.ImageField( + verbose_name=_("image"), + ) + + rewarded_by = models.ForeignKey( + Ticket, + on_delete=models.PROTECT, + verbose_name=_("rewarded by") + ) diff --git a/apps/tbde/urls.py b/apps/tbde/urls.py index e69de29..1033d16 100644 --- a/apps/tbde/urls.py +++ b/apps/tbde/urls.py @@ -0,0 +1 @@ +# Copyright (C) 2020 by BDE ENS Paris-Saclay diff --git a/tombola/middlewares.py b/tombola/middlewares.py index 73b87e3..de89d80 100644 --- a/tombola/middlewares.py +++ b/tombola/middlewares.py @@ -1,10 +1,6 @@ -# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay +# Copyright (C) 2020 by BDE ENS Paris-Saclay # SPDX-License-Identifier: GPL-3.0-or-later -from django.http import HttpResponseRedirect - -from urllib.parse import urlencode, parse_qs, urlsplit, urlunsplit - class TurbolinksMiddleware(object): """ diff --git a/tombola/settings/__init__.py b/tombola/settings/__init__.py index 68a40b8..5cfbabe 100644 --- a/tombola/settings/__init__.py +++ b/tombola/settings/__init__.py @@ -1,3 +1,5 @@ +# Copyright (C) 2020 by BDE ENS Paris-Saclay + import os import re diff --git a/tombola/settings/base.py b/tombola/settings/base.py index c7ab272..5fd68c2 100644 --- a/tombola/settings/base.py +++ b/tombola/settings/base.py @@ -1,4 +1,4 @@ -# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay +# Copyright (C) 2020 by BDE ENS Paris-Saclay # SPDX-License-Identifier: GPL-3.0-or-later import os diff --git a/tombola/settings/development.py b/tombola/settings/development.py index 60055ee..bf1abe5 100644 --- a/tombola/settings/development.py +++ b/tombola/settings/development.py @@ -1,4 +1,4 @@ -# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay +# Copyright (C) 2020 by BDE ENS Paris-Saclay # SPDX-License-Identifier: GPL-3.0-or-later ######################## diff --git a/tombola/settings/production.py b/tombola/settings/production.py index 296c17a..5e6c912 100644 --- a/tombola/settings/production.py +++ b/tombola/settings/production.py @@ -1,4 +1,4 @@ -# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay +# Copyright (C) 2020 by BDE ENS Paris-Saclay # SPDX-License-Identifier: GPL-3.0-or-later ######################## diff --git a/tombola/urls.py b/tombola/urls.py index fd43e52..a3e1ad5 100644 --- a/tombola/urls.py +++ b/tombola/urls.py @@ -1,3 +1,5 @@ +# Copyright (C) 2020 by BDE ENS Paris-Saclay + """tombola URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: diff --git a/tombola/wsgi.py b/tombola/wsgi.py index 3fc7cb9..a4f4376 100644 --- a/tombola/wsgi.py +++ b/tombola/wsgi.py @@ -1,3 +1,5 @@ +# Copyright (C) 2020 by BDE ENS Paris-Saclay + """ WSGI config for tombola project.