Commit graph

5,284 commits

Author SHA1 Message Date
aebf065449 Bring legacy django-reversion tables to the 3.x schema on start 2026-10-06 10:32:20 +03:00
a54ebfd749 Move to Python 3.8 and Django 2.2 dependency pins 2026-10-06 10:32:20 +03:00
f20e757777 Drop custom view_* permissions that clash with Django's built-in ones 2026-10-06 10:32:20 +03:00
7cbbbc0a3a Implement CMSMultiSiteMiddleware in the repo instead of the unmaintained fork 2026-10-06 10:32:20 +03:00
9c465422b6 Vendor stored_messages and cmsplugin_filer packages patched for Django 2 2026-10-06 10:32:20 +03:00
3f36b0899b Apply legacy migration dependencies before migrating 2026-10-06 01:10:06 +03:00
292f3d0513 Adapt code to django CMS 3.6 and Django 1.11
Decide the home redirect per request instead of querying at import time,
replace the removed _get_placeholder helper, stop shadowing the
is_superuser field, and set the seeded home page as the CMS home.
2026-10-06 01:10:06 +03:00
61af03b342 Use the merged django-meta template path 2026-10-06 01:10:06 +03:00
8e5761e62a Move settings and middleware to Django 1.11 style
Use MIDDLEWARE with adapted old-style middleware, the template context
processors, explicit bootstrap3 URLs, the captcha app name, and drop the
obsolete migration module overrides and removed apps.
2026-10-06 01:10:06 +03:00
b4e73d50c6 Pin dependencies for Django 1.11 2026-10-06 01:10:05 +03:00
8c1cfcfc11 Add a script to restore the snapshot into the compose stack 2026-10-05 22:59:58 +03:00
b003bbcc52 Add a Django 1.9 sample-database snapshot for testing migrations 2026-10-05 22:59:58 +03:00
2beebb9c9f Document the startup delay, the smoke test and the login behavior 2026-10-05 22:46:47 +03:00
a0d4ed2497 Add a smoke test that opens every site and logs in to the admin 2026-10-05 22:46:47 +03:00
07de15c795 Use plain Django login in dev when no LDAP server is configured 2026-10-05 22:46:47 +03:00
96639c4d4b Update VPS URL in Docker documentation for clarity 2026-10-01 13:13:49 +03:00
d4f765c400 Add network configuration to app build in docker-compose 2026-10-01 13:13:45 +03:00
920348637e Rewrite docker guide: VPS quick start, production checklist, known limits 2026-09-30 16:49:20 +03:00
fbc6c215ae Seed production-like content, and only into a database without page content 2026-09-30 16:35:15 +03:00
691863b78e Keep required settings strict and supply their dev values in .env.docker 2026-09-30 16:35:15 +03:00
31fe762077 Seed each site's pages with the CMS template it uses in production 2026-09-30 16:14:54 +03:00
748000afd9 Avoid nested hostnames when /dev-sites/ is opened on a site address 2026-09-30 16:03:37 +03:00
4379e9fb89 Disable caching and report the chosen site in dev responses
Adds Cache-Control: no-store and an X-Dev-Site header to the dev site
switcher so a browser cannot reuse another site's page or redirect, and
the selected site is visible in dev tools.
2026-09-30 15:52:54 +03:00
8874fe4298 Update docker guide for per-site hostnames and richer dummy data 2026-09-30 15:44:43 +03:00
e77a17b82f Seed richer dummy data with a fixed admin login
Each site gets a home page and four child pages, and there are twelve
dummy customers. The dummy admin password is now fixed through
DUMMY_ADMIN_PASSWORD. --purge removes all of it.
2026-09-30 15:44:43 +03:00
63c17a6cdf Choose the dev site from the hostname so tabs stay independent
The cookie is shared by all tabs and redirects dropped ?site=, so opening
several sites made them all show the last one. The site is now taken from
<domain>.<anything> hosts (each site its own origin), with ?site= and the
cookie as fallback, and redirects keep ?site=. /dev-sites/ links use the
per-site hostnames, via sslip.io when accessed by IP.
2026-09-30 15:44:43 +03:00
39ba7e5f21 Document dummy data in the docker guide 2026-09-30 15:33:02 +03:00
d6653400c6 Add optional dummy data seeding on start
The seed_dummy_data command creates one CMS page per site and a dummy
admin and customer, idempotently. --purge removes exactly what it
created. It runs on start when SEED_DUMMY_DATA=True and a failure does
not stop the web server.
2026-09-30 15:33:02 +03:00
17bf42c895 Read the secret key from the persisted key file when unset
docker compose exec skips the entrypoint, so commands run that way had no
DJANGO_SECRET_KEY. Fall back to the file the entrypoint writes.
2026-09-30 15:33:02 +03:00
fc4532e89b Add guide for running the docker compose stack 2026-09-30 14:54:38 +03:00
d4d3884d7c Add dev site switcher for testing every site from one host
With DEBUG on, ?site=<domain> selects the site without DNS or hosts
entries and is remembered in a cookie. /dev-sites/ lists all
configured sites as links.
2026-09-30 14:54:38 +03:00
619a20394e Add docker compose stack for test deployments
Runs postgres, redis, the web app and a celery worker. Dev defaults live
in .env.docker with an optional .env override. The entrypoint generates
and persists the Django secret key and waits for postgres; the web
service migrates and creates a Site row for every configured domain.
SQL dumps placed in db-init/ are restored on first start and are
git-ignored.
2026-09-30 14:54:38 +03:00
7fdd70022b Make the djangocms_blog column rename conditional
Databases created from scratch already have customuser_id, so the
unconditional rename failed on them.
2026-09-30 14:54:38 +03:00
3c9102167d Make settings tolerate missing environment values
env() accepts a default and treats empty values as unset. Values that
crashed startup when absent now fall back to safe defaults.
2026-09-30 14:54:38 +03:00
fdaf8a18a2 Fix Docker image build
Stop the libldap linker workaround from overwriting the real shared
library, and add the missing django-recaptcha requirement.
2026-09-30 14:54:38 +03:00
e4c50ca785 ha 2026-09-30 13:42:43 +03:00
PCoder
9cdf4593cf Remove hardcode 2025-05-27 12:02:15 +05:30
PCoder
f8ba89c193 Fix params passing to method 2025-05-27 11:47:48 +05:30
PCoder
018c3b5bba More debugging 2025-05-27 10:58:33 +05:30
PCoder
4e978f62ea More debug 2025-05-27 10:47:06 +05:30
PCoder
4c0a1fd07f Debug 2025-05-27 10:08:09 +05:30
PCoder
2ec89b6157 Print provisioning parameters 2025-05-21 15:23:13 +05:30
PCoder
8ffa2d9c3c Replace more f-strings 2025-05-21 11:27:22 +05:30
PCoder
b6239159b2 Remove f-strings to make things compatible 2025-05-21 11:17:15 +05:30
PCoder
60ddfa78b0 Handle getting the correct user_card_detail
Fixes

Traceback (most recent call last):
  File "<console>", line 2, in <module>
  File "/home/app/pyvenv/lib/python3.5/site-packages/django/db/models/manager.py", line 122, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/app/pyvenv/lib/python3.5/site-packages/django/db/models/query.py", line 391, in get
    (self.model._meta.object_name, num)
hosting.models.MultipleObjectsReturned: get() returned more than one UserCardDetail -- it returned 2!
2025-05-16 16:05:53 +05:30
PCoder
fc1dc37840 Update .gitignore 2025-03-29 12:55:17 +05:30
PCoder
ca099d8c83 Send error message only if there is an error 2025-03-27 16:21:33 +05:30
PCoder
8e9315b12d Fix separate messages for errors and inform admin about errors 2025-03-27 16:13:22 +05:30
PCoder
86836f3d1e Check those VMs that are displayed to the public 2025-03-27 15:39:24 +05:30
app@dynamicweb-production
94a9ac3147 Add change_fi_vatrate_2024.py management command 2024-09-26 11:13:56 +02:00