From fa050034553cf8fa3ac1373ffa83d3d8d9c4f850 Mon Sep 17 00:00:00 2001 From: Joakim Strandberg Date: Sat, 30 Apr 2016 11:18:06 +0200 Subject: [PATCH] Bug-fix for fleetactivitytracking (#415) * Initial testing of paplink functionality. More fancy interfaces coming. * Removed a invalid view reference. * Added a link on the front page. * Fixed some bad references and incorrect in game browser header usages. * Started work on statistics-pages. * Added an initial modify-paplink page where the pap itself can be deleted and characters removed. * Added a very simple statistics page. Also some name change for ~reasons~. * Small but crucial fix of syntax. * Added personal statistics page. * Corputils page now include fatlinkstats. * Added link to the personal statistics page. Moved other buttons for clarity. * Removed some unused code and imports * Added more statistics, and all corps in alliance are now visible even if no paps are registered. * Now requesting trust for the right domain. And some redundant imports and commented lines are removed. * Fixed some issues with trust request and pull-down population. --- fleetactivitytracking/forms.py | 2 +- optimer/models.py | 6 +++++- stock/templates/public/clickfatlinkview.html | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/fleetactivitytracking/forms.py b/fleetactivitytracking/forms.py index 3bdb8d0d..a9c5d35b 100644 --- a/fleetactivitytracking/forms.py +++ b/fleetactivitytracking/forms.py @@ -13,4 +13,4 @@ def get_fleet_list(): class FatlinkForm(forms.Form): fatname = forms.CharField(label='Name of fat-link', required=True) duration = forms.IntegerField(label="Duration of fat-link", required=True, initial=30, min_value=1, max_value=2147483647) - fleet = forms.ChoiceField(label="Fleet", choices=get_fleet_list()) \ No newline at end of file + fleet = forms.ModelChoiceField(label="Fleet", queryset=optimer.objects.all().order_by('operation_name')) \ No newline at end of file diff --git a/optimer/models.py b/optimer/models.py index fc4492a1..583997cf 100644 --- a/optimer/models.py +++ b/optimer/models.py @@ -19,4 +19,8 @@ class optimer(models.Model): details = models.CharField(max_length=254, default="") post_time = models.DateTimeField(default=timezone.now) eve_character = models.ForeignKey(EveCharacter) - + + def __str__(self): + output = self.operation_name + return output.encode('utf-8') + diff --git a/stock/templates/public/clickfatlinkview.html b/stock/templates/public/clickfatlinkview.html index a6526179..a344a44f 100644 --- a/stock/templates/public/clickfatlinkview.html +++ b/stock/templates/public/clickfatlinkview.html @@ -26,7 +26,7 @@ - +