Compare commits
No commits in common. "9d142126b1d7a73de43878d0f5595a8e06955d4f" and "63504a5768e1f33a3ef3d0d31b2686001efd0648" have entirely different histories.
9d142126b1
...
63504a5768
|
@ -1,5 +1,4 @@
|
||||||
__pycache__
|
__pycache__
|
||||||
.venv
|
.venv
|
||||||
node_modules
|
node_modules
|
||||||
package-lock.json
|
package-lock.json
|
||||||
db.sqlite3
|
|
|
@ -12,7 +12,6 @@ RUN git clone https://git.kucharczyk.xyz/lukas/timetracker.git /home/timetracker
|
||||||
WORKDIR /home/timetracker/app
|
WORKDIR /home/timetracker/app
|
||||||
RUN chown -R timetracker /home/timetracker/app
|
RUN chown -R timetracker /home/timetracker/app
|
||||||
RUN poetry install
|
RUN poetry install
|
||||||
RUN make initialize
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
USER timetracker
|
USER timetracker
|
||||||
CMD [ "python3", "src/web/manage.py", "runserver", "0.0.0.0:8000" ]
|
CMD [ "python3", "src/web/manage.py", "runserver", "0.0.0.0:8000" ]
|
34
Makefile
34
Makefile
|
@ -1,34 +0,0 @@
|
||||||
.PHONY: createsuperuser
|
|
||||||
|
|
||||||
all: css migrate
|
|
||||||
|
|
||||||
initialize: css migrate loadplatforms
|
|
||||||
|
|
||||||
HTMLFILES := $(shell find src\web\tracker\templates -type f)
|
|
||||||
|
|
||||||
css: src\input.css $(HTMLFILES)
|
|
||||||
npx tailwindcss -i .\src\input.css -o .\src\web\tracker\static\base.css
|
|
||||||
|
|
||||||
css-dev: css
|
|
||||||
npx tailwindcss -i .\src\input.css -o .\src\web\tracker\static\base.css --watch
|
|
||||||
|
|
||||||
makemigrations:
|
|
||||||
python src\web\manage.py makemigrations
|
|
||||||
|
|
||||||
migrate: makemigrations
|
|
||||||
python src\web\manage.py migrate
|
|
||||||
|
|
||||||
dev: migrate
|
|
||||||
python src\web\manage.py runserver
|
|
||||||
|
|
||||||
dumptracker:
|
|
||||||
python src\web\manage.py dumpdata --format yaml tracker --output tracker_fixture.yaml
|
|
||||||
|
|
||||||
loadplatforms:
|
|
||||||
python src\web\manage.py loaddata platforms.yaml
|
|
||||||
|
|
||||||
loadsample:
|
|
||||||
python src\web\manage.py loaddata sample.yaml
|
|
||||||
|
|
||||||
createsuperuser:
|
|
||||||
python src\web\manage.py createsuperuser
|
|
|
@ -1,21 +0,0 @@
|
||||||
# Generated by Django 4.1.4 on 2023-01-02 18:55
|
|
||||||
|
|
||||||
import datetime
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("tracker", "0001_initial"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="session",
|
|
||||||
name="duration_manual",
|
|
||||||
field=models.DurationField(
|
|
||||||
blank=True, default=datetime.timedelta(0), null=True
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,23 +0,0 @@
|
||||||
# Generated by Django 4.1.4 on 2023-01-02 23:11
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
("tracker", "0002_alter_session_duration_manual"),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="session",
|
|
||||||
name="duration_manual",
|
|
||||||
field=models.DurationField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name="session",
|
|
||||||
name="timestamp_end",
|
|
||||||
field=models.DateTimeField(blank=True, null=True),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -31,8 +31,8 @@ class Platform(models.Model):
|
||||||
class Session(models.Model):
|
class Session(models.Model):
|
||||||
purchase = models.ForeignKey("Purchase", on_delete=models.CASCADE)
|
purchase = models.ForeignKey("Purchase", on_delete=models.CASCADE)
|
||||||
timestamp_start = models.DateTimeField()
|
timestamp_start = models.DateTimeField()
|
||||||
timestamp_end = models.DateTimeField(blank=True, null=True)
|
timestamp_end = models.DateTimeField()
|
||||||
duration_manual = models.DurationField(blank=True, null=True)
|
duration_manual = models.DurationField(blank=True, null=True, default=timedelta(0))
|
||||||
duration_calculated = models.DurationField(blank=True, null=True)
|
duration_calculated = models.DurationField(blank=True, null=True)
|
||||||
note = models.TextField(blank=True, null=True)
|
note = models.TextField(blank=True, null=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue