Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🪄 Clean Code, Clean Buisness #29

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e0f6d5b
Fix slow mode
Funasitien Aug 24, 2024
0921ca5
.gitshouldignore
Funasitien Aug 24, 2024
4e8f7d0
Ajout de pages 'static'
Funasitien Aug 24, 2024
a91bdfc
Simple, basique.
Funasitien Aug 24, 2024
04c4850
Fix Responsive
Funasitien Aug 25, 2024
97d40e8
Suggestion
Funasitien Aug 25, 2024
c441776
Permier compte brute-force
Funasitien Aug 25, 2024
6d3f538
Bruteforce mais plus classe
Funasitien Aug 25, 2024
e600254
Supposed hotfix for non-domain acess
Funasitien Aug 25, 2024
9d590f3
Police Custom Open Source
Funasitien Aug 25, 2024
5b2e038
J'avance mais plus de ram (sur mon tel) [sauvez moi]
Funasitien Aug 25, 2024
1f6ae5a
Test partout #1
Funasitien Aug 25, 2024
5d570cd
Test partout #2
Funasitien Aug 25, 2024
844e538
🗺️ Generateur V2 en route...
Funasitien Aug 27, 2024
689404e
🚧 Editeur V2
Funasitien Aug 28, 2024
ab144a2
🚧 Fix input desactivé
Funasitien Aug 28, 2024
1f4de34
🎨 Switch à tailwind compilé
Funasitien Aug 28, 2024
cdf2f04
🚧 Icones de doc bien placés
Funasitien Aug 28, 2024
8a57c3c
🚧 Encore des icones
Funasitien Aug 28, 2024
aafde1d
📝 Reformation des données
Funasitien Aug 28, 2024
fc16e78
🎨 Logo inutiles
Funasitien Aug 28, 2024
af74eb7
⚡️ Nouvelle compilation tailwind
Funasitien Aug 28, 2024
f254667
📝 Fusionement des pages
Funasitien Aug 28, 2024
5b9a918
📝 Trad et dropdown utile
Funasitien Aug 28, 2024
0f70d31
🎨 Icones cohérentes
Funasitien Aug 28, 2024
6abec88
📝 Fix.
Funasitien Aug 28, 2024
bdd5aed
🎨 Fixes divers
Funasitien Aug 28, 2024
56ab3d0
🎨 Fix nouvelle nav
Funasitien Aug 28, 2024
dd87995
🎨 Margin
Funasitien Aug 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
on:
push:
branches:
- main
branches: '*'


jobs:
Expand All @@ -24,4 +23,5 @@ jobs:
- name: Install dependencies
run: python -m pip install --upgrade pip flask pytest bcrypt libgravatar requests
- name: lauch tests
run: python -m pytest -v --runslow
run: python -m pytest -v
# --runslow atribute is not installed
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -314,4 +314,5 @@ $RECYCLE.BIN/
./devloweb.db
devloweb.db
*/devloweb.db
tmp/
tmp/
node_modules/
Binary file removed App/__pycache__/admin.cpython-311.pyc
Binary file not shown.
Binary file removed App/__pycache__/connexion.cpython-311.pyc
Binary file not shown.
Binary file removed App/__pycache__/inscription.cpython-311.pyc
Binary file not shown.
Binary file removed App/__pycache__/verification.cpython-311.pyc
Binary file not shown.
1 change: 1 addition & 0 deletions App/connexion.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def connexion(devlobdd):
session['email'] = email
session['ip'] = ip
session['ja_id'] = ja[0]
session['ja_name'] = ja[2]
session['avatar'] = Gravatar(email).get_image()
return redirect('/home')

Expand Down
5 changes: 3 additions & 2 deletions App/onthefly.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from flask import render_template, session, abort
from flask import render_template, session, abort, redirect, url_for
import json



def gen_on_the_fly(domain_name, devlobdd):
ja_site = devlobdd.get_ja_by_domain(domain_name)
if not ja_site:
return abort(404)
return redirect(url_for('index', domain=domain_name))
# return abort(404)
json_site = json.loads(open(f"tmp/{ja_site[0]}/site.json").read())
print(json_site)
return render_template(f"sites/{ja_site[2]}.html", data=json_site)
Binary file removed App/utils/__pycache__/bdd.cpython-311.pyc
Binary file not shown.
Binary file removed App/utils/__pycache__/email_api.cpython-311.pyc
Binary file not shown.
Binary file removed App/utils/__pycache__/utils.cpython-311.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Devloweb
Projet associatif développé par 3 jeunes un peu fou
Projet associatif développé par 3 jeunes un peu fou et un autre bien paumé

## Services
- Permet à n'importe quelle Junior Association d'avoir son propre site web
Expand Down
Binary file removed __pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file removed __pycache__/devloapp.cpython-311.pyc
Binary file not shown.
23 changes: 20 additions & 3 deletions devloapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ def close_connection(exception):
def index():
return render_template("index.html")

@app.route("/conditions")
def conditions():
return render_template("static/conditions.html")

@app.route("/privacy")
def privacy():
return render_template("static/privacy.html")

"""
ESPACE INSCRIPTION/CONNEXION
"""
Expand Down Expand Up @@ -91,6 +99,13 @@ def route_editeur():
return redirect(url_for('route_connexion'))
return render_template("home/editeur.html")

@app.route("/home/supernova", methods=("GET", "POST"))
def route_supernova():
# C'est le DASHBOARD Éditeur
print(session)
if 'email' not in session:
return redirect(url_for('route_connexion'))
return render_template("home/supernova.html")

@app.route("/pof", methods=("GET", "POST"))
def route_pof():
Expand Down Expand Up @@ -157,9 +172,12 @@ def logout():
"""
ESPACE SOUS-DOMAINES
"""
@app.route("/", subdomain="<ja_domain>")
#@app.route("/", subdomain="<ja_domain>")
def ja_website(username):
return username + ".your-domain.tld"
# print request.headers['Host'] # prints "domain1.com"


"""
ESPACE ERREURS
"""
Expand All @@ -182,5 +200,4 @@ def route_ja(ja_domain):


if __name__ == "__main__":
# therms-and-conditions
app.run(host="0.0.0.0", port=5555)
app.run(host="0.0.0.0", port=5555)
Binary file modified devlobdd.db
Binary file not shown.
76 changes: 42 additions & 34 deletions ressources/base/site.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,28 @@
{
"header": {
"title": "",
"nav": [
"",
"",
"",
"",
""
]
},
"hero": {
"enable": true,
"headline": "",
"subheadline": "",
"cta": ""
},
"about": {
"enable": true,
"title": "",
"description": ""
},
"valeurs":
[
{
"title": "",
"description": ""
},
{
"title": "",
"description": ""
},
"valeurs": {
"enable": true,
"title": "",
"list": [
{
"title": "",
"icon": "",
"name": "",
"description": ""
}
],
"membres": {
]
},
"members": {
"enable": true,
"title": "",
"list": [
{
Expand All @@ -43,17 +32,36 @@
}
]
},
"footer": {
"copyright": "",
"reseaux": [
"",
"",
""
],
"links": [
"",
"",
""
"galery": {
"enable": true,
"title": "",
"list": [
{
"image": "",
"description": ""
}
]
},
"social": {
"discord": {
"id": 123456789,
"invite": ""
},
"instagram": {
"alt": "",
"post": ""
},
"github": {
"alt": "",
"repo": ""
},
"youtube": {
"alt": "",
"video": ""
},
"twitter": "",
"bluesky": "",
"mastodon": "",
"twitch": ""
}
}
3 changes: 3 additions & 0 deletions static/base.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
Binary file added static/favicon.ico
Binary file not shown.
Binary file added static/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/logo_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading