Skip to content
Snippets Groups Projects
Commit cb15d397 authored by Jacek Lebioda's avatar Jacek Lebioda
Browse files

Fixes

parent e9efa8c1
No related branches found
No related tags found
No related merge requests found
......@@ -54,3 +54,4 @@ MEDIA_ROOT = '/tmp/media' # Warning! `/tmp` directory can be flushed in any mome
## Development
- Remember, that before working you have to activate _virtualenv_, by: `devel@host ~/home/smash/scheduling-system $ . env/bin/activate`
- In order to run development server, run: `devel@host ~/home/smash/scheduling-system/smash $ ./manage.py runserver` and go to `127.0.0.1:8000` in browser
- For reference of HTML tempalte, see [https://almsaeedstudio.com/themes/AdminLTE/pages/widgets.html#](https://almsaeedstudio.com/themes/AdminLTE/pages/widgets.html#)
......@@ -6,7 +6,7 @@ from django.contrib.auth.models import User, AnonymousUser
import datetime
def get_is_current_year():
def get_current_year():
return datetime.datetime.now().year
class Language (models.Model):
......@@ -31,18 +31,20 @@ class Subject(models.Model):
('F','Female'),
)
STATUS_CHOICES = (
STATUS_CHOICES_DEAD = 'DEA'
STATUS_CHOICES = ( # Remember to check dependencies if changed
('NCO', 'Not contacted'),
('TST', 'Test group'),
('LEA', 'Level A'),
('LEB', 'Level B'),
('OPT', 'Opted out'),
('REJ', 'Rejected'),
('DEA', 'Dead')
(STATUS_CHOICES_DEAD, 'Dead')
)
def mark_as_dead(self):
self.status = 'DEA'
self.status = STATUS_CHOICES_DEAD
self.save()
def mark_as_rejected(self):
......
......@@ -133,7 +133,7 @@
center: 'title',
right: 'month,agendaWeek'
},
editable: true,
editable: false,
events: [
{% for approach in approaching_list %}
{
......
......@@ -297,8 +297,7 @@ def assignment_add(request, id):
form = AppointmentAddForm(initial={'visit': id})
form.fields['visit'].widget = forms.HiddenInput()
vid = id
return wrap_response(request, 'assignments/add.html', {'form': form, 'visitID': vid})
return wrap_response(request, 'assignments/add.html', {'form': form, 'visitID': id})
def assignment_edit(request, id):
if request.method == 'POST':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment