-
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.
- Loading branch information
Showing
5 changed files
with
92 additions
and
0 deletions.
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,6 +1,12 @@ | ||
from django.apps import AppConfig | ||
from timezonefinder import TimezoneFinder | ||
|
||
|
||
class GeoConfig(AppConfig): | ||
default_auto_field = "django.db.models.BigAutoField" | ||
name = "mosquito_alert.geo" | ||
|
||
def ready(self): | ||
# Initialize the TimezoneFinder object and store it as a class attribute | ||
# due to the first load is quite slow. | ||
self.timezone_finder = TimezoneFinder() |
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 4.2.3 on 2023-11-30 17:10 | ||
|
||
from django.db import migrations | ||
import timezone_field.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("geo", "0002_alter_boundary_created_at_alter_boundary_updated_at_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="location", | ||
name="timezone", | ||
field=timezone_field.fields.TimeZoneField(blank=True, editable=False, null=True), | ||
), | ||
] |
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
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
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