https://github.com/norm/hasworn
A collection of historic clothes wearings
https://github.com/norm/hasworn
Last synced: 5 months ago
JSON representation
A collection of historic clothes wearings
- Host: GitHub
- URL: https://github.com/norm/hasworn
- Owner: norm
- Created: 2021-07-15T08:59:03.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-01-24T05:57:04.000Z (over 1 year ago)
- Last Synced: 2025-07-12T08:02:23.637Z (12 months ago)
- Language: Python
- Size: 241 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
hasworn
=======
A place to collection my tshirt wearing history.
## Pre-requisites for working locally
* docker and docker-compose: brew install --cask docker --or-- brew install docker docker-compose
* flask: pip install flask
* libsass: pip install libsass
* entr: brew install entr
## Generated static sites
Running in development:
# bring up the stack
export HASWORN_ENV=dev
./compose build
./start
# if this is a new checkout, or volumes have been removed
./manage collectstatic --noinput
./manage migrate
DJANGO_SUPERUSER_PASSWORD=norm ./manage createsuperuser \
--username norm --email norm@example.com --noinput
To test a generated hasworn site:
./manage import_csv sample/norm.csv
To preview the generated site:
./update_css
python static.py
To automatically remake the CSS when developing it:
find sass -type f | entr -d ./update_css
When done developing:
# shut down temporarily
./compose down
# shut down and remove volumes to start afresh (or when development stops)
./compose down --volumes --remove-orphans
## Scripts
Scripts to interact with docker-compose, using the right configuration and
environment files. These **default to production**; in development set the
environment variable `HASWORN_ENV=dev` first.
* **compose**
Run a docker-compose operation.
./compose down
* **start**
Bring up all hasworn services with docker-compose.
./start
* **manage**
Shortcut to running `manage.py` commands inside the app container.
./manage makemigrations
./manage migrate
* **cert**
Register Let's Encrypt certificates.
./cert