parent
15cb6d815a
commit
9f1c47dd7d
@ -28,7 +28,7 @@ On peut aussi peupler les positions de référence qui serviront aux recherches
|
||||
|
||||
* ```make create-reference-locations```
|
||||
|
||||
Une fois l'installation réussie, la configuration du site est possible en allant modifier l'objet "Configuration du site" dans l'administration de django.
|
||||
Une fois l'installation réussie, la configuration du site est possible en allant modifier l'objet "Configuration du site" (```siteconfiguration```) dans l'administration de django. Il est également nécessaire (pas encore d'unification des deux facettes) de configurer un site (```Site```) en choisissant un nom et une url (nécessaire notamment pour le sitemap).
|
||||
|
||||
## Utilisation d'un proxy socket
|
||||
|
||||
|
@ -338,8 +338,10 @@ SCREENSHOT_FILE = settings.MEDIA_ROOT + "/screenshot.png"
|
||||
|
||||
@app.task(bind=True)
|
||||
def screenshot(self):
|
||||
from agenda_culturel.models import SiteConfiguration
|
||||
|
||||
downloader = ChromiumHeadlessDownloader(noimage=False)
|
||||
downloader.screenshot("https://pommesdelune.fr", SCREENSHOT_FILE)
|
||||
downloader.screenshot(SiteConfiguration.get_solo().site_url, SCREENSHOT_FILE)
|
||||
|
||||
|
||||
@worker_ready.connect
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,22 @@
|
||||
# Generated by Django 4.2.19 on 2025-04-02 21:35
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("agenda_culturel", "0161_siteconfiguration"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="siteconfiguration",
|
||||
name="site_url",
|
||||
field=models.CharField(
|
||||
default="https://pommesdelune.fr",
|
||||
max_length=255,
|
||||
verbose_name="Site url",
|
||||
),
|
||||
),
|
||||
]
|
@ -68,6 +68,9 @@ class SiteConfiguration(SingletonModel):
|
||||
site_name = models.CharField(
|
||||
verbose_name=_("Site name"), max_length=255, default="Pommes de lune"
|
||||
)
|
||||
site_url = models.CharField(
|
||||
verbose_name=_("Site url"), max_length=255, default="https://pommesdelune.fr"
|
||||
)
|
||||
site_description = models.CharField(
|
||||
verbose_name=_("Site description"),
|
||||
max_length=255,
|
||||
@ -2538,7 +2541,11 @@ class Event(models.Model):
|
||||
# Some properties are required to be compliant
|
||||
cal.add(
|
||||
"prodid",
|
||||
"-//" + SiteConfiguration.get_solo().site_name + "//pommesdelune.fr//",
|
||||
"-//"
|
||||
+ SiteConfiguration.get_solo().site_name
|
||||
+ "//"
|
||||
+ SiteConfiguration.get_solo().site_url
|
||||
+ "//",
|
||||
)
|
||||
cal.add("version", "2.0")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user