Compare commits
No commits in common. "master" and "BES-26" have entirely different histories.
93
.gitignore
vendored
93
.gitignore
vendored
@ -1,100 +1,7 @@
|
||||
/node_modules/
|
||||
/test/allure-results/
|
||||
/test/allure-results/*.xml
|
||||
/test/allure-results/*.png
|
||||
/test/allure-results/*.log
|
||||
/test/allure-results/*.json
|
||||
/test/allure-results/*.mp4
|
||||
/test/screenshots/*.png
|
||||
/allure-report/
|
||||
/_results_/
|
||||
|
||||
# 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
|
@ -2,7 +2,11 @@
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="b23c009e-2f8a-48f7-8b29-023f93596932" name="Default Changelist" comment="">
|
||||
<change afterPath="$PROJECT_DIR$/bestnotes/dbAPI.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bestnotes/models.py" beforeDir="false" afterPath="$PROJECT_DIR$/bestnotes/models.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/bestnotes/tests.py" beforeDir="false" afterPath="$PROJECT_DIR$/bestnotes/tests.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/db.sqlite3" beforeDir="false" afterPath="$PROJECT_DIR$/db.sqlite3" afterDir="false" />
|
||||
</list>
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
@ -14,7 +18,6 @@
|
||||
<option name="RECENT_TEMPLATES">
|
||||
<list>
|
||||
<option value="Python Script" />
|
||||
<option value="HTML File" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
@ -29,9 +32,8 @@
|
||||
<component name="ProjectId" id="1U5Jq3TEUnuX8tmyYK4OsXqAEBc" />
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||
<component name="PropertiesComponent">
|
||||
<property name="DefaultHtmlFileTemplate" value="HTML File" />
|
||||
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../../TAU/TAU_34/wmt_2017_git_master" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||
<property name="settings.editor.selected.configurable" value="preferences.general" />
|
||||
</component>
|
||||
<component name="RunDashboard">
|
||||
@ -47,7 +49,7 @@
|
||||
</option>
|
||||
</component>
|
||||
<component name="RunManager">
|
||||
<configuration name="Unittests in E:/MojeDane/StudiaWMI/Semestr_2_Zimowy_2019-20/Systemy_informatyczne/BES-32/BestNotes/bestnotes/bestnotesunittests.py" type="tests" factoryName="Unittests" temporary="true" nameIsGenerated="true">
|
||||
<configuration name="Unittests in bestnotesunittests.py" type="tests" factoryName="Unittests" temporary="true" nameIsGenerated="true">
|
||||
<module name="BestNotesProject" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
@ -63,7 +65,7 @@
|
||||
</configuration>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="Python tests.Unittests in E:/MojeDane/StudiaWMI/Semestr_2_Zimowy_2019-20/Systemy_informatyczne/BES-32/BestNotes/bestnotes/bestnotesunittests.py" />
|
||||
<item itemvalue="Python tests.Unittests in bestnotesunittests.py" />
|
||||
</list>
|
||||
</recent_temporary>
|
||||
</component>
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -28,11 +28,6 @@ DEBUG = True
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
#
|
||||
LOGIN_REDIRECT_URL = '/bestnotes/'
|
||||
LOGOUT_REDIRECT_URL = '/bestnotes/accounts/login/'
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
@ -43,8 +38,6 @@ INSTALLED_APPS = [
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'widget_tweaks',
|
||||
'tinymce',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
@ -126,19 +119,3 @@ USE_TZ = True
|
||||
# https://docs.djangoproject.com/en/2.2/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
|
||||
TINYMCE_JS_URL = "https://cdn.tiny.cloud/1/r9o35nobg5gdj46hhxw3ohwbjh4yct23kx405ozckt8fj2k2/tinymce/5.1.4-66/tinymce.min.js"
|
||||
|
||||
TINYMCE_DEFAULT_CONFIG = {
|
||||
'height' : 500,
|
||||
'skin': 'oxide-dark',
|
||||
'branding': False,
|
||||
'content_css': 'dark',
|
||||
'plugins': "image,imagetools,media,codesample,link,code,wordcount",
|
||||
'menubar': False,
|
||||
'contextmenu': "cut, copy, link, media ",
|
||||
'toolbar': "styleselect | undo redo | bold italic underline superscript subscript| fontselect fontsizeselect forecolor backcolor | alignleft aligncenter alignright | link image media codesample code",
|
||||
'image_caption': True,
|
||||
'image_advtab': True
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 5.3 KiB |
@ -15,11 +15,8 @@ Including another URLconf
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
from bestnotes.views import homepage
|
||||
|
||||
urlpatterns = [
|
||||
path('bestnotes/', include('bestnotes.urls')),
|
||||
path('', homepage, name='homepage'),
|
||||
path(r'^tinymce/', include('tinymce.urls')),
|
||||
path('admin/', admin.site.urls),
|
||||
]
|
||||
|
11
Front/models.py
Normal file
11
Front/models.py
Normal file
@ -0,0 +1,11 @@
|
||||
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)
|
@ -2,14 +2,14 @@
|
||||
<html lang="pl">
|
||||
{% load static %}
|
||||
<head>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
{{ form.media }}
|
||||
|
||||
<!-- Bootstrap CSS -->
|
||||
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'navbar.css' %}">
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'all.css' %}">
|
||||
<script src="https://cdn.tiny.cloud/1/r9o35nobg5gdj46hhxw3ohwbjh4yct23kx405ozckt8fj2k2/tinymce/5/tinymce.min.js" referrerpolicy="origin"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
||||
|
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
|
||||
{% block css %}
|
16
Front/templates/navbar.html
Normal file
16
Front/templates/navbar.html
Normal file
@ -0,0 +1,16 @@
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
|
||||
<a class="navbar-brand" href="#">
|
||||
<i class="fa fa-sticky-note logo"></i>
|
||||
<strong>Best Notes</strong>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<ul class="navbar-nav collapse navbar-collapse" id="navbarNav">
|
||||
<li class="nav-item nav-link" href="#">Strona główna <span class="sr-only">(current)</span></li>
|
||||
{% if user.is_authenticated %}
|
||||
<li class="nav-item nav-link active"><a class="nolink" href="{% url 'profesor' %}">Przedmioty</a></li>
|
||||
<li class="nav-item nav-link"><a class="nolink" href="{% url 'logout' %}">Wyloguj się</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
50
Front/templates/profesor.html
Normal file
50
Front/templates/profesor.html
Normal file
@ -0,0 +1,50 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
{% block css %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'profesor.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
|
||||
{% include 'navbar.html' %}
|
||||
|
||||
<div class="container">
|
||||
<div class="d-flex justify-content-center mt-5">
|
||||
<h3>Dodaj nowy przedmiot</h3>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center mt-3">
|
||||
<form role="form">
|
||||
<input type="text" class="form-control" placeholder="Nowy przedmiot" name="przedmiot">
|
||||
</form>
|
||||
<button type="button" class="btn btn btn-primary ml-1">Dodaj</button>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center mt-5">
|
||||
<h3>Lista przedmiotów</h3>
|
||||
</div>
|
||||
<a class="row justify-content-center">Liczba dostępnych przedmiotów: 3/5</a>
|
||||
<ul class="list-group cProductsList mt-3">
|
||||
<li class="list-group-item d-sm-flex justify-content-between"><p class="p-0 m-0 flex-grow-1">Sztuczna inteligencja</p>
|
||||
<button class="btn-primary mr-1" ><a class="nolink" href="/profesor/Sztuczna inteligencja">Zarządzaj</a></button>
|
||||
<button class="btn-success mr-1">Edytuj</button>
|
||||
<button class="btn-danger">Usuń</button>
|
||||
</li>
|
||||
<li class="list-group-item d-sm-flex justify-content-between"><p class="p-0 m-0 flex-grow-1">Systemy informatyczne</p>
|
||||
<button class="btn-primary mr-1"><a class="nolink" href="/profesor/Systemy informatyczne">Zarządzaj</a></button>
|
||||
<button class="btn-success mr-1">Edytuj</button>
|
||||
<button class="btn-danger">Usuń</button>
|
||||
</li>
|
||||
<li class="list-group-item d-sm-flex justify-content-between"><p class="p-0 m-0 flex-grow-1">Programowanie</p>
|
||||
<button class="btn-primary mr-1"><a class="nolink" href="/profesor/Programowanie">Zarządzaj</a></button>
|
||||
<button class="btn-success mr-1">Edytuj</button>
|
||||
<button class="btn-danger">Usuń</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<a href="{% url 'login' %}">Zaloguj sie</a>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
@ -1,17 +1,15 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
{% block css %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'subject.css' %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% include 'navbar.html' %}
|
||||
<div class="container d-flex justify-content-center">
|
||||
<div class="row mt-4 text-white"><h1>{{id}}</h1></div>
|
||||
<div class="row mt-4"><h1>{{id}}</h1></div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="d-flex justify-content-center mt-5">
|
||||
<h3 class="text-white">Dodaj nowe zagadnienie</h3>
|
||||
<h3>Dodaj nowe zagadnienie</h3>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center mt-3">
|
||||
<form role="form">
|
||||
@ -20,7 +18,7 @@
|
||||
<button type="button" class="btn btn btn-primary ml-1">Dodaj</button>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center mt-5">
|
||||
<h3 class="text-white">Lista zagadnień</h3>
|
||||
<h3>Lista zagadnień</h3>
|
||||
</div>
|
||||
<a class="row justify-content-center">Liczba dostępnych zagadnień: 3/15</a>
|
||||
<ul class="list-group cProductsList mt-3">
|
@ -5,32 +5,12 @@
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'login.css' %}">
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-dark">
|
||||
<a class="navbar-brand" href="{% url 'homepage' %}">
|
||||
<i class="fa fa-sticky-note logo"></i>
|
||||
<strong>Best Notes</strong>
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<ul class="navbar-nav collapse navbar-collapse" id="navbarNav">
|
||||
<li id="home" class="nav-item nav-link"><a class="nolink" href="{% url 'homepage' %}"><i class="fa fa-home fa-2x"></a></i></li>
|
||||
{% if user.is_authenticated %}
|
||||
<li id="add_note" class="nav-item nav-link"><a class="nolink" href="{% url 'add' %}"><i class="fa fa-pencil-square-o fa-2x"></a></i></li>
|
||||
<li id="all_subjects" class="nav-item nav-link active"><a class="nolink" href="{% url 'subject' %}"><i class="fa fa-list-ul fa-2x"></i></a></li>
|
||||
<li id="logout" class="nav-item nav-link"><a class="nolink" href="{% url 'logout' %}"><i class="fa fa-sign-out fa-2x"></i></a></li>
|
||||
{% else %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<div class="container login-container">
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col-md-6 login-form-2">
|
||||
<i class="fa fa-sticky-note-o fa-5x logo"> </i>
|
||||
<h1><strong>Best Notes</strong></h1>
|
||||
<form method="post" action="{% url 'login' %}?next={{ request.GET.next }}">
|
||||
<form method="post" action="{% url 'login' %}">
|
||||
{% csrf_token %}
|
||||
|
||||
{% for hidden in form.hidden_fields %}
|
||||
@ -43,11 +23,11 @@
|
||||
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend"><i class="input-group-text fa fa-envelope fa-lg"></i></div>
|
||||
{% render_field form.username class="form-control" placeholder="Email" id="loginform"%}
|
||||
{% render_field form.username class="form-control" placeholder="Email"%}
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend"><i class="input-group-text fa fa-lock fa-lg"></i></div>
|
||||
{% render_field form.password class="form-control" placeholder="Hasło" id="passwordform"%}
|
||||
{% render_field form.password class="form-control" placeholder="Hasło"%}
|
||||
</div>
|
||||
<div class="form-group mt-3">
|
||||
<input type="submit" class="btnSubmit" value="Login" />
|
@ -1,7 +1,6 @@
|
||||
Demo dostępne pod adresem: http://bestnotes.pythonanywhere.com/
|
||||
Dane do logowanie:
|
||||
Email: admin
|
||||
Hasło: admin
|
||||
Testowe Readme do projektu BestNotes
|
||||
|
||||
Testowa zmiana
|
||||
|
||||
# Run Webdriver.IO tests locally
|
||||
To run WebdriverIO tests locally, just execute:
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user