diff --git a/.gitignore b/.gitignore index 7192090..a274646 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,94 @@ /test/allure-results/*.log /test/allure-results/*.json /test/screenshots/*.png -/allure-report/ \ No newline at end of file +/allure-report/ + +# Created by https://www.gitignore.io + +### OSX ### +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear on external disk +.Spotlight-V100 +.Trashes + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.cache +nosetests.xml +coverage.xml + +# Translations +*.mo +*.pot + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + + +### Django ### +*.log +*.pot +*.pyc +__pycache__/ +local_settings.py + +.env +db.sqlite3 \ No newline at end of file diff --git a/BestNotesProject/settings.py b/BestNotesProject/settings.py index 0504086..0d46e99 100644 --- a/BestNotesProject/settings.py +++ b/BestNotesProject/settings.py @@ -38,6 +38,7 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'widget_tweaks' ] MIDDLEWARE = [ @@ -119,3 +120,6 @@ USE_TZ = True # https://docs.djangoproject.com/en/2.2/howto/static-files/ STATIC_URL = '/static/' + +LOGIN_REDIRECT_URL = '/bestnotes/subject/' #To change, at this moment we have no home site +LOGOUT_REDIRECT_URL = '/bestnotes/accounts/login' \ No newline at end of file diff --git a/Front/models.py b/Front/models.py deleted file mode 100644 index b0b5ec4..0000000 --- a/Front/models.py +++ /dev/null @@ -1,11 +0,0 @@ -from django.db import models - -#Klasa opisująca zagadnienie dla danego przedmiotu -class Zagadnienie(models.Model): - nazwa = models.CharField(max_length=30) - przedmiot = models.ForeignKey(Przedmiot, on_delete=models.CASCADE) - data_dodania = models.DateField() - -class Przedmiot(models.Model): - nazwa = models.CharField(max_length=30) - #uzytkownik_id = models.ForeignKey(User, on_delete=models.CASCADE) \ No newline at end of file diff --git a/bestnotes/models.py b/bestnotes/models.py index 52d5eb6..e834dfe 100644 --- a/bestnotes/models.py +++ b/bestnotes/models.py @@ -18,9 +18,17 @@ class StudentProfile(models.Model): to add as foreign key, when coresponding table is added: CourseId """ - +class Subject(models.Model): + name = models.CharField(max_length=30) + student = models.ForeignKey(StudentProfile, on_delete=models.CASCADE) + +class Topic(models.Model): + name = models.CharField(max_length=30) + subject = models.ForeignKey(Subject, on_delete=models.CASCADE) + add_date = models.DateField() + diff --git a/bestnotes/static/login.css b/bestnotes/static/login.css new file mode 100644 index 0000000..b04cf19 --- /dev/null +++ b/bestnotes/static/login.css @@ -0,0 +1,47 @@ +.login-container{ + margin-top: 5%; + text-align: center; +} +.logo{ + color:white; + margin-bottom: 5%; +} + + +.login-form-2{ + border-radius: 5%; + padding: 5%; + background: #0062cc; + box-shadow: 0 5px 8px 0 rgba(0, 0, 0, 0.2), 0 9px 26px 0 rgba(0, 0, 0, 0.19); +} +.input-group-text{ + font-size: 1.5rem; + min-width: 50px; +} + +.icon{ + text-align: center; +} + + +.login-form-2 h1{ + text-align: center; + color: #fff; +} +.login-container form{ + padding: 8%; +} +.btnSubmit +{ + width: 50%; + border-radius: 1rem; + padding: 1.5%; + border: none; + cursor: pointer; +} + +.login-form-2 .btnSubmit{ + font-weight: 600; + color: #0062cc; + background-color: #fff; +} \ No newline at end of file diff --git a/bestnotes/static/navbar.css b/bestnotes/static/navbar.css new file mode 100644 index 0000000..1225a3e --- /dev/null +++ b/bestnotes/static/navbar.css @@ -0,0 +1,9 @@ +.nolink{ + text-decoration: none; + color:white; +} + +.nolink:hover{ + text-decoration: none; + color:white; +} \ No newline at end of file diff --git a/bestnotes/static/profesor.css b/bestnotes/static/profesor.css new file mode 100644 index 0000000..e69de29 diff --git a/Front/templates/base.html b/bestnotes/templates/base.html similarity index 100% rename from Front/templates/base.html rename to bestnotes/templates/base.html diff --git a/Front/templates/navbar.html b/bestnotes/templates/navbar.html similarity index 93% rename from Front/templates/navbar.html rename to bestnotes/templates/navbar.html index 6c5b549..d2c0a5d 100644 --- a/Front/templates/navbar.html +++ b/bestnotes/templates/navbar.html @@ -9,7 +9,7 @@ diff --git a/Front/templates/registration/login.html b/bestnotes/templates/registration/login.html similarity index 100% rename from Front/templates/registration/login.html rename to bestnotes/templates/registration/login.html diff --git a/Front/templates/przedmiot.html b/bestnotes/templates/subject.html similarity index 100% rename from Front/templates/przedmiot.html rename to bestnotes/templates/subject.html diff --git a/Front/templates/profesor.html b/bestnotes/templates/subjects.html similarity index 89% rename from Front/templates/profesor.html rename to bestnotes/templates/subjects.html index d05929d..a063669 100644 --- a/Front/templates/profesor.html +++ b/bestnotes/templates/subjects.html @@ -26,17 +26,17 @@ Liczba dostępnych przedmiotów: 3/5