-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
django app from eclk repository
- Loading branch information
Showing
36 changed files
with
901 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,13 @@ | ||
# location-service | ||
# Location Service | ||
Election related location identification and management | ||
|
||
## Documentation | ||
- Latest but unstable version will be always available on 'dev' branch. | ||
|
||
## Contribution | ||
- Always clone and make pull requests to **'dev' branch**. | ||
- An **issue must be always created and be assigned** before making a pull request and related issues be mentioned on the pull request. | ||
- When you cannot assign yourself on an issue, you must still mention on the issue as a comment, that you are working on it. | ||
- To avoid time of efforts being wasted, please mention **date of delivery possible at best** as a comment on the particular issue. | ||
- When you look for new issues to work on, do check for **projects boards on 'Projects' tab**, then the particular issues assigned to a project board, or filter issues by **'projects' column**. | ||
- When you introduce new issues, please clarify from the owners or the management team members, before you start working on it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class LocationConfig(AppConfig): | ||
name = 'location' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
# Generated by Django 3.0.3 on 2020-02-17 06:12 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Electroaldistrict', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name_sinhala', models.CharField(max_length=100)), | ||
('name_tamil', models.CharField(max_length=100)), | ||
('name_english', models.CharField(max_length=100)), | ||
('ed_status', models.BooleanField(default=True)), | ||
('created_time', models.DateTimeField(auto_now_add=True)), | ||
('updated_time', models.DateTimeField(auto_now=True)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Gramaniladaridivision', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name_sinhala', models.CharField(max_length=100)), | ||
('name_tamil', models.CharField(max_length=100)), | ||
('name_english', models.CharField(max_length=100)), | ||
('gdn_status', models.BooleanField(default=True)), | ||
('created_time', models.DateTimeField(auto_now_add=True)), | ||
('updated_time', models.DateTimeField(auto_now=True)), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Locations', | ||
fields=[ | ||
('code', models.CharField(max_length=15, primary_key=True, serialize=False)), | ||
('name_sinhala', models.CharField(max_length=250)), | ||
('name_tamil', models.CharField(max_length=250)), | ||
('name_english', models.CharField(max_length=250)), | ||
('coordinate_east', models.FloatField()), | ||
('coordinate_north', models.FloatField()), | ||
('location_status', models.BooleanField(default=True)), | ||
('created_time', models.DateTimeField(auto_now_add=True)), | ||
('updated_time', models.DateTimeField(auto_now=True)), | ||
('gdn_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='location.Gramaniladaridivision')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Polingdivision', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name_sinhala', models.CharField(max_length=100)), | ||
('name_tamil', models.CharField(max_length=100)), | ||
('name_english', models.CharField(max_length=100)), | ||
('pd_status', models.BooleanField(default=True)), | ||
('created_time', models.DateTimeField(auto_now_add=True)), | ||
('updated_time', models.DateTimeField(auto_now=True)), | ||
('electoral_district_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='location.Electroaldistrict')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Media_items', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('title', models.CharField(max_length=150)), | ||
('description', models.CharField(max_length=250)), | ||
('file_name', models.CharField(max_length=250)), | ||
('file_type', models.CharField(max_length=250)), | ||
('lat', models.FloatField()), | ||
('lon', models.FloatField()), | ||
('status', models.BooleanField(default=True)), | ||
('created_time', models.DateTimeField(auto_now_add=True)), | ||
('updated_time', models.DateTimeField(auto_now=True)), | ||
('loc_code', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='location.Locations')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Location_contacts', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('contact_type', models.CharField(max_length=20)), | ||
('contact_details', models.CharField(max_length=200)), | ||
('lc_status', models.BooleanField(default=True)), | ||
('created_time', models.DateTimeField(auto_now_add=True)), | ||
('updated_time', models.DateTimeField(auto_now=True)), | ||
('location_code', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='location.Locations')), | ||
], | ||
), | ||
migrations.AddField( | ||
model_name='gramaniladaridivision', | ||
name='electoral_district_id', | ||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='location.Polingdivision'), | ||
), | ||
migrations.CreateModel( | ||
name='Admindistrict', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name_sinhala', models.CharField(max_length=100)), | ||
('name_tamil', models.CharField(max_length=100)), | ||
('name_english', models.CharField(max_length=100)), | ||
('district_status', models.BooleanField(default=True)), | ||
('created_time', models.DateTimeField(auto_now_add=True)), | ||
('updated_time', models.DateTimeField(auto_now=True)), | ||
('electoral_district_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='location.Electroaldistrict')), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.0.3 on 2020-02-17 07:29 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('location', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='gramaniladaridivision', | ||
old_name='electoral_district_id', | ||
new_name='polingdivision_id', | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Generated by Django 3.0.3 on 2020-02-17 07:33 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('location', '0002_auto_20200217_1259'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='admindistrict', | ||
old_name='electoral_district_id', | ||
new_name='electoral_district', | ||
), | ||
migrations.RenameField( | ||
model_name='gramaniladaridivision', | ||
old_name='polingdivision_id', | ||
new_name='polingdivision', | ||
), | ||
migrations.RenameField( | ||
model_name='location_contacts', | ||
old_name='location_code', | ||
new_name='location', | ||
), | ||
migrations.RenameField( | ||
model_name='locations', | ||
old_name='gdn_id', | ||
new_name='gdn', | ||
), | ||
migrations.RenameField( | ||
model_name='media_items', | ||
old_name='loc_code', | ||
new_name='location', | ||
), | ||
migrations.RenameField( | ||
model_name='polingdivision', | ||
old_name='electoral_district_id', | ||
new_name='electoral_district', | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Generated by Django 3.0.3 on 2020-02-17 08:08 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('location', '0003_auto_20200217_1303'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='locations', | ||
name='latitude', | ||
field=models.FloatField(default=1), | ||
preserve_default=False, | ||
), | ||
migrations.AddField( | ||
model_name='locations', | ||
name='longitute', | ||
field=models.FloatField(default=6.0), | ||
preserve_default=False, | ||
), | ||
] |
Oops, something went wrong.