Skip to content

Commit

Permalink
Merge pull request #7 from robotichead/development-0.3
Browse files Browse the repository at this point in the history
Development 0.3
  • Loading branch information
robotichead authored May 25, 2017
2 parents d4fca1b + ca7ae08 commit 310560e
Show file tree
Hide file tree
Showing 40 changed files with 1,844 additions and 590 deletions.
30 changes: 4 additions & 26 deletions admin.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,13 @@
from django.contrib import admin

# Register your models here.
from .models import customers
from .models import customers_campus
from .models import group_permissions
from .models import groups
from .models import list_of_countries_regions
from .models import list_of_countries
from .models import list_of_titles
from .models import organisations_campus
from .models import organisations
from .models import project_customers
from .models import project_groups
from .models import project_history
from .models import project_stages
from .models import project_tasks
from .models import project
from .models import stages
from .models import tasks_actions
from .models import tasks_customers
from .models import tasks_groups
from .models import tasks_history
from .models import tasks
from .models import user_groups




from .models import *

admin.site.register(costs)
admin.site.register(customers)
admin.site.register(customers_campus)
admin.site.register(documents)
admin.site.register(document_folders)
admin.site.register(group_permissions)
admin.site.register(groups)
admin.site.register(list_of_countries_regions)
Expand Down
20 changes: 19 additions & 1 deletion forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@


#Setup drop down box options
NOTHING_CHOICE = (
('','-----'),
)
YEAR_CHOICES = (
('2010','2010'),
('2011','2011'),
Expand Down Expand Up @@ -331,6 +334,13 @@ class project_information_form(ModelForm):
finish_date_minute = forms.ChoiceField(choices = MINUTE_CHOICES)
finish_date_meridiems = forms.ChoiceField(choices = MERIDIEMS_CHOICES)
project_history_text = forms.CharField(widget=forms.Textarea(attrs={'placeholder': 'Please update any history here and then click on the save button'}), required = False)

document = forms.FileField(required=False, widget=forms.FileInput(attrs={'onChange':'enable_submit()'}))
document_url_location = forms.URLField(required=False, widget=forms.TextInput(attrs={'placeholder':'https://example.com', 'onChange':'enable_submit()'}))
document_description = forms.CharField(max_length=255, required=False, widget=forms.TextInput(attrs={'width':'100%', 'onkeyup':'enable_submit()'}))

document_folder_description = forms.CharField(max_length=255, required=False, widget=forms.TextInput(attrs={'width':'100%', 'onkeyup':'enable_submit()'}))

class Meta:
model = project
fields = {
Expand Down Expand Up @@ -363,6 +373,8 @@ class search_projects_form(forms.Form):
choices = INCLUDE_CLOSED)

class task_information_form(ModelForm):
task_short_description = forms.CharField(max_length=255, widget=forms.TextInput(attrs={"class":'task_short_description'}))

start_date_year = forms.ChoiceField(choices = YEAR_CHOICES, widget=forms.Select(attrs={"onChange":'check_start_date()'}))
start_date_month = forms.ChoiceField(choices = MONTH_CHOICES, widget=forms.Select(attrs={"onChange":'check_start_date()'}))
start_date_day = forms.ChoiceField(choices = DAY_CHOICES, widget=forms.Select(attrs={"onChange":'check_start_date()'}))
Expand All @@ -377,7 +389,13 @@ class task_information_form(ModelForm):
finish_date_minute = forms.ChoiceField(choices = MINUTE_CHOICES)
finish_date_meridiems = forms.ChoiceField(choices = MERIDIEMS_CHOICES)
task_history_text = forms.CharField(widget=forms.Textarea, required = False)


document = forms.FileField(required=False, widget=forms.FileInput(attrs={'onChange':'enable_submit()'}))
document_url_location = forms.URLField(required=False, widget=forms.TextInput(attrs={'placeholder':'https://example.com', 'onChange':'enable_submit()'}))
document_description = forms.CharField(max_length=255, required=False, widget=forms.TextInput(attrs={'width':'100%', 'onkeyup':'enable_submit()'}))

document_folder_description = forms.CharField(max_length=255, required=False, widget=forms.TextInput(attrs={'width': '100%', 'onkeyup': 'enable_submit()'}))

class Meta:
model = tasks
fields = {
Expand Down
27 changes: 27 additions & 0 deletions migrations/0003_costs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-04-18 22:29
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('NearBeach', '0002_initialise_data'),
]

operations = [
migrations.CreateModel(
name='costs',
fields=[
('cost_id', models.AutoField(primary_key=True, serialize=False)),
('cost_description', models.CharField(max_length=255)),
('cost_amount', models.DecimalField(decimal_places=2, max_digits=19)),
('is_deleted', models.CharField(choices=[('TRUE', 'TRUE'), ('FALSE', 'FALSE')], default='FALSE', max_length=5)),
('project_id', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='NearBeach.project')),
('task_id', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='NearBeach.tasks')),
],
),
]
26 changes: 26 additions & 0 deletions migrations/0004_auto_20170418_2235.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-04-18 22:35
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('NearBeach', '0003_costs'),
]

operations = [
migrations.AlterField(
model_name='costs',
name='project_id',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='NearBeach.project'),
),
migrations.AlterField(
model_name='costs',
name='task_id',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='NearBeach.tasks'),
),
]
32 changes: 32 additions & 0 deletions migrations/0005_auto_20170419_2236.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-04-19 22:36
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('NearBeach', '0004_auto_20170418_2235'),
]

operations = [
migrations.CreateModel(
name='documents',
fields=[
('document_id', models.AutoField(primary_key=True, serialize=False)),
('document_description', models.CharField(max_length=255)),
('document_location', models.TextField()),
('document_folder', models.CharField(max_length=255)),
('is_deleted', models.CharField(choices=[('TRUE', 'TRUE'), ('FALSE', 'FALSE')], default='FALSE', max_length=5)),
('project_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='NearBeach.project')),
('task_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='NearBeach.tasks')),
],
),
migrations.AlterModelTable(
name='costs',
table='costs',
),
]
20 changes: 20 additions & 0 deletions migrations/0005_costs_cost_has_paid.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-19 08:51
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('NearBeach', '0004_auto_20170418_2235'),
]

operations = [
migrations.AddField(
model_name='costs',
name='cost_has_paid',
field=models.CharField(choices=[('Not paid', 'Not paid'), ('Paid', 'Paid'), ('Cancelled', 'Cancelled')], default='Has not paid', max_length=15),
),
]
26 changes: 26 additions & 0 deletions migrations/0006_document_folders.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-04-19 22:47
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('NearBeach', '0005_auto_20170419_2236'),
]

operations = [
migrations.CreateModel(
name='document_folders',
fields=[
('document_folder_id', models.AutoField(primary_key=True, serialize=False)),
('document_folder_description', models.CharField(max_length=255)),
('is_deleted', models.CharField(choices=[('TRUE', 'TRUE'), ('FALSE', 'FALSE')], default='FALSE', max_length=5)),
('project_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='NearBeach.project')),
('task_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='NearBeach.tasks')),
],
),
]
16 changes: 16 additions & 0 deletions migrations/0007_merge_20170425_2329.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-25 13:29
from __future__ import unicode_literals

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('NearBeach', '0005_costs_cost_has_paid'),
('NearBeach', '0006_document_folders'),
]

operations = [
]
34 changes: 34 additions & 0 deletions migrations/0008_auto_20170425_2329.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-25 13:29
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('NearBeach', '0007_merge_20170425_2329'),
]

operations = [
migrations.RemoveField(
model_name='costs',
name='cost_has_paid',
),
migrations.RemoveField(
model_name='documents',
name='document_folder',
),
migrations.AddField(
model_name='documents',
name='document_folder_id',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='NearBeach.document_folders'),
),
migrations.AddField(
model_name='project_customers',
name='customer_description',
field=models.CharField(blank=True, max_length=255, null=True),
),
]
20 changes: 20 additions & 0 deletions migrations/0009_tasks_customers_customers_description.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-26 11:49
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('NearBeach', '0008_auto_20170425_2329'),
]

operations = [
migrations.AddField(
model_name='tasks_customers',
name='customers_description',
field=models.CharField(blank=True, max_length=155, null=True),
),
]
22 changes: 22 additions & 0 deletions migrations/0010_tasks_customers_tasks_id.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-26 11:53
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('NearBeach', '0009_tasks_customers_customers_description'),
]

operations = [
migrations.AddField(
model_name='tasks_customers',
name='tasks_id',
field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='NearBeach.tasks'),
preserve_default=False,
),
]
21 changes: 21 additions & 0 deletions migrations/0011_document_folders_parent_folder_id.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-05-01 07:19
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

dependencies = [
('NearBeach', '0010_tasks_customers_tasks_id'),
]

operations = [
migrations.AddField(
model_name='document_folders',
name='parent_folder_id',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='NearBeach.document_folders'),
),
]
20 changes: 20 additions & 0 deletions migrations/0012_documents_image.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-05-10 04:44
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('NearBeach', '0011_document_folders_parent_folder_id'),
]

operations = [
migrations.AddField(
model_name='documents',
name='image',
field=models.FileField(blank=True, null=True, upload_to=b''),
),
]
Loading

0 comments on commit 310560e

Please sign in to comment.