This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def tracking3(request): | |
''' | |
affiche tous les type d'element ainsi que leur versions et leurs champs | |
''' | |
#cherche les types | |
type_elements = type_element.objects.order_by('famille', 'type') | |
#cherche les versions | |
versions = version.objects.select_related('type_element').order_by('type_element', 'modele', 'vers') | |
versions_dict = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@login_required | |
def report(request): | |
end = get_week_dates(datetime.now())[1] | |
begin = get_week_dates(datetime.now()-timedelta(days=7))[0] | |
if request.method == 'GET': | |
data = request.GET.copy() | |
if data: | |
form = AgendaForm(data, auto_id = True, initial={'begin':begin, 'end':end}) | |
if form.is_valid(): | |
if 'begin' in form.data and 'end' in form.data: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class feuille_de_route(models.Model): | |
''' | |
cree commande : en_route == True reste False | |
construction : en_route == True + instrument_set==1 reste False | |
testfinal : en_route == True + instrument_set==1 testfinal == True reste False | |
a partir : en_route == True + instrument_set==1 testfinal == False a_partir == True reste False | |
chez client : all False | |
''' | |
code = models.CharField( max_length = 100, unique = True) | |
sn_instrument = models.CharField( max_length = 100, null = True, blank=True) |