Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
amap
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
groupe-amap
amap
Commits
3064b6f9
Commit
3064b6f9
authored
Oct 11, 2016
by
Amap
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
On ne voit que les dates futures à la commande
parent
626d4b9e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
panier/forms.py
panier/forms.py
+11
-4
panier/templates/panier/aff_paniers.html
panier/templates/panier/aff_paniers.html
+2
-2
No files found.
panier/forms.py
View file @
3064b6f9
...
...
@@ -5,17 +5,24 @@ from django import forms
from
django.core.validators
import
MinValueValidator
from
.models
import
Panier
,
Paiement
,
Commande
,
Credit
,
Livraison
from
django.utils
import
timezone
class
NewCommandeForm
(
ModelForm
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
NewCommandeForm
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
# populates the post
self
.
fields
[
'date'
]
.
queryset
=
Livraison
.
objects
.
filter
(
date__gt
=
timezone
.
now
())
class
Meta
:
model
=
Commande
fields
=
[
'quantite'
,
'date'
]
class
BaseEditCommandeForm
(
NewCommandeForm
):
class
Meta
(
NewCommandeForm
.
Meta
):
class
BaseEditCommandeForm
(
ModelForm
):
class
Meta
:
model
=
Commande
fields
=
[
'quantite'
,
'date'
]
class
FullEditCommandeForm
(
New
CommandeForm
):
class
Meta
(
New
CommandeForm
.
Meta
):
class
FullEditCommandeForm
(
BaseEdit
CommandeForm
):
class
Meta
(
BaseEdit
CommandeForm
.
Meta
):
fields
=
'__all__'
class
SelectArticleForm
(
ModelForm
):
...
...
panier/templates/panier/aff_paniers.html
View file @
3064b6f9
...
...
@@ -46,7 +46,7 @@
{% if paniers_list.has_next %}
<li>
<a
href=
"?page1={{ paniers_list.next_page_number }}"
>
Précédents
</a></li>
<li><a
href
2
=
"?page1={{ paniers_list.paginator.page_range|length }}"
>
>>
</a></li>
<li><a
href=
"?page1={{ paniers_list.paginator.page_range|length }}"
>
>>
</a></li>
{% endif %}
</ul>
{% endif %}
...
...
@@ -109,7 +109,7 @@
{% if credit_list.has_next %}
<li>
<a
href=
"?page2={{ credit_list.next_page_number }}"
>
Précédents
</a></li>
<li><a
href
2
=
"?page2={{ credit_list.paginator.page_range|length }}"
>
>>
</a></li>
<li><a
href=
"?page2={{ credit_list.paginator.page_range|length }}"
>
>>
</a></li>
{% endif %}
</ul>
{% endif %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment