Skip to content

Commit 1399563

Browse files
committed
working changes
1 parent deb8785 commit 1399563

File tree

11 files changed

+2394
-367
lines changed

11 files changed

+2394
-367
lines changed

.gitignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,5 +265,9 @@ dist
265265
.yarn/install-state.gz
266266
.pnp.*
267267

268-
# django-compressor cache output
269-
static/
268+
# static
269+
static/admin/*
270+
static/CACHE/*
271+
static/images/*
272+
static/modules/*
273+
!static/src/**

Makefile

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
1-
install:
1+
install-python:
22
pipenv sync
33

4-
run:
5-
pipenv run python manage.py runserver
4+
install-node:
5+
npm ci
6+
7+
collectstatic:
8+
pipenv run python manage.py collectstatic --noinput
9+
10+
prepare: install-python install-node collectstatic
611

712
migrate:
813
pipenv run python manage.py migrate
914

10-
collectstatic:
11-
pipenv run python manage.py collectstatic
15+
runserver:
16+
pipenv run python manage.py runserver
17+
18+
run-gunicorn:
19+
pipenv run gunicorn webserver.wsgi
1220

1321
tailwind-run:
1422
npx tailwindcss -i ./static/src/input.css -o ./static/src/output.css --watch
1523

1624
local:
17-
make -j 2 tailwind-run run
25+
make -j 2 tailwind-run runserver
1826
.PHONY: local

Pipfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ name = "pypi"
66
[packages]
77
django = "*"
88
django-compressor = "*"
9+
whitenoise = "*"
910

1011
[dev-packages]
1112
djlint = "*"
13+
gunicorn = "*"
1214

1315
[requires]
1416
python_version = "3.11"

Pipfile.lock

Lines changed: 381 additions & 355 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# example-django-app
2+
3+
## Instructions
4+
5+
Make sure you have [pipenv](https://pipenv.pypa.io/en/latest/) installed in your system
6+
7+
1. Install dependencies with `make prepare`
8+
2. Run migrations with `make migrate`
9+
3. Run the server with `make local`. This runs all processes required for local development (Django, tailwind-watch, etc)
10+
11+
## Features
12+
13+
- Whitenoise to serve static files in production
14+
- Tailwind CSS + flowbite
15+
- Django Debug Toolbar, Gunicorn

favicon.ico

-15 KB
Binary file not shown.

static/favicon.ico

2.19 KB
Binary file not shown.

static/src/input.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/* static/src/input.css */
2+
3+
@tailwind base;
4+
@tailwind components;
5+
@tailwind utilities;

0 commit comments

Comments
 (0)