conflict solved
This commit is contained in:
commit
fff7a2022b
972 changed files with 241 additions and 78416 deletions
19
kfet/migrations/0047_auto_20170104_1528.py
Normal file
19
kfet/migrations/0047_auto_20170104_1528.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('kfet', '0046_account_created_at'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='account',
|
||||
name='promo',
|
||||
field=models.IntegerField(blank=True, choices=[(1980, 1980), (1981, 1981), (1982, 1982), (1983, 1983), (1984, 1984), (1985, 1985), (1986, 1986), (1987, 1987), (1988, 1988), (1989, 1989), (1990, 1990), (1991, 1991), (1992, 1992), (1993, 1993), (1994, 1994), (1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017)], default=2016, null=True),
|
||||
),
|
||||
]
|
|
@ -8,5 +8,5 @@ from channels.routing import route, route_class
|
|||
from kfet import consumers
|
||||
|
||||
channel_routing = [
|
||||
route_class(consumers.KPsul, path=r"^ws/k-fet/k-psul/$"),
|
||||
route_class(consumers.KPsul, path=r"^/ws/k-fet/k-psul/$"),
|
||||
]
|
||||
|
|
|
@ -8,7 +8,7 @@ input[type=number]::-webkit-outer-spin-button {
|
|||
margin: 0;
|
||||
}
|
||||
|
||||
#account, #checkout, input, #history, #basket, #basket_rel, #articles_data {
|
||||
#account, #checkout, input, #history, #basket, #basket_rel, #previous_op, #articles_data {
|
||||
background:#fff;
|
||||
}
|
||||
|
||||
|
@ -335,12 +335,13 @@ input[type=number]::-webkit-outer-spin-button {
|
|||
padding:0;
|
||||
}
|
||||
|
||||
#basket, #basket_rel {
|
||||
#basket, #basket_rel, #previous_op {
|
||||
height:100%;
|
||||
}
|
||||
|
||||
#basket_rel {
|
||||
#basket_rel, #previous_op {
|
||||
border-top:1px solid #C8102E;
|
||||
padding-left: 3px;
|
||||
}
|
||||
|
||||
#basket {
|
||||
|
@ -354,6 +355,11 @@ input[type=number]::-webkit-outer-spin-button {
|
|||
#basket_rel {
|
||||
border-top:0;
|
||||
margin-left:7px;
|
||||
margin-right:7px;
|
||||
}
|
||||
#previous_op {
|
||||
border-top:0;
|
||||
margin-left:7px;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -385,6 +391,16 @@ input[type=number]::-webkit-outer-spin-button {
|
|||
|
||||
/* History */
|
||||
|
||||
#previous_op .trigramme {
|
||||
width:100%;
|
||||
background-color:rgba(200,16,46,0.85);
|
||||
color:#FFF;
|
||||
font-weight:bold;
|
||||
padding:3px;
|
||||
margin-left: -3px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.kpsul_middle_right_col {
|
||||
overflow:auto;
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ function amountDisplay(amount, is_cof=false, tri='') {
|
|||
|
||||
function amountToUKF(amount, is_cof=false) {
|
||||
var coef_cof = is_cof ? 1 + settings['subvention_cof'] / 100 : 1;
|
||||
return Math.round(amount * coef_cof * 10);
|
||||
return Math.floor(amount * coef_cof * 10);
|
||||
}
|
||||
|
||||
function isValidTrigramme(trigramme) {
|
||||
|
|
|
@ -138,10 +138,14 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="col-sm-3">
|
||||
<div id="basket_rel">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div id="previous_op">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -250,10 +254,13 @@ $(document).ready(function() {
|
|||
}
|
||||
if (account_data['id'] == 0) {
|
||||
var trigramme = triInput.val().toUpperCase();
|
||||
var url_base = '{% url 'kfet.account.create' %}'
|
||||
if (isValidTrigramme(trigramme)) {
|
||||
var url_base = '{% url 'kfet.account.create' %}'
|
||||
trigramme = encodeURIComponent(trigramme);
|
||||
buttons += '<a href="'+url_base+'?trigramme='+trigramme+'" class="btn btn-primary" target="_blank" title="Créer"><span class="glyphicon glyphicon-plus"></span></a>';
|
||||
} else {
|
||||
var url_base = '{% url 'kfet.account' %}'
|
||||
buttons += '<a href="'+url_base+'" class="btn btn-primary" target="_blank" title="Rechercher"><span class="glyphicon glyphicon-search"></span></a>';
|
||||
}
|
||||
}
|
||||
account_container.find('.buttons').html(buttons);
|
||||
|
@ -473,6 +480,7 @@ $(document).ready(function() {
|
|||
},
|
||||
})
|
||||
.done(function(data) {
|
||||
updatePreviousOp();
|
||||
coolReset();
|
||||
lock = 0;
|
||||
})
|
||||
|
@ -1045,6 +1053,20 @@ $(document).ready(function() {
|
|||
});
|
||||
}
|
||||
|
||||
var previousop_container = $('#previous_op');
|
||||
|
||||
function updatePreviousOp() {
|
||||
var previousop_html = '';
|
||||
var trigramme = account_data['trigramme'];
|
||||
previousop_html += '<div class="trigramme">Trigramme : '+trigramme+'</div>';
|
||||
previousop_html += basketrel_container.html();
|
||||
previousop_container.html(previousop_html);
|
||||
}
|
||||
|
||||
function resetPreviousOp() {
|
||||
previousop_container.html('');
|
||||
}
|
||||
|
||||
// -----
|
||||
// Addcost
|
||||
// -----
|
||||
|
@ -1213,6 +1235,7 @@ $(document).ready(function() {
|
|||
coolReset(give_tri_focus);
|
||||
checkoutInput.trigger('change');
|
||||
resetArticles();
|
||||
resetPreviousOp();
|
||||
khistory.reset();
|
||||
resetSettings();
|
||||
getArticles();
|
||||
|
|
|
@ -9,6 +9,7 @@ from django.utils.html import escape
|
|||
from django.utils.safestring import mark_safe
|
||||
from django.core.cache import cache
|
||||
from kfet.models import Settings
|
||||
from math import floor
|
||||
import re
|
||||
|
||||
register = template.Library()
|
||||
|
|
144
kfet/tests.py
144
kfet/tests.py
|
@ -1,144 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import (absolute_import, division,
|
||||
print_function, unicode_literals)
|
||||
from builtins import *
|
||||
from django.test import TestCase
|
||||
|
||||
from kfet.models import Account
|
||||
from gestioncof.models import CofProfile, User
|
||||
|
||||
|
||||
|
||||
names = ['Abelardus',
|
||||
'Abrahamus',
|
||||
'Acacius',
|
||||
'Accius',
|
||||
'Achaicus',
|
||||
'Achill',
|
||||
'Achilles',
|
||||
'Achilleus',
|
||||
'Acrisius',
|
||||
'Actaeon',
|
||||
'Acteon',
|
||||
'Adalricus',
|
||||
'Adelfonsus',
|
||||
'Adelphus',
|
||||
'Adeodatus',
|
||||
'Adolfus',
|
||||
'Adolphus',
|
||||
'Adrastus',
|
||||
'Adrianus',
|
||||
'Ægidius',
|
||||
'Ælia',
|
||||
'Ælianus',
|
||||
'Æmilianus',
|
||||
'Æmilius',
|
||||
'Aeneas',
|
||||
'Æolus',
|
||||
'Æschylus',
|
||||
'Æson',
|
||||
'Æsop',
|
||||
'Æther',
|
||||
'Ætius',
|
||||
'Agapetus',
|
||||
'Agapitus',
|
||||
'Agapius',
|
||||
'Agathangelus',
|
||||
'Aigidius',
|
||||
'Aiolus',
|
||||
'Ajax',
|
||||
'Alair',
|
||||
'Alaricus',
|
||||
'Albanus',
|
||||
'Alberic',
|
||||
'Albericus',
|
||||
'Albertus',
|
||||
'Albinus',
|
||||
'Albus',
|
||||
'Alcaeus',
|
||||
'Alcander',
|
||||
'Alcimus',
|
||||
'Alcinder',
|
||||
'Alerio',
|
||||
'Alexandrus',
|
||||
'Alexis',
|
||||
'Alexius',
|
||||
'Alexus',
|
||||
'Alfonsus',
|
||||
'Alfredus',
|
||||
'Almericus',
|
||||
'Aloisius',
|
||||
'Aloysius',
|
||||
'Alphaeus',
|
||||
'Alpheaus',
|
||||
'Alpheus',
|
||||
'Alphoeus',
|
||||
'Alphonsus',
|
||||
'Alphonzus',
|
||||
'Alvinius',
|
||||
'Alvredus',
|
||||
'Amadeus',
|
||||
'Amaliricus',
|
||||
'Amandus',
|
||||
'Amantius',
|
||||
'Amarandus',
|
||||
'Amaranthus',
|
||||
'Amatus',
|
||||
'Ambrosianus',
|
||||
'Ambrosius',
|
||||
'Amedeus',
|
||||
'Americus',
|
||||
'Amlethus',
|
||||
'Amletus',
|
||||
'Amor',
|
||||
'Ampelius',
|
||||
'Amphion',
|
||||
'Anacletus',
|
||||
'Anastasius',
|
||||
'Anastatius',
|
||||
'Anastius',
|
||||
'Anatolius',
|
||||
'Androcles',
|
||||
'Andronicus',
|
||||
'Anencletus',
|
||||
'Angelicus',
|
||||
'Angelus',
|
||||
'Anicetus',
|
||||
'Antigonus',
|
||||
'Antipater',
|
||||
'Antoninus',
|
||||
'Antonius',
|
||||
'Aphrodisius',
|
||||
'Apollinaris']
|
||||
|
||||
class TestFoo(TestCase):
|
||||
fixtures = ['users', 'sites', 'gestion', 'articles']
|
||||
|
||||
def test_foo(self):
|
||||
pass
|
||||
# for name in names:
|
||||
# user = User(username=name,
|
||||
# last_name='Romain',
|
||||
# first_name=name)
|
||||
# user.email = '{}.{}@ens.fr'.format(user.first_name, user.last_name)
|
||||
# user.save()
|
||||
|
||||
# galois_trigrammes = map('{:03d}'.format, range(40))
|
||||
# galois = CofProfile.objects.filter(user__last_name='Gaulois')
|
||||
|
||||
# romains_trigrammes = map(lambda x: str(100+x), range(40))
|
||||
# romains = CofProfile.objects.filter(user__last_name='Romain')
|
||||
|
||||
# for t, c in zip(galois_trigrammes, galois):
|
||||
# Account.objects.create(cofprofile=c, trigramme=t)
|
||||
# for t, c in zip(romains_trigrammes, romains):
|
||||
# Account.objects.create(cofprofile=c, trigramme=t)
|
||||
|
||||
|
||||
# class TestBar(TestCase):
|
||||
# fixtures = ['users', 'sites', 'gestion', 'articles', 'groups', 'accounts']
|
||||
|
||||
|
||||
# def test_foo(self):
|
||||
# pass
|
Loading…
Add table
Add a link
Reference in a new issue