mirror of
https://framagit.org/la-chariotte/la-chariotte.git
synced 2025-05-18 03:31:51 +02:00
Compare commits
2 commits
8d7ba5e616
...
6a5491db5c
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6a5491db5c | ||
![]() |
9a434a341a |
7 changed files with 11 additions and 38 deletions
|
@ -6,7 +6,7 @@ started.
|
||||||
The first step is to clone the project, you can find more information about that in
|
The first step is to clone the project, you can find more information about that in
|
||||||
the [getting started guide](../install.md). Once that's done, you can:
|
the [getting started guide](../install.md). Once that's done, you can:
|
||||||
|
|
||||||
- choose a task [on the board](https://framagit.org/la-chariotte/la-chariotte/-/boards) and assign it to
|
- choose a task [on the board](https://gitlab.com/la-chariotte/la_chariotte/-/boards) and assign it to
|
||||||
yourself - if you don't know which task to do, feel free to reach to
|
yourself - if you don't know which task to do, feel free to reach to
|
||||||
us.
|
us.
|
||||||
- create a new branch **from develop** naming it to reflect what you want to do
|
- create a new branch **from develop** naming it to reflect what you want to do
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
- **docs.chariotte.fr**, the docs you are reading now. It's handled by [readthedocs.org](https://readthedocs.org).
|
- **docs.chariotte.fr**, the docs you are reading now. It's handled by [readthedocs.org](https://readthedocs.org).
|
||||||
- **chariotte.fr**, the main instance. It's deployed on Alwaysdata
|
- **chariotte.fr**, the main instance. It's deployed on Alwaysdata
|
||||||
- **blog.chariotte.fr**, our blog. It's [a static website](https://framagit.org/la-chariotte/la-chariotte.frama.io) deployed on Gitlab pages.
|
- **blog.chariotte.fr**, our blog. It's [a static website](https://gitlab.com/la-chariotte/la-chariotte.gitlab.io) deployed on Gitlab pages.
|
||||||
|
|
||||||
## The main instance
|
## The main instance
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
First, clone the project
|
First, clone the project
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://framagit.org/la-chariotte/la-chariotte.git
|
git clone git@gitlab.com:la-chariotte/la_chariotte.git
|
||||||
```
|
```
|
||||||
|
|
||||||
## Virtual environment
|
## Virtual environment
|
||||||
|
|
|
@ -12,11 +12,11 @@
|
||||||
Créer un nouveau lieu de distribution</a>
|
Créer un nouveau lieu de distribution</a>
|
||||||
</div>
|
</div>
|
||||||
{% if lieu_context.lieu_liste %}
|
{% if lieu_context.lieu_liste %}
|
||||||
|
<p class="is-size-4">Commandes groupées à venir</p>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Lieu</th>
|
<th>Lieu</th>
|
||||||
<th>Commandes</th>
|
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th>URL</th>
|
<th>URL</th>
|
||||||
<th> </th>
|
<th> </th>
|
||||||
|
@ -28,24 +28,6 @@
|
||||||
<td>
|
<td>
|
||||||
<a title="Détail du lieu de distribution" href="{% url 'lieu:lieu_update' lieu.url %}">{{ lieu }}</a>
|
<a title="Détail du lieu de distribution" href="{% url 'lieu:lieu_update' lieu.url %}">{{ lieu }}</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
{% if lieu.url in lieu_context.commandes.keys %}
|
|
||||||
{% for lieu_url, lieu_commandes in lieu_context.commandes.items %}
|
|
||||||
{% if lieu_url == lieu.url %}
|
|
||||||
{% for commande in lieu_commandes %}
|
|
||||||
{% url 'order:grouped_order_detail' code=commande.code as order_url %}
|
|
||||||
{% if order_url %}
|
|
||||||
<a href="{{ order_url }}">{{commande.name}}</a><br>
|
|
||||||
{% else %}
|
|
||||||
{{ commande.name }}<br>
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% else %}
|
|
||||||
Aucune
|
|
||||||
{% endif %}
|
|
||||||
</td>
|
|
||||||
<td>
|
<td>
|
||||||
{{ lieu.description }}
|
{{ lieu.description }}
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -11,7 +11,6 @@ from django.views import generic
|
||||||
from django_weasyprint import WeasyTemplateResponseMixin
|
from django_weasyprint import WeasyTemplateResponseMixin
|
||||||
from icalendar import Calendar, Event, vCalAddress, vText
|
from icalendar import Calendar, Event, vCalAddress, vText
|
||||||
|
|
||||||
from la_chariotte.order.models import GroupedOrder
|
|
||||||
from la_chariotte.order.views.mixins import UserIsOrgaMixin
|
from la_chariotte.order.views.mixins import UserIsOrgaMixin
|
||||||
|
|
||||||
from ..forms import LieuForm
|
from ..forms import LieuForm
|
||||||
|
@ -26,15 +25,9 @@ class IndexView(LoginRequiredMixin, generic.ListView):
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
lieux = Lieu.objects.filter(orga=self.request.user)
|
lieux = Lieu.objects.filter(orga=self.request.user)
|
||||||
commandes_par_lieu = dict()
|
|
||||||
for lieu in lieux:
|
|
||||||
orders = GroupedOrder.objects.all().filter(placekey=lieu)
|
|
||||||
if orders:
|
|
||||||
commandes_par_lieu[lieu.url] = orders
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"lieu_liste": lieux,
|
"lieu_liste": lieux,
|
||||||
"commandes": commandes_par_lieu,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,8 +52,6 @@ class LieuUpdateView(UserIsOrgaMixin, generic.UpdateView):
|
||||||
template_name = "lieu/lieu_update.html"
|
template_name = "lieu/lieu_update.html"
|
||||||
context_object_name = "lieu"
|
context_object_name = "lieu"
|
||||||
form_class = LieuForm
|
form_class = LieuForm
|
||||||
# Can't change URL after creation
|
|
||||||
form_class.base_fields["url"].disabled = True
|
|
||||||
|
|
||||||
def get_object(self, queryset=None):
|
def get_object(self, queryset=None):
|
||||||
return get_object_or_404(Lieu, url=self.kwargs.get("url"))
|
return get_object_or_404(Lieu, url=self.kwargs.get("url"))
|
||||||
|
|
|
@ -7,7 +7,7 @@ from sentry_sdk.integrations.django import DjangoIntegration
|
||||||
BASE_DIR = Path(__file__).resolve().parent.parent
|
BASE_DIR = Path(__file__).resolve().parent.parent
|
||||||
BASE_URL = os.getenv("BASE_URL", "http://127.0.0.1:8000")
|
BASE_URL = os.getenv("BASE_URL", "http://127.0.0.1:8000")
|
||||||
PROJECT_NAME = os.getenv("PROJECT_NAME", "La Chariotte")
|
PROJECT_NAME = os.getenv("PROJECT_NAME", "La Chariotte")
|
||||||
GITLAB_LINK = "https://framagit.org/la-chariotte/la-chariotte"
|
GITLAB_LINK = "https://gitlab.com/la-chariotte/la_chariotte"
|
||||||
CONTACT_MAIL = "contact@chariotte.fr"
|
CONTACT_MAIL = "contact@chariotte.fr"
|
||||||
HELLOASSO_LINK = "https://www.helloasso.com/associations/la-chariotte/"
|
HELLOASSO_LINK = "https://www.helloasso.com/associations/la-chariotte/"
|
||||||
FEEDBACK_LINK = "https://framaforms.org/votre-avis-sur-la-chariotte-1709742328"
|
FEEDBACK_LINK = "https://framaforms.org/votre-avis-sur-la-chariotte-1709742328"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
site_name: La chariotte
|
site_name: La chariotte
|
||||||
site_description: An application for grouped-orders
|
site_description: An application for grouped-orders
|
||||||
repo_name: la-chariotte/la_chariotte
|
repo_name: la-chariotte/la_chariotte
|
||||||
repo_url: https://framagit.org/la-chariotte/la-chariotte
|
repo_url: https://gitlab.com/la-chariotte/la_chariotte
|
||||||
nav:
|
nav:
|
||||||
- How-tos:
|
- How-tos:
|
||||||
- Getting started: install.md
|
- Getting started: install.md
|
||||||
|
|
Loading…
Reference in a new issue