diff --git a/Dockerfile.local b/Dockerfile.local index 27e2296..6ab6eb8 100644 --- a/Dockerfile.local +++ b/Dockerfile.local @@ -32,4 +32,4 @@ COPY . . COPY --from=uv /usr/local/bin/uv /usr/local/bin/uv # Install Python dependencies -RUN uv sync --no-dev +RUN uv venv && uv sync --no-dev diff --git a/data/db.sqlite3 b/data/db.sqlite3 index 64e1ca9..fcd0522 100644 Binary files a/data/db.sqlite3 and b/data/db.sqlite3 differ diff --git a/docker-compose.yml b/docker-compose.yml index 0546222..e388c12 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,8 +6,8 @@ services: context: . dockerfile: Dockerfile.local command: > - sh -c "python manage.py migrate && - python manage.py runserver 0.0.0.0:8000" + sh -c "uv run manage.py migrate && + uv run manage.py runserver 0.0.0.0:8000" volumes: - .:/app - ./data/media:/app/data/media @@ -20,6 +20,7 @@ services: - CELERY_RESULT_BACKEND=redis://redis:6379/0 depends_on: - redis + restart: unless-stopped networks: - app-network node: @@ -27,13 +28,14 @@ services: context: . dockerfile: Dockerfile.local command: > - sh -c "python manage.py tailwind start" + sh -c "uv run manage.py tailwind start" volumes: - .:/app environment: - DJANGO_SETTINGS_MODULE=core.settings - CELERY_BROKER_URL=redis://redis:6379/0 - CELERY_RESULT_BACKEND=redis://redis:6379/0 + restart: unless-stopped depends_on: - redis networks: @@ -43,7 +45,7 @@ services: build: context: . dockerfile: Dockerfile.local - command: celery -A core worker --loglevel=info + command: uv run celery -A core worker --loglevel=info volumes: - .:/app - ./data/media:/app/data/media @@ -54,6 +56,7 @@ services: - CELERY_RESULT_BACKEND=redis://redis:6379/0 depends_on: - redis + restart: unless-stopped networks: - app-network @@ -61,7 +64,7 @@ services: build: context: . dockerfile: Dockerfile.local - command: celery -A core beat -s /app/data/celerybeat-schedule --loglevel=info + command: uv run celery -A core beat -s /app/data/celerybeat-schedule --loglevel=info volumes: - .:/app - ./data/media:/app/data/media @@ -73,6 +76,28 @@ services: depends_on: - redis - web + restart: unless-stopped + networks: + - app-network + celery_flower: + build: + context: . + dockerfile: Dockerfile.local + command: uv run celery -A core flower -s /app/data/celerybeat-schedule --loglevel=info + volumes: + - .:/app + - ./data/media:/app/data/media + - ./data/celery:/app/data/celery + environment: + - DJANGO_SETTINGS_MODULE=core.settings + - CELERY_BROKER_URL=redis://redis:6379/0 + - CELERY_RESULT_BACKEND=redis://redis:6379/0 + depends_on: + - redis + - web + restart: unless-stopped + ports: + - "5555:5555" networks: - app-network diff --git a/links/templates/links/link_form.html b/links/templates/links/link_form.html index a1b0ab6..b514503 100644 --- a/links/templates/links/link_form.html +++ b/links/templates/links/link_form.html @@ -78,7 +78,7 @@ name="{{ field.name }}" id="{{ field.id_for_label }}" value="{{ field.value|default_if_none:'' }}" - class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50" + class="shadow appearance-none rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" {% if field.field.required %}required{% endif %}> {% endif %} {% elif field.name == 'alias' and form.instance.pk %} @@ -87,7 +87,7 @@ name="{{ field.name }}" id="{{ field.id_for_label }}" value="{{ field.value|default_if_none:'' }}" - class="mt-1 block w-full rounded-md border-gray-300 bg-gray-100 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50" + class="shadow appearance-none rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" readonly>

{% trans "Alias cannot be changed after creation." %}

{% else %} @@ -96,7 +96,7 @@ name="{{ field.name }}" id="{{ field.id_for_label }}" value="{{ field.value|default_if_none:'' }}" - class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50" + class="shadow appearance-none rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" {% if field.field.required %}required{% endif %}> {% endif %} diff --git a/links/templates/links/link_list.html b/links/templates/links/link_list.html index 05a4c06..dfc0ef5 100644 --- a/links/templates/links/link_list.html +++ b/links/templates/links/link_list.html @@ -128,9 +128,34 @@ {{ link.click_count }} - {% trans "Edit" %} - {% trans "Delete" %} - {% trans "Details" %} +
+ + + + + + + + + + + + + + + + +
{% empty %} diff --git a/links/templates/links/page_form.html b/links/templates/links/page_form.html index d4747f0..d4b0e96 100644 --- a/links/templates/links/page_form.html +++ b/links/templates/links/page_form.html @@ -1,7 +1,10 @@ {% extends 'base.html' %} {% load i18n %} +{% load static %} {% block extra_css %} + + {% endblock %} @@ -54,7 +71,7 @@ {% if form.instance.pk %} {% trans "Edit Page" %} {% else %} - {% trans "New Page" %} + {% trans "New Bookmark Page" %} {% endif %} @@ -69,7 +86,7 @@
@@ -86,7 +103,7 @@
@@ -102,7 +119,7 @@
{% if form.summary.errors %} @@ -110,15 +127,15 @@ {% endif %} - +
- +
{% if form.content.errors %}

{{ form.content.errors.0 }}

@@ -166,7 +183,32 @@ {% endblock %} {% block extra_js %} + +