Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Site Interludes
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mediatek
Site Interludes
Commits
ca2fa0c6
Commit
ca2fa0c6
authored
4 years ago
by
Jules Saget
Browse files
Options
Downloads
Patches
Plain Diff
Add Makefile
Update README.md to account for the Makefile
parent
28da81ac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+35
-0
35 additions, 0 deletions
Makefile
README.md
+18
-5
18 additions, 5 deletions
README.md
with
53 additions
and
5 deletions
Makefile
0 → 100644
+
35
−
0
View file @
ca2fa0c6
SHELL
:=
/bin/bash
PYTHON
:=
python3
MANAGER
:=
manage.py
DB
:=
db.sqlite3
.PHONY
:
help
help
:
##
Show this help
@
egrep
-h
'\s##\s'
$(
MAKEFILE_LIST
)
|
sort
|
awk
'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.PHONY
:
install
install
:
##
Install requirements
$(
PYTHON
)
-m
pip
install
--upgrade
pip
pip
install
-r
requirements.txt
.PHONY
:
migrate
migrate
:
##
Make and run migrations
$(
PYTHON
)
$(
MANAGER
)
makemigrations
$(
PYTHON
)
$(
MANAGER
)
migrate
.PHONY
:
serve
serve
:
##
Run the django server
$(
PYTHON
)
$(
MANAGER
)
runserver
.PHONY
:
start
start
:
install migrate serve
##
Install requirements
,
apply migrations
,
then start development server
.PHONY
:
clean
clean
:
##
Remove migrations and delete database
find
.
-path
"*/migrations/*.py"
-not
-name
"__init__.py"
-delete
find
.
-path
"*/migrations/*.pyc"
-delete
rm
$(
DB
)
.PHONY
:
test
test
:
##
Tests all the apps
$(
PYTHON
)
$(
MANAGER
)
test
This diff is collapsed.
Click to expand it.
README.md
+
18
−
5
View file @
ca2fa0c6
...
...
@@ -2,15 +2,25 @@
Ce répo contient le sites des interludes
## Lancement rapide
git clone https://git.eleves.ens.fr/dlesbre/site-interludes.git &&
cd site-interlude &&
python3 -m venv venv &&
source venv/bin/activate &&
make start
## Installation
Pour tester modifier le repo, après l'avoir cloné :
1.
Créer un environement virtuel (
`python3-venv`
)
1.
Créer un
[
environement
virtuel
](
https://docs.python.org/3/tutorial/venv.html
)
(
`python3-venv`
)
python3 -m venv venv
(si vous le nommez autre chose que venv, ajouter le dossier correspondant au `.gitignore`)
(si vous le nommez autre chose que venv, ajouter le dossier correspondant
au `.gitignore`)
2.
Lancer l'environnement virtuel
...
...
@@ -28,7 +38,8 @@ Pour tester modifier le repo, après l'avoir cloné :
Pour pouvoir afficher et tester le site (après avoir tout installé)
1.
Lancer l'environnement virtuel si ce n'est pas déjà fait (si le prompt du terminal ne commence pas par
`(venv)`
)
1.
Lancer l'environnement virtuel si ce n'est pas déjà fait (si le prompt du
terminal ne commence pas par
`(venv)`
)
source venv/bin/activate
...
...
@@ -36,6 +47,8 @@ Pour pouvoir afficher et tester le site (après avoir tout installé)
python manage.py runserver
Cette commande bloque le terminal, le serveur tourne tant qu'elle n'est pas interrompue (par `Ctrl+C` ou autre)
Cette commande bloque le terminal, le serveur tourne tant qu'elle n'est pas
interrompue (par
`Ctrl+C`
ou autre)
3.
Dans un navigateur, le site se trouve à l'adresse
[
http://localhost:8000/
](
http://localhost:8000/
)
3.
Dans un navigateur, le site se trouve à l'adresse
[
http://localhost:8000/
](
http://localhost:8000/
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment