Changed Start Time to Include Date

Added Duration and Doctrine Fields
This commit is contained in:
orbitroom 2016-01-25 20:48:05 -05:00
parent cd87d90088
commit 203eca7e74
4 changed files with 13 additions and 11 deletions

View File

@ -8,8 +8,8 @@ class opForm(forms.Form):
doctrine = forms.CharField(max_length=254, required=True, label='Doctrine') doctrine = forms.CharField(max_length=254, required=True, label='Doctrine')
system = forms.CharField(max_length=254, required=True, label="System") system = forms.CharField(max_length=254, required=True, label="System")
location = forms.CharField(max_length=254, required=True, label="Location") location = forms.CharField(max_length=254, required=True, label="Location")
start_time = forms.CharField(max_length=254, required=True, label="Start Time") start = forms.DateTimeField(required=True, label="Start Time MM/DD/YYYY HH:MM:SS")
end_time = forms.CharField(max_length=254, required=True, label="End Time") duration = forms.CharField(max_length=254, required=True, label="Duration")
operation_name = forms.CharField(max_length=254, required=True, label="Operation Name") operation_name = forms.CharField(max_length=254, required=True, label="Operation Name")
fc = forms.CharField(max_length=254, required=True, label="Fleet Commander") fc = forms.CharField(max_length=254, required=True, label="Fleet Commander")
details = forms.CharField(max_length=254, required=False, label="Extra Details") details = forms.CharField(max_length=254, required=False, label="Extra Details")

View File

@ -3,16 +3,17 @@ from django.contrib.auth.models import User
from django.utils import timezone from django.utils import timezone
from eveonline.models import EveCharacter from eveonline.models import EveCharacter
from eveonline.models import EveCorporationInfo from eveonline.models import EveCorporationInfo
from datetime import datetime
class optimer(models.Model): class optimer(models.Model):
class Meta: class Meta:
ordering = ['start_time'] ordering = ['start']
doctrine = models.CharField(max_length=254, default="") doctrine = models.CharField(max_length=254, default="")
system = models.CharField(max_length=254, default="") system = models.CharField(max_length=254, default="")
location = models.CharField(max_length=254, default="") location = models.CharField(max_length=254, default="")
start_time = models.CharField(max_length=254, default="") start = models.DateTimeField(default=datetime.now)
end_time = models.CharField(max_length=254, default="") duration = models.CharField(max_length=25, default="")
operation_name = models.CharField(max_length=254, default="") operation_name = models.CharField(max_length=254, default="")
fc = models.CharField(max_length=254, default="") fc = models.CharField(max_length=254, default="")
details = models.CharField(max_length=254, default="") details = models.CharField(max_length=254, default="")

View File

@ -51,8 +51,8 @@ def add_optimer_view(request):
op.doctrine = form.cleaned_data['doctrine'] op.doctrine = form.cleaned_data['doctrine']
op.system = form.cleaned_data['system'] op.system = form.cleaned_data['system']
op.location = form.cleaned_data['location'] op.location = form.cleaned_data['location']
op.start_time = form.cleaned_data['start_time'] op.start = form.cleaned_data['start']
op.end_time = form.cleaned_data['end_time'] op.duration = form.cleaned_data['duration']
op.operation_name = form.cleaned_data['operation_name'] op.operation_name = form.cleaned_data['operation_name']
op.fc = form.cleaned_data['fc'] op.fc = form.cleaned_data['fc']
op.details = form.cleaned_data['details'] op.details = form.cleaned_data['details']

View File

@ -20,10 +20,11 @@
<table class="table table-responsive table-bordered"> <table class="table table-responsive table-bordered">
<tr> <tr>
<th class="text-center">Operation Name</th> <th class="text-center">Operation Name</th>
<th class="text-center">Doctrine</th>
<th class="text-center">Form Up System</th> <th class="text-center">Form Up System</th>
<th class="text-center">Form Up Location</th> <th class="text-center">Form Up Location</th>
<th class="text-center">Start Time</th> <th class="text-center">Start Time</th>
<th class="text-center">End Time</th> <th class="text-center">Duration</th>
<th class="text-center">FC</th> <th class="text-center">FC</th>
<th class="text-center">Details</th> <th class="text-center">Details</th>
<th class="text-center">Post Time</th> <th class="text-center">Post Time</th>
@ -36,13 +37,13 @@
{% for ops in optimer %} {% for ops in optimer %}
<tr> <tr>
<td style="width:150px" class="text-center">{{ ops.operation_name }}</td> <td style="width:150px" class="text-center">{{ ops.operation_name }}</td>
<td style="width:150px" class="text-center">{{ ops.doctrine }}</td>
<td class="text-center"> <td class="text-center">
<a href="http://evemaps.dotlan.net/system/{{ ops.system }}">{{ ops.system }}</a> <a href="http://evemaps.dotlan.net/system/{{ ops.system }}">{{ ops.system }}</a>
</td> </td>
<td style="width:150px" class="text-center">{{ ops.location }}</td> <td style="width:150px" class="text-center">{{ ops.location }}</td>
<td style="width:150px" class="text-center">{{ ops.start_time }}</td> <td style="width:150px" class="text-center">{{ ops.start }}</td>
<td style="width:150px" class="text-center">{{ ops.end_time }}</td> <td style="width:150px" class="text-center">{{ ops.duration }}</td>
<td style="width:150px" class="text-center">{{ ops.fc }}</td> <td style="width:150px" class="text-center">{{ ops.fc }}</td>
<td style="width:150px" class="text-center">{{ ops.details }}</td> <td style="width:150px" class="text-center">{{ ops.details }}</td>
<td style="width:150px" class="text-center">{{ ops.post_time}}</td> <td style="width:150px" class="text-center">{{ ops.post_time}}</td>