mirror of
https://framagit.org/la-chariotte/la-chariotte.git
synced 2025-05-17 19:21:50 +02:00
Compare commits
4 commits
6a5491db5c
...
8d7ba5e616
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8d7ba5e616 | ||
![]() |
f2d8d9b9c2 | ||
![]() |
19c4a0b6ed | ||
![]() |
9589bcf48d |
7 changed files with 38 additions and 11 deletions
|
@ -6,7 +6,7 @@ started.
|
|||
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:
|
||||
|
||||
- choose a task [on the board](https://gitlab.com/la-chariotte/la_chariotte/-/boards) and assign it to
|
||||
- choose a task [on the board](https://framagit.org/la-chariotte/la-chariotte/-/boards) and assign it to
|
||||
yourself - if you don't know which task to do, feel free to reach to
|
||||
us.
|
||||
- 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).
|
||||
- **chariotte.fr**, the main instance. It's deployed on Alwaysdata
|
||||
- **blog.chariotte.fr**, our blog. It's [a static website](https://gitlab.com/la-chariotte/la-chariotte.gitlab.io) deployed on Gitlab pages.
|
||||
- **blog.chariotte.fr**, our blog. It's [a static website](https://framagit.org/la-chariotte/la-chariotte.frama.io) deployed on Gitlab pages.
|
||||
|
||||
## The main instance
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
First, clone the project
|
||||
|
||||
```bash
|
||||
git clone git@gitlab.com:la-chariotte/la_chariotte.git
|
||||
git clone https://framagit.org/la-chariotte/la-chariotte.git
|
||||
```
|
||||
|
||||
## Virtual environment
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
Créer un nouveau lieu de distribution</a>
|
||||
</div>
|
||||
{% if lieu_context.lieu_liste %}
|
||||
<p class="is-size-4">Commandes groupées à venir</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Lieu</th>
|
||||
<th>Commandes</th>
|
||||
<th>Description</th>
|
||||
<th>URL</th>
|
||||
<th> </th>
|
||||
|
@ -28,6 +28,24 @@
|
|||
<td>
|
||||
<a title="Détail du lieu de distribution" href="{% url 'lieu:lieu_update' lieu.url %}">{{ lieu }}</a>
|
||||
</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>
|
||||
{{ lieu.description }}
|
||||
</td>
|
||||
|
|
|
@ -11,6 +11,7 @@ from django.views import generic
|
|||
from django_weasyprint import WeasyTemplateResponseMixin
|
||||
from icalendar import Calendar, Event, vCalAddress, vText
|
||||
|
||||
from la_chariotte.order.models import GroupedOrder
|
||||
from la_chariotte.order.views.mixins import UserIsOrgaMixin
|
||||
|
||||
from ..forms import LieuForm
|
||||
|
@ -25,9 +26,15 @@ class IndexView(LoginRequiredMixin, generic.ListView):
|
|||
|
||||
def get_queryset(self):
|
||||
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 {
|
||||
"lieu_liste": lieux,
|
||||
"commandes": commandes_par_lieu,
|
||||
}
|
||||
|
||||
|
||||
|
@ -52,6 +59,8 @@ class LieuUpdateView(UserIsOrgaMixin, generic.UpdateView):
|
|||
template_name = "lieu/lieu_update.html"
|
||||
context_object_name = "lieu"
|
||||
form_class = LieuForm
|
||||
# Can't change URL after creation
|
||||
form_class.base_fields["url"].disabled = True
|
||||
|
||||
def get_object(self, queryset=None):
|
||||
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_URL = os.getenv("BASE_URL", "http://127.0.0.1:8000")
|
||||
PROJECT_NAME = os.getenv("PROJECT_NAME", "La Chariotte")
|
||||
GITLAB_LINK = "https://gitlab.com/la-chariotte/la_chariotte"
|
||||
GITLAB_LINK = "https://framagit.org/la-chariotte/la-chariotte"
|
||||
CONTACT_MAIL = "contact@chariotte.fr"
|
||||
HELLOASSO_LINK = "https://www.helloasso.com/associations/la-chariotte/"
|
||||
FEEDBACK_LINK = "https://framaforms.org/votre-avis-sur-la-chariotte-1709742328"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
site_name: La chariotte
|
||||
site_description: An application for grouped-orders
|
||||
repo_name: la-chariotte/la_chariotte
|
||||
repo_url: https://gitlab.com/la-chariotte/la_chariotte
|
||||
repo_url: https://framagit.org/la-chariotte/la-chariotte
|
||||
nav:
|
||||
- How-tos:
|
||||
- Getting started: install.md
|
||||
|
|
Loading…
Reference in a new issue