mirror of
https://github.com/ae-utbm/sith.git
synced 2024-10-31 19:38:04 +00:00
pedagogy: structure of the app
This commit is contained in:
parent
f922ab9272
commit
17a375f89c
23
pedagogy/__init__.py
Normal file
23
pedagogy/__init__.py
Normal file
@ -0,0 +1,23 @@
|
||||
# -*- coding:utf-8 -*
|
||||
#
|
||||
# Copyright 2019
|
||||
# - Sli <antoine@bartuccio.fr>
|
||||
#
|
||||
# Ce fichier fait partie du site de l'Association des Étudiants de l'UTBM,
|
||||
# http://ae.utbm.fr.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License a 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 General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Sofware Foundation, Inc., 59 Temple
|
||||
# Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
#
|
27
pedagogy/admin.py
Normal file
27
pedagogy/admin.py
Normal file
@ -0,0 +1,27 @@
|
||||
# -*- coding:utf-8 -*
|
||||
#
|
||||
# Copyright 2019
|
||||
# - Sli <antoine@bartuccio.fr>
|
||||
#
|
||||
# Ce fichier fait partie du site de l'Association des Étudiants de l'UTBM,
|
||||
# http://ae.utbm.fr.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License a 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 General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Sofware Foundation, Inc., 59 Temple
|
||||
# Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
#
|
||||
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
0
pedagogy/migrations/__init__.py
Normal file
0
pedagogy/migrations/__init__.py
Normal file
67
pedagogy/models.py
Normal file
67
pedagogy/models.py
Normal file
@ -0,0 +1,67 @@
|
||||
# -*- coding:utf-8 -*
|
||||
#
|
||||
# Copyright 2019
|
||||
# - Sli <antoine@bartuccio.fr>
|
||||
#
|
||||
# Ce fichier fait partie du site de l'Association des Étudiants de l'UTBM,
|
||||
# http://ae.utbm.fr.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License a 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 General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Sofware Foundation, Inc., 59 Temple
|
||||
# Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
#
|
||||
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
|
||||
|
||||
class UV(models.Model):
|
||||
"""
|
||||
Contains infos about an UV (course)
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class UVComment(models.Model):
|
||||
"""
|
||||
A comment about an UV
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class UVCommentReport(models.Model):
|
||||
"""
|
||||
Report an inapropriate comment
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class TeachingDepartment(models.Model):
|
||||
"""
|
||||
Teaching department of the school
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class Study(models.Model):
|
||||
"""
|
||||
Speciality inside a Teaching Department
|
||||
"""
|
||||
|
||||
pass
|
27
pedagogy/tests.py
Normal file
27
pedagogy/tests.py
Normal file
@ -0,0 +1,27 @@
|
||||
# -*- coding:utf-8 -*
|
||||
#
|
||||
# Copyright 2019
|
||||
# - Sli <antoine@bartuccio.fr>
|
||||
#
|
||||
# Ce fichier fait partie du site de l'Association des Étudiants de l'UTBM,
|
||||
# http://ae.utbm.fr.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License a 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 General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Sofware Foundation, Inc., 59 Temple
|
||||
# Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
#
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
62
pedagogy/urls.py
Normal file
62
pedagogy/urls.py
Normal file
@ -0,0 +1,62 @@
|
||||
# -*- coding:utf-8 -*
|
||||
#
|
||||
# Copyright 2019
|
||||
# - Sli <antoine@bartuccio.fr>
|
||||
#
|
||||
# Ce fichier fait partie du site de l'Association des Étudiants de l'UTBM,
|
||||
# http://ae.utbm.fr.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License a 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 General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Sofware Foundation, Inc., 59 Temple
|
||||
# Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
#
|
||||
|
||||
from django.conf.urls import url
|
||||
|
||||
from pedagogy.views import *
|
||||
|
||||
urlpatterns = [
|
||||
url(r"^$", UVListView.as_view(), name="guide"),
|
||||
url(r"^uv/(?P<uv_id>[0-9]+)$", UVDetailFormView.as_view(), name="uv_detail"),
|
||||
url(
|
||||
r"^comment/(?P<comment_id>[0-9]+)$",
|
||||
UVCommentDetailView.as_view(),
|
||||
name="comment_detail",
|
||||
),
|
||||
url(
|
||||
r"^comment/(?P<comment_id>[0-9]+)/report$",
|
||||
UVCommentReportCreateView.as_view(),
|
||||
name="comment_report",
|
||||
),
|
||||
url(r"^reported$", UVCommentReportListView.as_view(), name="comment_report_list"),
|
||||
url(r"^moderation$", UVModerationFormView.as_view(), name="moderation"),
|
||||
url(r"^uv/create$", UVCreateView.as_view(), name="uv_create"),
|
||||
url(r"^uv/(?P<uv_id>[0-9]+)/delete$", UVDeleteView.as_view(), name="uv_delete"),
|
||||
url(
|
||||
r"^department/create$",
|
||||
TeachingDepartmentCreateView.as_view(),
|
||||
name="department_create",
|
||||
),
|
||||
url(
|
||||
r"^department/(?P<department_id>[0-9]+)/delete$",
|
||||
TeachingDepartmentDeleteView.as_view(),
|
||||
name="department_delete",
|
||||
),
|
||||
url(r"^study/create$", StudyCreateView.as_view(), name="study_create"),
|
||||
url(
|
||||
r"^study/(?P<study_id>[0-9]+)/delete$",
|
||||
StudyDeleteView.as_view(),
|
||||
name="study_delete",
|
||||
),
|
||||
]
|
124
pedagogy/views.py
Normal file
124
pedagogy/views.py
Normal file
@ -0,0 +1,124 @@
|
||||
# -*- coding:utf-8 -*
|
||||
#
|
||||
# Copyright 2017
|
||||
# - Sli <antoine@bartuccio.fr>
|
||||
#
|
||||
# Ce fichier fait partie du site de l'Association des Étudiants de l'UTBM,
|
||||
# http://ae.utbm.fr.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License a 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 General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program; if not, write to the Free Sofware Foundation, Inc., 59 Temple
|
||||
# Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
#
|
||||
|
||||
from django.views.generic import CreateView, DeleteView, DetailView, ListView, FormView
|
||||
|
||||
from core.views import DetailFormView
|
||||
|
||||
|
||||
class UVDetailFormView(DetailFormView):
|
||||
"""
|
||||
Dispaly every comment of an UV and detailed infos about it
|
||||
Allow to comment the UV
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class UVCommentDetailView(DetailView):
|
||||
"""
|
||||
Display a specified UVComment (for easy sharing of the comment)
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class UVListView(ListView):
|
||||
"""
|
||||
UV guide main page
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class UVCommentReportCreateView(CreateView):
|
||||
"""
|
||||
Create a new report for an inapropriate comment
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class UVCommentReportListView(ListView):
|
||||
"""
|
||||
List all UV reports for moderation (Privileged)
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class UVModerationFormView(FormView):
|
||||
"""
|
||||
List all UVs to moderate and allow to moderate them (Privileged)
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class UVCreateView(CreateView):
|
||||
"""
|
||||
Add a new UV (Privileged)
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class UVDeleteView(DeleteView):
|
||||
"""
|
||||
Allow to delete an UV (Privileged)
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class TeachingDepartmentCreateView(CreateView):
|
||||
"""
|
||||
Add a new TeachingDepartment (Privileged)
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class TeachingDepartmentDeleteView(DeleteView):
|
||||
"""
|
||||
Allow to delete an TeachingDepartment (Privileged)
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class StudyCreateView(CreateView):
|
||||
"""
|
||||
Add a new Study (Privileged)
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class StudyDeleteView(DeleteView):
|
||||
"""
|
||||
Allow to delete an Study (Privileged)
|
||||
"""
|
||||
|
||||
pass
|
@ -93,6 +93,7 @@ INSTALLED_APPS = (
|
||||
"stock",
|
||||
"trombi",
|
||||
"matmat",
|
||||
"pedagogy",
|
||||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
|
@ -84,6 +84,10 @@ urlpatterns = [
|
||||
url(
|
||||
r"^matmatronch/", include("matmat.urls", namespace="matmat", app_name="matmat")
|
||||
),
|
||||
url(
|
||||
r"^pedagogy/",
|
||||
include("pedagogy.urls", namespace="pedagogy", app_name="pedagogy"),
|
||||
),
|
||||
url(r"^admin/", include(admin.site.urls)),
|
||||
url(r"^ajax_select/", include(ajax_select_urls)),
|
||||
url(r"^i18n/", include("django.conf.urls.i18n")),
|
||||
|
Loading…
Reference in New Issue
Block a user