From 8cd72996cb25c5752c91c5339b99cf404a340a69 Mon Sep 17 00:00:00 2001 From: Llloooggg Date: Thu, 21 Apr 2022 15:28:52 +0300 Subject: [PATCH] =?UTF-8?q?=D0=91=D0=B0=D0=B7=D0=BE=D0=B2=D0=B0=D1=8F=20?= =?UTF-8?q?=D0=BA=D0=B0=D1=80=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requirements.txt | 4 +++ wheretogo/maps/__init__.py | 0 wheretogo/maps/admin.py | 5 +++ wheretogo/maps/api.py | 8 +++++ wheretogo/maps/apps.py | 7 ++++ wheretogo/maps/migrations/0001_initial.py | 29 +++++++++++++++ wheretogo/maps/migrations/__init__.py | 0 wheretogo/maps/models.py | 19 ++++++++++ wheretogo/maps/serializers.py | 11 ++++++ wheretogo/maps/tests.py | 3 ++ wheretogo/maps/urls.py | 8 +++++ wheretogo/maps/views.py | 6 ++++ wheretogo/maps/viewsets.py | 13 +++++++ wheretogo/static/css/own/map.css | 10 ++++++ .../css/{ => thirdparty}/bootstrap-grid.css | 0 .../{ => thirdparty}/bootstrap-grid.css.map | 0 .../{ => thirdparty}/bootstrap-grid.min.css | 0 .../bootstrap-grid.min.css.map | 0 .../{ => thirdparty}/bootstrap-grid.rtl.css | 0 .../bootstrap-grid.rtl.css.map | 0 .../bootstrap-grid.rtl.min.css | 0 .../bootstrap-grid.rtl.min.css.map | 0 .../css/{ => thirdparty}/bootstrap-reboot.css | 0 .../{ => thirdparty}/bootstrap-reboot.css.map | 0 .../{ => thirdparty}/bootstrap-reboot.min.css | 0 .../bootstrap-reboot.min.css.map | 0 .../{ => thirdparty}/bootstrap-reboot.rtl.css | 0 .../bootstrap-reboot.rtl.css.map | 0 .../bootstrap-reboot.rtl.min.css | 0 .../bootstrap-reboot.rtl.min.css.map | 0 .../{ => thirdparty}/bootstrap-utilities.css | 0 .../bootstrap-utilities.css.map | 0 .../bootstrap-utilities.min.css | 0 .../bootstrap-utilities.min.css.map | 0 .../bootstrap-utilities.rtl.css | 0 .../bootstrap-utilities.rtl.css.map | 0 .../bootstrap-utilities.rtl.min.css | 0 .../bootstrap-utilities.rtl.min.css.map | 0 .../static/css/{ => thirdparty}/bootstrap.css | 0 .../css/{ => thirdparty}/bootstrap.css.map | 0 .../css/{ => thirdparty}/bootstrap.min.css | 0 .../{ => thirdparty}/bootstrap.min.css.map | 0 .../css/{ => thirdparty}/bootstrap.rtl.css | 0 .../{ => thirdparty}/bootstrap.rtl.css.map | 0 .../{ => thirdparty}/bootstrap.rtl.min.css | 0 .../bootstrap.rtl.min.css.map | 0 .../js/{ => thirdparty}/bootstrap.bundle.js | 0 .../{ => thirdparty}/bootstrap.bundle.js.map | 0 .../{ => thirdparty}/bootstrap.bundle.min.js | 0 .../bootstrap.bundle.min.js.map | 0 .../js/{ => thirdparty}/bootstrap.esm.js | 0 .../js/{ => thirdparty}/bootstrap.esm.js.map | 0 .../js/{ => thirdparty}/bootstrap.esm.min.js | 0 .../{ => thirdparty}/bootstrap.esm.min.js.map | 0 .../static/js/{ => thirdparty}/bootstrap.js | 0 .../js/{ => thirdparty}/bootstrap.js.map | 0 .../js/{ => thirdparty}/bootstrap.min.js | 0 .../js/{ => thirdparty}/bootstrap.min.js.map | 0 .../static/js/{ => thirdparty}/jquery.min.js | 0 wheretogo/templates/common/base.html | 13 ++++--- wheretogo/templates/maps/map.html | 36 +++++++++++++++++++ wheretogo/wheretogo/settings.py | 5 +++ wheretogo/wheretogo/urls.py | 3 ++ 63 files changed, 175 insertions(+), 5 deletions(-) create mode 100644 wheretogo/maps/__init__.py create mode 100644 wheretogo/maps/admin.py create mode 100644 wheretogo/maps/api.py create mode 100644 wheretogo/maps/apps.py create mode 100644 wheretogo/maps/migrations/0001_initial.py create mode 100644 wheretogo/maps/migrations/__init__.py create mode 100644 wheretogo/maps/models.py create mode 100644 wheretogo/maps/serializers.py create mode 100644 wheretogo/maps/tests.py create mode 100644 wheretogo/maps/urls.py create mode 100644 wheretogo/maps/views.py create mode 100644 wheretogo/maps/viewsets.py create mode 100644 wheretogo/static/css/own/map.css rename wheretogo/static/css/{ => thirdparty}/bootstrap-grid.css (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-grid.css.map (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-grid.min.css (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-grid.min.css.map (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-grid.rtl.css (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-grid.rtl.css.map (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-grid.rtl.min.css (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-grid.rtl.min.css.map (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-reboot.css (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-reboot.css.map (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-reboot.min.css (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-reboot.min.css.map (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-reboot.rtl.css (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-reboot.rtl.css.map (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-reboot.rtl.min.css (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-reboot.rtl.min.css.map (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-utilities.css (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-utilities.css.map (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-utilities.min.css (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-utilities.min.css.map (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-utilities.rtl.css (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-utilities.rtl.css.map (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-utilities.rtl.min.css (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap-utilities.rtl.min.css.map (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap.css (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap.css.map (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap.min.css (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap.min.css.map (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap.rtl.css (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap.rtl.css.map (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap.rtl.min.css (100%) rename wheretogo/static/css/{ => thirdparty}/bootstrap.rtl.min.css.map (100%) rename wheretogo/static/js/{ => thirdparty}/bootstrap.bundle.js (100%) rename wheretogo/static/js/{ => thirdparty}/bootstrap.bundle.js.map (100%) rename wheretogo/static/js/{ => thirdparty}/bootstrap.bundle.min.js (100%) rename wheretogo/static/js/{ => thirdparty}/bootstrap.bundle.min.js.map (100%) rename wheretogo/static/js/{ => thirdparty}/bootstrap.esm.js (100%) rename wheretogo/static/js/{ => thirdparty}/bootstrap.esm.js.map (100%) rename wheretogo/static/js/{ => thirdparty}/bootstrap.esm.min.js (100%) rename wheretogo/static/js/{ => thirdparty}/bootstrap.esm.min.js.map (100%) rename wheretogo/static/js/{ => thirdparty}/bootstrap.js (100%) rename wheretogo/static/js/{ => thirdparty}/bootstrap.js.map (100%) rename wheretogo/static/js/{ => thirdparty}/bootstrap.min.js (100%) rename wheretogo/static/js/{ => thirdparty}/bootstrap.min.js.map (100%) rename wheretogo/static/js/{ => thirdparty}/jquery.min.js (100%) create mode 100644 wheretogo/templates/maps/map.html diff --git a/requirements.txt b/requirements.txt index 30ce3a0..ccf850f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,12 +9,16 @@ defusedxml==0.7.1 Django==4.0.3 django-allauth==0.50.0 django-crispy-forms==1.14.0 +django-filter==21.1 +djangorestframework==3.13.1 +djangorestframework-gis==0.18 idna==3.3 oauthlib==3.2.0 psycopg2==2.9.3 pycparser==2.21 PyJWT==2.3.0 python3-openid==3.2.0 +pytz==2022.1 requests==2.27.1 requests-oauthlib==1.3.1 sqlparse==0.4.2 diff --git a/wheretogo/maps/__init__.py b/wheretogo/maps/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/wheretogo/maps/admin.py b/wheretogo/maps/admin.py new file mode 100644 index 0000000..6970051 --- /dev/null +++ b/wheretogo/maps/admin.py @@ -0,0 +1,5 @@ +from django.contrib import admin + +from maps.models import Facility + +admin.site.register(Facility) diff --git a/wheretogo/maps/api.py b/wheretogo/maps/api.py new file mode 100644 index 0000000..4fc1e61 --- /dev/null +++ b/wheretogo/maps/api.py @@ -0,0 +1,8 @@ +from rest_framework import routers + +from maps.viewsets import FacilityViewSet + +router = routers.DefaultRouter() +router.register(r"facilities", FacilityViewSet) + +urlpatterns = router.urls diff --git a/wheretogo/maps/apps.py b/wheretogo/maps/apps.py new file mode 100644 index 0000000..f97db36 --- /dev/null +++ b/wheretogo/maps/apps.py @@ -0,0 +1,7 @@ +from django.apps import AppConfig + + +class MapConfig(AppConfig): + default_auto_field = "django.db.models.BigAutoField" + name = "maps" + verbose_name = "Maps" diff --git a/wheretogo/maps/migrations/0001_initial.py b/wheretogo/maps/migrations/0001_initial.py new file mode 100644 index 0000000..4c890ba --- /dev/null +++ b/wheretogo/maps/migrations/0001_initial.py @@ -0,0 +1,29 @@ +# Generated by Django 4.0.3 on 2022-04-21 11:59 + +import django.contrib.gis.db.models.fields +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Facility', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=200)), + ('address', models.CharField(max_length=100)), + ('city', models.CharField(max_length=50)), + ('location', django.contrib.gis.db.models.fields.PointField(blank=True, null=True, srid=4326)), + ], + options={ + 'verbose_name': 'facility', + 'verbose_name_plural': 'Facilities', + }, + ), + ] diff --git a/wheretogo/maps/migrations/__init__.py b/wheretogo/maps/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/wheretogo/maps/models.py b/wheretogo/maps/models.py new file mode 100644 index 0000000..ff4fcf4 --- /dev/null +++ b/wheretogo/maps/models.py @@ -0,0 +1,19 @@ +from django.contrib.gis.db import models as gis_models +from django.db import models + + +class Facility(models.Model): + name = models.CharField(max_length=200) + address = models.CharField(max_length=100) + city = models.CharField(max_length=50) + location = gis_models.PointField( + null=True, + blank=True, + ) + + class Meta: + verbose_name = "facility" + verbose_name_plural = "Facilities" + + def __unicode__(self): + return self.name diff --git a/wheretogo/maps/serializers.py b/wheretogo/maps/serializers.py new file mode 100644 index 0000000..577e192 --- /dev/null +++ b/wheretogo/maps/serializers.py @@ -0,0 +1,11 @@ +from rest_framework_gis import serializers + +from maps.models import Facility + + +class FacilitySerializer(serializers.GeoFeatureModelSerializer): + class Meta: + + fields = ("id", "name", "address", "city") + geo_field = "location" + model = Facility diff --git a/wheretogo/maps/tests.py b/wheretogo/maps/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/wheretogo/maps/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/wheretogo/maps/urls.py b/wheretogo/maps/urls.py new file mode 100644 index 0000000..0f93a6f --- /dev/null +++ b/wheretogo/maps/urls.py @@ -0,0 +1,8 @@ +from django.urls import path +from maps.views import MapView + +app_name = "maps" + +urlpatterns = [ + path("map/", MapView.as_view(), name="map"), +] diff --git a/wheretogo/maps/views.py b/wheretogo/maps/views.py new file mode 100644 index 0000000..a0befdc --- /dev/null +++ b/wheretogo/maps/views.py @@ -0,0 +1,6 @@ +from django.views.generic.base import TemplateView + + +class MapView(TemplateView): + + template_name = "maps/map.html" diff --git a/wheretogo/maps/viewsets.py b/wheretogo/maps/viewsets.py new file mode 100644 index 0000000..4860f2d --- /dev/null +++ b/wheretogo/maps/viewsets.py @@ -0,0 +1,13 @@ +from rest_framework import viewsets +from rest_framework_gis import filters + +from maps.models import Facility +from maps.serializers import FacilitySerializer + + +class FacilityViewSet(viewsets.ReadOnlyModelViewSet): + + bbox_filter_field = "location" + filter_backends = (filters.InBBoxFilter,) + queryset = Facility.objects.all() + serializer_class = FacilitySerializer diff --git a/wheretogo/static/css/own/map.css b/wheretogo/static/css/own/map.css new file mode 100644 index 0000000..f4a690a --- /dev/null +++ b/wheretogo/static/css/own/map.css @@ -0,0 +1,10 @@ +html, +body { + height: 100%; + margin: 0; +} + +#map { + height: 100%; + width: 100%; +} \ No newline at end of file diff --git a/wheretogo/static/css/bootstrap-grid.css b/wheretogo/static/css/thirdparty/bootstrap-grid.css similarity index 100% rename from wheretogo/static/css/bootstrap-grid.css rename to wheretogo/static/css/thirdparty/bootstrap-grid.css diff --git a/wheretogo/static/css/bootstrap-grid.css.map b/wheretogo/static/css/thirdparty/bootstrap-grid.css.map similarity index 100% rename from wheretogo/static/css/bootstrap-grid.css.map rename to wheretogo/static/css/thirdparty/bootstrap-grid.css.map diff --git a/wheretogo/static/css/bootstrap-grid.min.css b/wheretogo/static/css/thirdparty/bootstrap-grid.min.css similarity index 100% rename from wheretogo/static/css/bootstrap-grid.min.css rename to wheretogo/static/css/thirdparty/bootstrap-grid.min.css diff --git a/wheretogo/static/css/bootstrap-grid.min.css.map b/wheretogo/static/css/thirdparty/bootstrap-grid.min.css.map similarity index 100% rename from wheretogo/static/css/bootstrap-grid.min.css.map rename to wheretogo/static/css/thirdparty/bootstrap-grid.min.css.map diff --git a/wheretogo/static/css/bootstrap-grid.rtl.css b/wheretogo/static/css/thirdparty/bootstrap-grid.rtl.css similarity index 100% rename from wheretogo/static/css/bootstrap-grid.rtl.css rename to wheretogo/static/css/thirdparty/bootstrap-grid.rtl.css diff --git a/wheretogo/static/css/bootstrap-grid.rtl.css.map b/wheretogo/static/css/thirdparty/bootstrap-grid.rtl.css.map similarity index 100% rename from wheretogo/static/css/bootstrap-grid.rtl.css.map rename to wheretogo/static/css/thirdparty/bootstrap-grid.rtl.css.map diff --git a/wheretogo/static/css/bootstrap-grid.rtl.min.css b/wheretogo/static/css/thirdparty/bootstrap-grid.rtl.min.css similarity index 100% rename from wheretogo/static/css/bootstrap-grid.rtl.min.css rename to wheretogo/static/css/thirdparty/bootstrap-grid.rtl.min.css diff --git a/wheretogo/static/css/bootstrap-grid.rtl.min.css.map b/wheretogo/static/css/thirdparty/bootstrap-grid.rtl.min.css.map similarity index 100% rename from wheretogo/static/css/bootstrap-grid.rtl.min.css.map rename to wheretogo/static/css/thirdparty/bootstrap-grid.rtl.min.css.map diff --git a/wheretogo/static/css/bootstrap-reboot.css b/wheretogo/static/css/thirdparty/bootstrap-reboot.css similarity index 100% rename from wheretogo/static/css/bootstrap-reboot.css rename to wheretogo/static/css/thirdparty/bootstrap-reboot.css diff --git a/wheretogo/static/css/bootstrap-reboot.css.map b/wheretogo/static/css/thirdparty/bootstrap-reboot.css.map similarity index 100% rename from wheretogo/static/css/bootstrap-reboot.css.map rename to wheretogo/static/css/thirdparty/bootstrap-reboot.css.map diff --git a/wheretogo/static/css/bootstrap-reboot.min.css b/wheretogo/static/css/thirdparty/bootstrap-reboot.min.css similarity index 100% rename from wheretogo/static/css/bootstrap-reboot.min.css rename to wheretogo/static/css/thirdparty/bootstrap-reboot.min.css diff --git a/wheretogo/static/css/bootstrap-reboot.min.css.map b/wheretogo/static/css/thirdparty/bootstrap-reboot.min.css.map similarity index 100% rename from wheretogo/static/css/bootstrap-reboot.min.css.map rename to wheretogo/static/css/thirdparty/bootstrap-reboot.min.css.map diff --git a/wheretogo/static/css/bootstrap-reboot.rtl.css b/wheretogo/static/css/thirdparty/bootstrap-reboot.rtl.css similarity index 100% rename from wheretogo/static/css/bootstrap-reboot.rtl.css rename to wheretogo/static/css/thirdparty/bootstrap-reboot.rtl.css diff --git a/wheretogo/static/css/bootstrap-reboot.rtl.css.map b/wheretogo/static/css/thirdparty/bootstrap-reboot.rtl.css.map similarity index 100% rename from wheretogo/static/css/bootstrap-reboot.rtl.css.map rename to wheretogo/static/css/thirdparty/bootstrap-reboot.rtl.css.map diff --git a/wheretogo/static/css/bootstrap-reboot.rtl.min.css b/wheretogo/static/css/thirdparty/bootstrap-reboot.rtl.min.css similarity index 100% rename from wheretogo/static/css/bootstrap-reboot.rtl.min.css rename to wheretogo/static/css/thirdparty/bootstrap-reboot.rtl.min.css diff --git a/wheretogo/static/css/bootstrap-reboot.rtl.min.css.map b/wheretogo/static/css/thirdparty/bootstrap-reboot.rtl.min.css.map similarity index 100% rename from wheretogo/static/css/bootstrap-reboot.rtl.min.css.map rename to wheretogo/static/css/thirdparty/bootstrap-reboot.rtl.min.css.map diff --git a/wheretogo/static/css/bootstrap-utilities.css b/wheretogo/static/css/thirdparty/bootstrap-utilities.css similarity index 100% rename from wheretogo/static/css/bootstrap-utilities.css rename to wheretogo/static/css/thirdparty/bootstrap-utilities.css diff --git a/wheretogo/static/css/bootstrap-utilities.css.map b/wheretogo/static/css/thirdparty/bootstrap-utilities.css.map similarity index 100% rename from wheretogo/static/css/bootstrap-utilities.css.map rename to wheretogo/static/css/thirdparty/bootstrap-utilities.css.map diff --git a/wheretogo/static/css/bootstrap-utilities.min.css b/wheretogo/static/css/thirdparty/bootstrap-utilities.min.css similarity index 100% rename from wheretogo/static/css/bootstrap-utilities.min.css rename to wheretogo/static/css/thirdparty/bootstrap-utilities.min.css diff --git a/wheretogo/static/css/bootstrap-utilities.min.css.map b/wheretogo/static/css/thirdparty/bootstrap-utilities.min.css.map similarity index 100% rename from wheretogo/static/css/bootstrap-utilities.min.css.map rename to wheretogo/static/css/thirdparty/bootstrap-utilities.min.css.map diff --git a/wheretogo/static/css/bootstrap-utilities.rtl.css b/wheretogo/static/css/thirdparty/bootstrap-utilities.rtl.css similarity index 100% rename from wheretogo/static/css/bootstrap-utilities.rtl.css rename to wheretogo/static/css/thirdparty/bootstrap-utilities.rtl.css diff --git a/wheretogo/static/css/bootstrap-utilities.rtl.css.map b/wheretogo/static/css/thirdparty/bootstrap-utilities.rtl.css.map similarity index 100% rename from wheretogo/static/css/bootstrap-utilities.rtl.css.map rename to wheretogo/static/css/thirdparty/bootstrap-utilities.rtl.css.map diff --git a/wheretogo/static/css/bootstrap-utilities.rtl.min.css b/wheretogo/static/css/thirdparty/bootstrap-utilities.rtl.min.css similarity index 100% rename from wheretogo/static/css/bootstrap-utilities.rtl.min.css rename to wheretogo/static/css/thirdparty/bootstrap-utilities.rtl.min.css diff --git a/wheretogo/static/css/bootstrap-utilities.rtl.min.css.map b/wheretogo/static/css/thirdparty/bootstrap-utilities.rtl.min.css.map similarity index 100% rename from wheretogo/static/css/bootstrap-utilities.rtl.min.css.map rename to wheretogo/static/css/thirdparty/bootstrap-utilities.rtl.min.css.map diff --git a/wheretogo/static/css/bootstrap.css b/wheretogo/static/css/thirdparty/bootstrap.css similarity index 100% rename from wheretogo/static/css/bootstrap.css rename to wheretogo/static/css/thirdparty/bootstrap.css diff --git a/wheretogo/static/css/bootstrap.css.map b/wheretogo/static/css/thirdparty/bootstrap.css.map similarity index 100% rename from wheretogo/static/css/bootstrap.css.map rename to wheretogo/static/css/thirdparty/bootstrap.css.map diff --git a/wheretogo/static/css/bootstrap.min.css b/wheretogo/static/css/thirdparty/bootstrap.min.css similarity index 100% rename from wheretogo/static/css/bootstrap.min.css rename to wheretogo/static/css/thirdparty/bootstrap.min.css diff --git a/wheretogo/static/css/bootstrap.min.css.map b/wheretogo/static/css/thirdparty/bootstrap.min.css.map similarity index 100% rename from wheretogo/static/css/bootstrap.min.css.map rename to wheretogo/static/css/thirdparty/bootstrap.min.css.map diff --git a/wheretogo/static/css/bootstrap.rtl.css b/wheretogo/static/css/thirdparty/bootstrap.rtl.css similarity index 100% rename from wheretogo/static/css/bootstrap.rtl.css rename to wheretogo/static/css/thirdparty/bootstrap.rtl.css diff --git a/wheretogo/static/css/bootstrap.rtl.css.map b/wheretogo/static/css/thirdparty/bootstrap.rtl.css.map similarity index 100% rename from wheretogo/static/css/bootstrap.rtl.css.map rename to wheretogo/static/css/thirdparty/bootstrap.rtl.css.map diff --git a/wheretogo/static/css/bootstrap.rtl.min.css b/wheretogo/static/css/thirdparty/bootstrap.rtl.min.css similarity index 100% rename from wheretogo/static/css/bootstrap.rtl.min.css rename to wheretogo/static/css/thirdparty/bootstrap.rtl.min.css diff --git a/wheretogo/static/css/bootstrap.rtl.min.css.map b/wheretogo/static/css/thirdparty/bootstrap.rtl.min.css.map similarity index 100% rename from wheretogo/static/css/bootstrap.rtl.min.css.map rename to wheretogo/static/css/thirdparty/bootstrap.rtl.min.css.map diff --git a/wheretogo/static/js/bootstrap.bundle.js b/wheretogo/static/js/thirdparty/bootstrap.bundle.js similarity index 100% rename from wheretogo/static/js/bootstrap.bundle.js rename to wheretogo/static/js/thirdparty/bootstrap.bundle.js diff --git a/wheretogo/static/js/bootstrap.bundle.js.map b/wheretogo/static/js/thirdparty/bootstrap.bundle.js.map similarity index 100% rename from wheretogo/static/js/bootstrap.bundle.js.map rename to wheretogo/static/js/thirdparty/bootstrap.bundle.js.map diff --git a/wheretogo/static/js/bootstrap.bundle.min.js b/wheretogo/static/js/thirdparty/bootstrap.bundle.min.js similarity index 100% rename from wheretogo/static/js/bootstrap.bundle.min.js rename to wheretogo/static/js/thirdparty/bootstrap.bundle.min.js diff --git a/wheretogo/static/js/bootstrap.bundle.min.js.map b/wheretogo/static/js/thirdparty/bootstrap.bundle.min.js.map similarity index 100% rename from wheretogo/static/js/bootstrap.bundle.min.js.map rename to wheretogo/static/js/thirdparty/bootstrap.bundle.min.js.map diff --git a/wheretogo/static/js/bootstrap.esm.js b/wheretogo/static/js/thirdparty/bootstrap.esm.js similarity index 100% rename from wheretogo/static/js/bootstrap.esm.js rename to wheretogo/static/js/thirdparty/bootstrap.esm.js diff --git a/wheretogo/static/js/bootstrap.esm.js.map b/wheretogo/static/js/thirdparty/bootstrap.esm.js.map similarity index 100% rename from wheretogo/static/js/bootstrap.esm.js.map rename to wheretogo/static/js/thirdparty/bootstrap.esm.js.map diff --git a/wheretogo/static/js/bootstrap.esm.min.js b/wheretogo/static/js/thirdparty/bootstrap.esm.min.js similarity index 100% rename from wheretogo/static/js/bootstrap.esm.min.js rename to wheretogo/static/js/thirdparty/bootstrap.esm.min.js diff --git a/wheretogo/static/js/bootstrap.esm.min.js.map b/wheretogo/static/js/thirdparty/bootstrap.esm.min.js.map similarity index 100% rename from wheretogo/static/js/bootstrap.esm.min.js.map rename to wheretogo/static/js/thirdparty/bootstrap.esm.min.js.map diff --git a/wheretogo/static/js/bootstrap.js b/wheretogo/static/js/thirdparty/bootstrap.js similarity index 100% rename from wheretogo/static/js/bootstrap.js rename to wheretogo/static/js/thirdparty/bootstrap.js diff --git a/wheretogo/static/js/bootstrap.js.map b/wheretogo/static/js/thirdparty/bootstrap.js.map similarity index 100% rename from wheretogo/static/js/bootstrap.js.map rename to wheretogo/static/js/thirdparty/bootstrap.js.map diff --git a/wheretogo/static/js/bootstrap.min.js b/wheretogo/static/js/thirdparty/bootstrap.min.js similarity index 100% rename from wheretogo/static/js/bootstrap.min.js rename to wheretogo/static/js/thirdparty/bootstrap.min.js diff --git a/wheretogo/static/js/bootstrap.min.js.map b/wheretogo/static/js/thirdparty/bootstrap.min.js.map similarity index 100% rename from wheretogo/static/js/bootstrap.min.js.map rename to wheretogo/static/js/thirdparty/bootstrap.min.js.map diff --git a/wheretogo/static/js/jquery.min.js b/wheretogo/static/js/thirdparty/jquery.min.js similarity index 100% rename from wheretogo/static/js/jquery.min.js rename to wheretogo/static/js/thirdparty/jquery.min.js diff --git a/wheretogo/templates/common/base.html b/wheretogo/templates/common/base.html index 1e740a9..53a43e5 100644 --- a/wheretogo/templates/common/base.html +++ b/wheretogo/templates/common/base.html @@ -8,8 +8,11 @@ {% block head_title %}{% endblock %} - - + + + + + {% csrf_token %} {% block extra_head %} {% endblock %} @@ -20,6 +23,9 @@ WhereToGo diff --git a/wheretogo/templates/maps/map.html b/wheretogo/templates/maps/map.html new file mode 100644 index 0000000..ba856ab --- /dev/null +++ b/wheretogo/templates/maps/map.html @@ -0,0 +1,36 @@ +{% extends "common/base.html" %} + +{% block head_title %}WhereToGo{% endblock %} + +{% block content %} + +
+ + +{% endblock %} \ No newline at end of file diff --git a/wheretogo/wheretogo/settings.py b/wheretogo/wheretogo/settings.py index ca98fda..655de83 100644 --- a/wheretogo/wheretogo/settings.py +++ b/wheretogo/wheretogo/settings.py @@ -32,11 +32,15 @@ INSTALLED_APPS = [ "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", + "django.contrib.gis", + "rest_framework", + "rest_framework_gis", "crispy_forms", "crispy_bootstrap5", "allauth", "allauth.account", "allauth.socialaccount", + "maps", ] SITE_ID = 1 @@ -131,6 +135,7 @@ CRISPY_TEMPLATE_PACK = "bootstrap5" LOGIN_REDIRECT_URL = "/" ACCOUNT_EMAIL_REQUIRED = True +ACCOUNT_EMAIL_VERIFICATION = "none" MESSAGE_TAGS = { messages.DEBUG: "alert-info", diff --git a/wheretogo/wheretogo/urls.py b/wheretogo/wheretogo/urls.py index fcf0442..623662c 100644 --- a/wheretogo/wheretogo/urls.py +++ b/wheretogo/wheretogo/urls.py @@ -1,3 +1,4 @@ +from argparse import Namespace from django.contrib import admin from django.urls import path, include from django.views.generic import TemplateView @@ -7,6 +8,8 @@ from django.conf.urls.static import static urlpatterns = [ path("admin/", admin.site.urls), + path("api/", include("maps.api")), path("accounts/", include("allauth.urls")), path("", TemplateView.as_view(template_name="common/index.html")), + path("maps/", include("maps.urls", namespace="maps")), ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)