-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 323e78e
Showing
20 changed files
with
167 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FLASK_APP=jobs.app | ||
FLASK_ENV=development |
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,65 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# 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 | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# Editors | ||
.vscode | ||
.idea | ||
|
||
# macOS | ||
.DS_Store | ||
|
||
# Virtualenv | ||
venv/ |
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 @@ | ||
# Build a Job Board with Python & Flask |
Empty 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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import sqlite3 | ||
from flask import Flask, render_template | ||
|
||
app = Flask(__name__) | ||
|
||
db = sqlite3.connect( | ||
'jobs/db.sqlite3', detect_types=sqlite3.PARSE_DECLTYPES | ||
) | ||
|
||
# Job | ||
# Title | ||
# Description | ||
# Salary | ||
# Tag | ||
|
||
@app.route('/') | ||
@app.route('/jobs') | ||
def jobs(): | ||
return render_template('index.html') | ||
|
||
|
||
@app.route('/job/<job_id>') | ||
def job(job_id): | ||
return render_template('job.html') | ||
|
||
# Employer | ||
# name | ||
# description | ||
# address | ||
|
||
# Review | ||
# rating | ||
# title | ||
# date | ||
# status (current/former) | ||
|
||
@app.route('/employer/<employer_id>') | ||
def employer(employer_id): | ||
return render_template('employer.html') | ||
|
||
# User | ||
# username | ||
# password | ||
# name | ||
# phone | ||
# role_id | ||
|
||
# Role | ||
# type | ||
|
||
|
||
@app.route('/user/<user_id>') | ||
def user(user_id): | ||
return render_template('user.html') | ||
|
||
|
||
@app.route('/admin') | ||
def admin(): | ||
return render_template('admin.html') |
Binary file not shown.
Empty 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{% block content %} | ||
<h1>Admin</h1> | ||
{% endblock %} |
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,3 @@ | ||
{% block content %} | ||
<h1>Employer</h1> | ||
{% endblock %} |
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,3 @@ | ||
{% block content %} | ||
<h1>Index</h1> | ||
{% endblock %} |
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,3 @@ | ||
{% block content %} | ||
<h1>Job</h1> | ||
{% endblock %} |
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,11 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title></title> | ||
<link rel="stylesheet" href="{{ url_for('static', filename='css/styles.css') }}"> | ||
</head> | ||
<body> | ||
{% block content %} | ||
{% endblock %} | ||
</body> | ||
</html> |
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,3 @@ | ||
{% block content %} | ||
<h1>User</h1> | ||
{% endblock %} |
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,3 @@ | ||
Flask==1.0.2 | ||
pytest==3.6.3 | ||
python-dotenv==0.8.2 |
Empty 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import pytest | ||
import sys | ||
import pprint | ||
|
||
from jobs import app | ||
|
||
@pytest.mark.testing_import | ||
def test_import(): | ||
imports = ['os','Flask', 'sqlite3'] | ||
types = [v + ':' + str(eval('type(app.' + v + ')')) for v in dir(app) if not v.startswith("__") and v not in imports] |
Empty file.
Empty file.
Empty file.
Empty file.