-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from Marucik/dev
Merge z dev'a na master
- Loading branch information
Showing
4,983 changed files
with
14,745 additions
and
753,148 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
__pycache__/ | ||
*.pyc | ||
*.pyc | ||
*.sqlite3 | ||
main/migrations/ | ||
node_modules/ | ||
!node_modules/bootstrap-sass/assets/stylesheets/bootstrap.scss | ||
virtualenv/ | ||
.vscode/ | ||
|
||
/static/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: gunicorn ulatwiaczek.wsgi:application --log-file - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,47 @@ | ||
# Ulatwiaczek | ||
Projekt w Pythonie | ||
# Ułatwiaczek </br>Bo ułatwia / jasne jak słońce! [ ͡° ͜ʖ ͡°] | ||
|
||
### Uruchamianie aplikacji na komputerze lokalnym: | ||
|
||
Żeby uruchomić Ułatwiaczka lokalnie, musimy wykonać następujące kroki: | ||
|
||
1. Pobieranie potrzebnych materiałów: | ||
1. Klonujemy branch `master` z [repozytorium](https://github.com/Marucik/Ulatwiaczek/tree/master "Github/Ułatwiaczek/master"); | ||
2. Pobieramy [Python](https://www.python.org/downloads/ "Pobierz Pythona")'a w wersji 3.6.0 dla naszego systemu; | ||
3. Pobieramy [Node.js](https://nodejs.org/en/download/ "Pobierz Node.js") w wersji 7.5.0; | ||
2. Sprawdzenie poprawosci instalacji Python'a oraz Node.js: | ||
1. Otwieramy konsolę i wpisujemy `python --version`. Powinniśmy ujrzeć:</br> | ||
![wersja Python'a](http://i.imgur.com/TS7IDKs.png) | ||
2. Otwieramy konsolę i wpisujemy `node --version`. Powinniśmy ujrzeć:</br> | ||
![wersja Node.js](http://i.imgur.com/lBObH1F.png) | ||
3. Przygotowanie wirtualnego środowiska: | ||
1. Przechodzimy w konsoli do głównego folderu projektu (można go poznać po plikach `manage.py, requirements.txt, README.md`; | ||
|
||
![System plików](http://i.imgur.com/aZC3dvA.png) | ||
|
||
2. Wpisujemy komendę `pip install virtualenv`. </br>Po zakończeniu instalacji sprawdzamy czy wszystko zainstalowało się poprawnie komendą `virtualenv --version`;</br> | ||
![Wersja virtualenv](http://i.imgur.com/2PFUcnL.png) | ||
|
||
3. Tworzymy wirtualne środowisko `virtualenv virtualenv` i aktywujemy go:</br> | ||
W przypadku Linuxa: `source virtualenv/bin/activate`</br> | ||
W przypadku Windowsa: `virtualenv\Scripts\activate`</br> | ||
|
||
4. Po wykonaniu tej komendy nasza konsola powinna wyglądać następująco:</br> | ||
![Wejscie do virtualenv](http://i.imgur.com/6TiPhxi.png) | ||
|
||
Należy pamiętać, że musimy wejść do naszego wirtualnego środowiska za każdym razem jeżeli chcemy uruchomić naszą aplikację lokalnie ( ͡^ ͜ʖ ͡^). | ||
|
||
5. Następnie instalujemy Python'ową paczkę, która zawiera między innymi [Django](https://www.djangoproject.com/ "Strona Django"), na którym oparty jest nasz projekt.</br> | ||
Paczkę instalujemy poleceniem `pip install -r requirements.txt`. Po skończeniu pobierania sprawdzamy czy Django zainstalował się poprawnie poleceniem `python -m django --version`</br></br> | ||
![Sprawdzanie wersji Django](http://i.imgur.com/yDD5C37.png) | ||
6. Teraz instalujemy [Gulp](http://gulpjs.com/ "Strona Gulp'a")'a i potrzebne do jego działania moduły.</br> | ||
Będąc w głównym folderze projektu wpisujemy w konsolę: `npm install`. NodePackageManager automatycznie zainstaluje za nas potrzebne moduły które są zawarde w pliku `package.json`. | ||
7. Po instalacji modułów `npm` w konsolę wpisujemy komendę: `gulp css:compile`.</br> | ||
Powinniśmy ujrzeć taki widok:</br> | ||
![Kompilowanie plików scss](http://i.imgur.com/dRAfQxz.png) | ||
8. W pliku ulatwiaczek/setting.py zmienną `DEBUG` zmieniamy na `True` | ||
4. Uruchomienie serwera i dodawanie danych:</br> | ||
Po wykonaniu poprzednich kroków, wreszcie możemy uruchomić naszą aplikację na lokalnym serwerze! Żeby to zrobić, wykonujemy następujące kroki: | ||
1. W konsoli [w której mamy uruchomione wirtualne środowisko!] otwartej w głównym folderze projektu (poznamy go po pliku `manage.py`) wpisujemy komendę: `python manage.py runserver`</br> | ||
Powinniśmy zobaczyć coś takiego:</br> | ||
![Uruchomiony serwer](http://i.imgur.com/eZjIvZu.png) | ||
2. Uruchamiamy przeglądarkę i wpisujemy adres: `127.0.0.1:8000`. Powinna nam się pokazać strona Ułatwiaczka. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "ulatwiaczek", | ||
"description": "Aplikacja licząca łatwość zadań", | ||
"keywords": [ | ||
"Python", | ||
"Django" | ||
], | ||
"addons": [ | ||
"heroku-postgresql:hobby-dev" | ||
], | ||
"env": { | ||
"SECRET_KEY": "REDACTED" | ||
}, | ||
"scripts": { | ||
"postdeploy": "python manage.py migrate" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
'use strict'; | ||
var gulp = require('gulp'), | ||
sass = require('gulp-sass'), | ||
rename = require('gulp-rename'), | ||
cssbeautify = require('gulp-cssbeautify'), | ||
cssmin = require('gulp-cssmin'), | ||
postcss = require('gulp-postcss'), | ||
autoprefixer = require('autoprefixer'); | ||
|
||
gulp.task('sass', function () { | ||
return gulp.src('sources/style/*.scss') | ||
.pipe(sass().on('error', sass.logError)) | ||
.pipe(postcss([ autoprefixer() ])) | ||
.pipe(cssbeautify({ | ||
indent: ' ', | ||
openbrace: 'end-of-line', | ||
autosemicolon: true | ||
})) | ||
.pipe(gulp.dest('home/static/home/css')) | ||
.pipe(cssmin()) | ||
.pipe(rename({suffix: '.min'})) | ||
.pipe(gulp.dest('home/static/home/css')); | ||
}); | ||
gulp.task('bootstrap-v4-dev', function () { | ||
return gulp.src('./sources/style/bootstrap-v4-dev/scss/bootstrap.scss') | ||
.pipe(sass().on('error', sass.logError)) | ||
.pipe(postcss([ autoprefixer() ])) | ||
.pipe(cssbeautify({ | ||
indent: ' ', | ||
openbrace: 'end-of-line', | ||
autosemicolon: true | ||
})) | ||
.pipe(gulp.dest('home/static/home/css')) | ||
.pipe(cssmin()) | ||
.pipe(rename({suffix: '.min'})) | ||
.pipe(gulp.dest('home/static/home/css')); | ||
}); | ||
gulp.task('font-awesome', function () { | ||
return gulp.src('sources/style/font-awesome.scss') | ||
.pipe(sass().on('error', sass.logError)) | ||
.pipe(postcss([ autoprefixer() ])) | ||
.pipe(cssbeautify({ | ||
indent: ' ', | ||
openbrace: 'end-of-line', | ||
autosemicolon: true | ||
})) | ||
.pipe(gulp.dest('home/static/home/css')) | ||
.pipe(cssmin()) | ||
.pipe(rename({suffix: '.min'})) | ||
.pipe(gulp.dest('home/static/home/css')); | ||
}); | ||
gulp.task('sass:user', function () { | ||
return gulp.src('sources/style/user.scss') | ||
.pipe(sass().on('error', sass.logError)) | ||
.pipe(postcss([ autoprefixer() ])) | ||
.pipe(cssbeautify({ | ||
indent: ' ', | ||
openbrace: 'end-of-line', | ||
autosemicolon: true | ||
})) | ||
.pipe(gulp.dest('home/static/home/css')) | ||
.pipe(cssmin()) | ||
.pipe(rename({suffix: '.min'})) | ||
.pipe(gulp.dest('home/static/home/css')); | ||
}); | ||
gulp.task('sass:watch', function () { | ||
gulp.watch('sources/style/*.scss',['sass', 'sass:user']); | ||
gulp.watch('./node_modules/bootstrap-v4-dev/scss/**/*',['bootstrap-v4-dev']); | ||
}); | ||
|
||
gulp.task('fonts', function() { | ||
return gulp.src('node_modules/font-awesome/fonts/*') | ||
.pipe(gulp.dest('home/static/home/fonts')) | ||
}); | ||
|
||
gulp.task('css:compile', ['sass', 'sass:user', 'font-awesome', 'bootstrap-v4-dev'], function () { | ||
console.log("Kompiluje pliki scss."); | ||
}); |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from __future__ import unicode_literals | ||
|
||
from django.apps import AppConfig | ||
|
||
|
||
class HomeConfig(AppConfig): | ||
name = 'home' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models | ||
|
||
# Create your models here. |
Oops, something went wrong.