added basic style and navbar
rodzic
fedd0bee20
commit
8db06afb86
|
@ -135,3 +135,6 @@ GitHub.sublime-settings
|
||||||
!.vscode/launch.json
|
!.vscode/launch.json
|
||||||
!.vscode/extensions.json
|
!.vscode/extensions.json
|
||||||
.history
|
.history
|
||||||
|
|
||||||
|
#postgres pass files
|
||||||
|
*.my_pgpass
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Use an official Python runtime based on Debian 10 "buster" as a parent image.
|
# Use an official Python runtime based on Debian 10 "buster" as a parent image.
|
||||||
FROM python:3.8.1-slim-buster
|
FROM python:3.11.3-buster
|
||||||
|
|
||||||
# Add user that will be used in the container.
|
# Add user that will be used in the container.
|
||||||
RUN useradd wagtail
|
RUN useradd wagtail
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
# Use an official Python runtime based on Debian 10 "buster" as a parent image.
|
||||||
|
FROM python:3.11.3-buster
|
||||||
|
|
||||||
|
# Port used by this container to serve HTTP.
|
||||||
|
EXPOSE 8000
|
||||||
|
|
||||||
|
# Set environment variables.
|
||||||
|
# 1. Force Python stdout and stderr streams to be unbuffered.
|
||||||
|
# 2. Set PORT variable that is used by Gunicorn. This should match "EXPOSE"
|
||||||
|
# command.
|
||||||
|
ENV PYTHONDONTWRITEBYTECODE 1
|
||||||
|
ENV PYTHONUNBUFFERED 1
|
||||||
|
|
||||||
|
# Install system packages required by Wagtail and Django.
|
||||||
|
RUN apt-get update --yes --quiet && apt-get install --yes --quiet --no-install-recommends \
|
||||||
|
build-essential \
|
||||||
|
libpq-dev \
|
||||||
|
libmariadbclient-dev \
|
||||||
|
libjpeg62-turbo-dev \
|
||||||
|
zlib1g-dev \
|
||||||
|
libwebp-dev \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install the project requirements.
|
||||||
|
COPY requirements.txt /
|
||||||
|
RUN pip install -r /requirements.txt
|
||||||
|
|
||||||
|
# Use /app folder as a directory where the source code is stored.
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy the source code of the project into the container.
|
||||||
|
COPY ./ /app
|
||||||
|
|
||||||
|
# Collect static files.
|
||||||
|
RUN python manage.py collectstatic --noinput --clear
|
||||||
|
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
|
|
@ -88,12 +88,13 @@ WSGI_APPLICATION = "artel.wsgi.application"
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases
|
# https://docs.djangoproject.com/en/4.1/ref/settings/#databases
|
||||||
|
import dj_database_url as db_url
|
||||||
|
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
"default": {
|
"default": db_url.parse(
|
||||||
"ENGINE": "django.db.backends.sqlite3",
|
"postgres://comfy:password@db/comfy_shop"
|
||||||
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
|
)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 33 KiB |
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
{# Global stylesheets #}
|
{# Global stylesheets #}
|
||||||
<link rel="stylesheet" type="text/css" href="{% static 'css/artel.css' %}">
|
<link rel="stylesheet" type="text/css" href="{% static 'css/artel.css' %}">
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block extra_css %}
|
||||||
{# Override this in templates to add extra stylesheets #}
|
{# Override this in templates to add extra stylesheets #}
|
||||||
|
@ -34,17 +35,20 @@
|
||||||
|
|
||||||
<body class="{% block body_class %}{% endblock %}">
|
<body class="{% block body_class %}{% endblock %}">
|
||||||
{% wagtailuserbar %}
|
{% wagtailuserbar %}
|
||||||
<div class="row">
|
<div class="container">
|
||||||
<div class="col s3">
|
<div class="row">
|
||||||
{% main_menu template="menu/custom_main_menu.html" %}
|
<div class="col-3">
|
||||||
</div>
|
{% main_menu max_levels=3 template="menu/custom_main_menu.html" %}
|
||||||
<div class="col s9">
|
</div>
|
||||||
{% block content %}{% endblock %}
|
<div class="col-9 mt-5 ml-2">
|
||||||
|
{% block content %}{% endblock %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# Global javascript #}
|
{# Global javascript #}
|
||||||
<script type="text/javascript" src="{% static 'js/artel.js' %}"></script>
|
<script type="text/javascript" src="{% static 'js/artel.js' %}"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block extra_js %}
|
||||||
{# Override this in templates to add extra javascript #}
|
{# Override this in templates to add extra javascript #}
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
<ul>
|
{% load static %}
|
||||||
{% for item in menu_items %}
|
<div class="d-flex flex-column flex-shrink-0 p-3 mr-5" style="width: 280px;">
|
||||||
<li class="{{ item.active_class }}">
|
<svg class="bi me-2" width="40" height="32">
|
||||||
<a href="{{ item.href }}">{{ item.text }}</a>
|
<img src="{% static 'images/las_ruinas_PL.png' %}"/>
|
||||||
{% if item.sub_menu %}
|
</svg>
|
||||||
<ul class="sub-menu">
|
<hr>
|
||||||
{% for sub_item in item.sub_menu.items %}
|
<ul class="nav nav-pills flex-column mb-auto">
|
||||||
<li class="{{ sub_item.active_class }}"><a href="{{ sub_item.href }}">{{ sub_item.text }}</a></li>
|
{% for item in menu_items %}
|
||||||
{% endfor %}
|
<li class="nav-item">
|
||||||
</ul>
|
<a href="{{ item.href }}" class="nav-link" aria-current="page">
|
||||||
{% endif %}
|
{{ item.text }}
|
||||||
</li>
|
</a>
|
||||||
{% endfor %}
|
</li>
|
||||||
</ul>
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
</div>
|
|
@ -0,0 +1,20 @@
|
||||||
|
version: "3.8"
|
||||||
|
services:
|
||||||
|
comfy:
|
||||||
|
build:
|
||||||
|
dockerfile: Dockerfile.local
|
||||||
|
context: ./
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
volumes:
|
||||||
|
- .:/app
|
||||||
|
db:
|
||||||
|
image: postgres
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
POSTGRES_ROOT_PASSWORD: password
|
||||||
|
POSTGRES_USER: comfy
|
||||||
|
POSTGRES_PASSWORD: password
|
||||||
|
POSTGRES_DB: comfy_shop
|
||||||
|
volumes:
|
||||||
|
- ../postgres/:/var/lib/postgresql
|
|
@ -1,3 +1,5 @@
|
||||||
Django>=4.1,<4.2
|
Django>=4.1,<4.2
|
||||||
wagtail>=4.2,<4.3
|
wagtail>=4.2,<4.3
|
||||||
wagtailmenus>=3.1.5, <=3.1.7
|
wagtailmenus>=3.1.5,<=3.1.7
|
||||||
|
psycopg2>=2.9.5,<=2.9.6
|
||||||
|
dj-database-url<=2.0.0
|
||||||
|
|
|
@ -31,4 +31,3 @@ class ProductConfig(models.Model):
|
||||||
class Product(models.Model):
|
class Product(models.Model):
|
||||||
template = models.ForeignKey(ProductTemplate, on_delete=models.CASCADE)
|
template = models.ForeignKey(ProductTemplate, on_delete=models.CASCADE)
|
||||||
config = models.ForeignKey(ProductConfig, on_delete=models.CASCADE)
|
config = models.ForeignKey(ProductConfig, on_delete=models.CASCADE)
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue