Squashed commit of the following:
commit 97b044cafb7f17f23b3b1beedcf70af209a60ddc Author: reverend <reverend@reverend2048.de> Date: Mon Sep 14 17:25:40 2020 +0200 Updating gitignore commit 4891d80486e1f95db8ae66385c7c97426a3ca1a4 Author: reverend <reverend@reverend2048.de> Date: Mon Sep 14 17:25:20 2020 +0200 Updating Readme commit f05c43abbdc7eb30896ad6d10fe80fd6483338d9 Author: reverend <reverend@reverend2048.de> Date: Mon Sep 14 17:23:30 2020 +0200 Renaming Module commit fd5ad2ee9f8cbacd565da45b257928192ffc651c Author: reverend <reverend@reverend2048.de> Date: Mon Sep 14 17:23:16 2020 +0200 Renaming module references commit 828a0dd5dd73723b84b77908497903ed26b6966b Author: reverend <reverend@reverend2048.de> Date: Mon Sep 14 17:21:20 2020 +0200 Renaming Project
2
.gitignore
vendored
@ -69,7 +69,7 @@ coverage.xml
|
||||
# exclude migrations from repository. These should be created locally, matching local DB requirements.
|
||||
# lostplaces/manage.py makemigrations && lostplaces/manage.py migrate
|
||||
|
||||
lostplaces/lostplaces_app/migrations/
|
||||
django_lostplaces/lostplaces/migrations/
|
||||
|
||||
# pyenv
|
||||
.python-version
|
||||
|
@ -1,5 +1,5 @@
|
||||
include LICENSE
|
||||
include Readme.rst
|
||||
include Pipfile
|
||||
recursive-include lostplaces_app/static *
|
||||
recursive-include lostplaces_app/templates *
|
||||
recursive-include lostplaces/static *
|
||||
recursive-include lostplaces/templates *
|
5
Pipfile
@ -21,5 +21,8 @@ django-widget-tweaks = "*"
|
||||
django-taggit = "*"
|
||||
|
||||
[scripts]
|
||||
test = "lostplaces/manage.py test lostplaces_app"
|
||||
test = "django_lostplaces/manage.py test lostplaces"
|
||||
server = "django_lostplaces/manage.py runserver --ipv6"
|
||||
dbshell = "django_lostplaces/manage.py dbshell"
|
||||
showmigrations "django_lostplaces/manage.py showmigrations"
|
||||
|
||||
|
@ -75,7 +75,7 @@ Before making the django instance public, you should tweak the config `settings.
|
||||
Run `lostplaces/managy.py collectstatic` and you should be ready to go.
|
||||
|
||||
|
||||
## Installing the lostplaces_app to an existing django instance
|
||||
## Installing lostplaces to an existing django instance
|
||||
|
||||
### Installing django and the lostplaces app
|
||||
|
||||
@ -93,7 +93,7 @@ Now configure your `settings.py` as follows:
|
||||
```python
|
||||
INSTALLED_APPS = [
|
||||
...
|
||||
'lostplaces_app',
|
||||
'lostplaces',
|
||||
'easy_thumbnails',
|
||||
'widget_tweaks',
|
||||
'django_taggit'
|
||||
@ -113,7 +113,7 @@ MEDIA_ROOT = os.path.join(BASE_DIR, 'uploads')
|
||||
3. Set the user model (this will be changed in the next release):
|
||||
|
||||
```python
|
||||
AUTH_USER_MODEL = 'lostplaces_app.Explorer'
|
||||
AUTH_USER_MODEL = 'lostplaces.Explorer'
|
||||
```
|
||||
|
||||
4. Set the URL's for login, for example:
|
||||
@ -131,7 +131,7 @@ urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('signup/', SignUpView.as_view(), name='signup'), # If you want to use lostplaces' sign up view.
|
||||
path('explorers/', include('django.contrib.auth.urls')), # You can change the 'explorers/' to whatever you desire.
|
||||
path('', include('lostplaces_app.urls')), # In this configuration lostplaces will be at the top level of you website, change '' to 'lostplaces/', if you don't want this.
|
||||
path('', include('lostplaces.urls')), # In this configuration lostplaces will be at the top level of you website, change '' to 'lostplaces/', if you don't want this.
|
||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) # So django can deliver user uploaded files.
|
||||
```
|
||||
|
||||
|
@ -14,6 +14,6 @@ import os
|
||||
|
||||
from django.core.asgi import get_asgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lostplaces.settings')
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_lostplaces.settings')
|
||||
|
||||
application = get_asgi_application()
|
@ -38,7 +38,7 @@ ALLOWED_HOSTS = ['localhost']
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'lostplaces_app',
|
||||
'lostplaces',
|
||||
'easy_thumbnails',
|
||||
'widget_tweaks',
|
||||
'taggit',
|
||||
@ -60,7 +60,7 @@ MIDDLEWARE = [
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'lostplaces.urls'
|
||||
ROOT_URLCONF = 'django_lostplaces.urls'
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
@ -78,7 +78,7 @@ TEMPLATES = [
|
||||
},
|
||||
]
|
||||
|
||||
WSGI_APPLICATION = 'lostplaces.wsgi.application'
|
||||
WSGI_APPLICATION = 'django_lostplaces.wsgi.application'
|
||||
|
||||
|
||||
# Database
|
@ -23,11 +23,11 @@ from django.conf.urls.static import static
|
||||
from django.urls import path, include
|
||||
from django.views.generic.base import TemplateView
|
||||
|
||||
from lostplaces_app.views import SignUpView
|
||||
from lostplaces.views import SignUpView
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('signup/', SignUpView.as_view(), name='signup'),
|
||||
path('explorers/', include('django.contrib.auth.urls')),
|
||||
path('', include('lostplaces_app.urls')),
|
||||
path('', include('lostplaces.urls')),
|
||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
@ -14,6 +14,6 @@ import os
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lostplaces.settings')
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_lostplaces.settings')
|
||||
|
||||
application = get_wsgi_application()
|
@ -6,9 +6,9 @@
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.contrib.auth.admin import UserAdmin
|
||||
from lostplaces_app.models import *
|
||||
from lostplaces.models import *
|
||||
|
||||
from lostplaces_app.forms import ExplorerCreationForm, ExplorerChangeForm
|
||||
from lostplaces.forms import ExplorerCreationForm, ExplorerChangeForm
|
||||
|
||||
# Register your models here.
|
||||
|
@ -1,4 +1,4 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
class LostplacesAppConfig(AppConfig):
|
||||
name = 'lostplaces_app'
|
||||
name = 'lostplaces'
|
@ -6,7 +6,7 @@
|
||||
from django import forms
|
||||
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
|
||||
from django.contrib.auth.models import User
|
||||
from lostplaces_app.models import Place, PlaceImage, Voucher
|
||||
from lostplaces.models import Place, PlaceImage, Voucher
|
||||
|
||||
class ExplorerCreationForm(UserCreationForm):
|
||||
class Meta:
|
Before Width: | Height: | Size: 264 KiB After Width: | Height: | Size: 264 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 816 B After Width: | Height: | Size: 816 B |
Before Width: | Height: | Size: 351 B After Width: | Height: | Size: 351 B |
Before Width: | Height: | Size: 641 B After Width: | Height: | Size: 641 B |
Before Width: | Height: | Size: 850 B After Width: | Height: | Size: 850 B |
Before Width: | Height: | Size: 914 B After Width: | Height: | Size: 914 B |
Before Width: | Height: | Size: 488 B After Width: | Height: | Size: 488 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 717 B After Width: | Height: | Size: 717 B |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 209 B |
@ -6,7 +6,7 @@ from django.conf import settings
|
||||
from django.template import Library, TemplateSyntaxError
|
||||
|
||||
#icons_json_path = getattr(settings, 'SVG_ICONS_SOURCE_FILE')
|
||||
icons_json_path = os.path.join(settings.BASE_DIR, 'lostplaces_app', 'static', 'icons', 'icons.icomoon.json')
|
||||
icons_json_path = os.path.join(settings.BASE_DIR, 'lostplaces', 'static', 'icons', 'icons.icomoon.json')
|
||||
icons_json = json.load(open(icons_json_path))
|
||||
|
||||
register = Library()
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
@ -4,12 +4,12 @@ from django.test import TestCase
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
from lostplaces_app.models import (
|
||||
from lostplaces.models import (
|
||||
Taggable,
|
||||
Mapable,
|
||||
Submittable
|
||||
)
|
||||
from lostplaces_app.tests.models import ModelTestCase
|
||||
from lostplaces.tests.models import ModelTestCase
|
||||
|
||||
from taggit.managers import TaggableManager
|
||||
|
@ -2,7 +2,7 @@ from django.test import TestCase
|
||||
from django.db import models
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
from lostplaces_app.models import Explorer
|
||||
from lostplaces.models import Explorer
|
||||
|
||||
class ExplorerTestCase(TestCase):
|
||||
|
@ -9,8 +9,8 @@ from django.core.files import File
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
from lostplaces_app.models import PlaceImage, Place
|
||||
from lostplaces_app.tests.models import ModelTestCase
|
||||
from lostplaces.models import PlaceImage, Place
|
||||
from lostplaces.tests.models import ModelTestCase
|
||||
|
||||
from easy_thumbnails.fields import ThumbnailerImageField
|
||||
|
@ -5,8 +5,8 @@ from django.db import models
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
from lostplaces_app.models import Place
|
||||
from lostplaces_app.tests.models import ModelTestCase
|
||||
from lostplaces.models import Place
|
||||
from lostplaces.tests.models import ModelTestCase
|
||||
|
||||
class PlaceTestCase(ModelTestCase):
|
||||
model = Place
|
@ -4,8 +4,8 @@ from django.test import TestCase
|
||||
from django.db import models
|
||||
from django.utils import timezone
|
||||
|
||||
from lostplaces_app.models import Voucher
|
||||
from lostplaces_app.tests.models import ModelTestCase
|
||||
from lostplaces.models import Voucher
|
||||
from lostplaces.tests.models import ModelTestCase
|
||||
|
||||
|
||||
class VoucheTestCase(ModelTestCase):
|
@ -1,6 +1,6 @@
|
||||
from django.test import TestCase
|
||||
|
||||
from lostplaces_app.models import Taggable, Mapable
|
||||
from lostplaces.models import Taggable, Mapable
|
||||
|
||||
from taggit.models import Tag
|
||||
|
@ -5,9 +5,9 @@ from django.urls import reverse_lazy
|
||||
from django.contrib.auth.models import User, AnonymousUser
|
||||
from django.contrib.messages.storage.fallback import FallbackStorage
|
||||
|
||||
from lostplaces_app.models import Place
|
||||
from lostplaces_app.views import IsAuthenticatedMixin
|
||||
from lostplaces_app.tests.views import ViewTestCase
|
||||
from lostplaces.models import Place
|
||||
from lostplaces.views import IsAuthenticatedMixin
|
||||
from lostplaces.tests.views import ViewTestCase
|
||||
|
||||
class TestIsAuthenticated(ViewTestCase):
|
||||
view = IsAuthenticatedMixin
|
@ -4,14 +4,14 @@ from django.test import TestCase, Client
|
||||
from django.urls import reverse
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
from lostplaces_app.models import Place
|
||||
from lostplaces_app.views import (
|
||||
from lostplaces.models import Place
|
||||
from lostplaces.views import (
|
||||
PlaceCreateView,
|
||||
PlaceListView,
|
||||
PlaceDetailView
|
||||
)
|
||||
from lostplaces_app.forms import PlaceImageCreateForm, PlaceForm
|
||||
from lostplaces_app.tests.views import (
|
||||
from lostplaces.forms import PlaceImageCreateForm, PlaceForm
|
||||
from lostplaces.tests.views import (
|
||||
ViewTestCase,
|
||||
TaggableViewTestCaseMixin,
|
||||
MapableViewTestCaseMixin
|
@ -1,5 +1,5 @@
|
||||
from django.urls import path
|
||||
from lostplaces_app.views import (
|
||||
from lostplaces.views import (
|
||||
HomeView,
|
||||
PlaceDetailView,
|
||||
PlaceListView,
|
3
django_lostplaces/lostplaces/views/__init__.py
Normal file
@ -0,0 +1,3 @@
|
||||
from lostplaces.views.base_views import *
|
||||
from lostplaces.views.views import *
|
||||
from lostplaces.views.place_views import *
|
@ -9,7 +9,7 @@ from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.shortcuts import redirect
|
||||
from django.urls import reverse_lazy
|
||||
|
||||
from lostplaces_app.models import Place
|
||||
from lostplaces.models import Place
|
||||
|
||||
class IsAuthenticatedMixin(LoginRequiredMixin, View):
|
||||
'''
|
@ -9,9 +9,9 @@ from django.contrib.messages.views import SuccessMessageMixin
|
||||
from django.shortcuts import render, redirect
|
||||
from django.urls import reverse_lazy
|
||||
|
||||
from lostplaces_app.models import Place, PlaceImage
|
||||
from lostplaces_app.views import IsAuthenticatedMixin, IsPlaceSubmitterMixin
|
||||
from lostplaces_app.forms import PlaceForm, PlaceImageCreateForm, TagSubmitForm
|
||||
from lostplaces.models import Place, PlaceImage
|
||||
from lostplaces.views import IsAuthenticatedMixin, IsPlaceSubmitterMixin
|
||||
from lostplaces.forms import PlaceForm, PlaceImageCreateForm, TagSubmitForm
|
||||
|
||||
from taggit.models import Tag
|
||||
|
@ -7,11 +7,11 @@ from django.urls import reverse_lazy
|
||||
from django.shortcuts import render, redirect, get_object_or_404
|
||||
from django.http import HttpResponseForbidden
|
||||
|
||||
from lostplaces_app.forms import ExplorerCreationForm, TagSubmitForm
|
||||
from lostplaces_app.models import Place, PhotoAlbum
|
||||
from lostplaces_app.views.base_views import IsAuthenticatedMixin
|
||||
from lostplaces.forms import ExplorerCreationForm, TagSubmitForm
|
||||
from lostplaces.models import Place, PhotoAlbum
|
||||
from lostplaces.views.base_views import IsAuthenticatedMixin
|
||||
|
||||
from lostplaces_app.views.base_views import (
|
||||
from lostplaces.views.base_views import (
|
||||
PlaceAssetCreateView,
|
||||
PlaceAssetDeleteView,
|
||||
)
|
@ -7,7 +7,7 @@ import os
|
||||
import sys
|
||||
|
||||
def main():
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lostplaces.settings')
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_lostplaces.settings')
|
||||
try:
|
||||
from django.core.management import execute_from_command_line
|
||||
except ImportError as exc:
|
@ -1,3 +0,0 @@
|
||||
from lostplaces_app.views.base_views import *
|
||||
from lostplaces_app.views.views import *
|
||||
from lostplaces_app.views.place_views import *
|