Browse Source

Backwards incompatible changes for Django 2.0+

pull/258/head
parent
commit
f7aab22502
Signed by: hristoast GPG Key ID: 5FC7664AD47AA1C5
11 changed files with 49 additions and 47 deletions
  1. +2
    -1
      bin/seed_db.py
  2. +1
    -1
      momw/chroniko
  3. +1
    -1
      momw/media
  4. +4
    -4
      momw/momw/models.py
  5. +27
    -29
      momw/momw/urls.py
  6. +1
    -1
      momw/profil
  7. +1
    -0
      momw/search/apps.py
  8. +1
    -0
      momw/search/urls.py
  9. +1
    -1
      momw/utilz
  10. +1
    -1
      momw/zadmin
  11. +9
    -8
      requirements.txt

+ 2
- 1
bin/seed_db.py View File

@ -8,14 +8,15 @@ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'momw.settings')
import django
django.setup()
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.sites.models import Site
# from momw.data_seeds import blog_category_factory, blog_entry_factory, \
# blog_tag_factory, mod_cat_factory, mod_factory
from momw.data_seeds.mod_data import mod_cat_factory, mod_factory
from profil.models import User
TZ = pendulum.timezone(settings.TIME_ZONE)
User = get_user_model()
def site_factory():


+ 1
- 1
momw/chroniko

@ -1 +1 @@
Subproject commit 1bb86eb0a4c235bf10403f5c38572ba6b4b381f1
Subproject commit 6740fcc1f15166b8e9984bc9c53b3b54dbb9eb3e

+ 1
- 1
momw/media

@ -1 +1 @@
Subproject commit 698659e3ae0208c1dbc3ba2be370f83a595725fe
Subproject commit c31ca7bf64b5be0f97a021345f7de695c2ad0f51

+ 4
- 4
momw/momw/models.py View File

@ -2,7 +2,7 @@ import pendulum
from django.conf import settings
from django.contrib.auth import get_user_model
from django.core.urlresolvers import reverse
from django.urls import reverse
from django.db import models
from django.utils.translation import ugettext_lazy as _
from taggit.managers import TaggableManager
@ -70,10 +70,10 @@ class Mod(models.Model):
recommended = RecommendedModsManager()
draft = DraftThingManager()
hidden = HiddenThingManager()
added_by = models.ForeignKey(get_user_model())
added_by = models.ForeignKey(get_user_model(), on_delete=models.PROTECT)
alt_to = models.ManyToManyField('self', blank=True)
author = models.CharField(help_text="Who created this mod?", max_length=250)
category = models.ForeignKey(Category)
category = models.ForeignKey(Category, on_delete=models.PROTECT)
conflicts_with = models.ManyToManyField('self', blank=True)
date_added = models.DateTimeField()
date_updated = models.DateTimeField(auto_now=True)
@ -155,7 +155,7 @@ class Tag(TagBase):
class TaggedMod(GenericTaggedItemBase):
tag = models.ForeignKey(Tag, related_name='%(app_label)s_%(class)s_items')
tag = models.ForeignKey(Tag, related_name='%(app_label)s_%(class)s_items', on_delete=models.PROTECT)
class Meta:
db_table = 'tagged_mods'

+ 27
- 29
momw/momw/urls.py View File

@ -1,4 +1,4 @@
from django.conf.urls import include, url
from django.urls import include, path
# from django.contrib.auth.views import logout
from utilz.views import app_info, app_info_json, contact
from .settings import DEBUG
@ -8,34 +8,32 @@ from .views import about, all_mods, by_step, categories, category_detail, \
urlpatterns = [
url(r'^_app/', app_info, name="app-info"),
url(r'^_stat/', app_info_json, name="app-info-json"),
url(r'^about/$', about, name='about'),
url(r'^blog/', include('chroniko.urls', namespace='blog')),
url(r'^contact/$', contact, name='contact'),
url(r'^faq/$', faq, name='faq'),
url(r'^getting-started/$', getting_started, name='getting_started'),
# url(r'^ip/$', whatismyip, name='ip'),
url(r'^load-order/$', load_order, name='load_order'),
# url(r'^logout/$', logout, {'template_name': 'momw/logout.html'},
path('_app/', app_info, name="app-info"),
path('_stat/', app_info_json, name="app-info-json"),
path('about/', about, name='about'),
path('blog/', include('chroniko.urls', namespace='blog')),
path('contact/', contact, name='contact'),
path('faq/', faq, name='faq'),
path('getting-started/', getting_started, name='getting_started'),
# path('ip/', whatismyip, name='ip'),
path('load-order/', load_order, name='load_order'),
# path('logout/', logout, {'template_name': 'momw/logout.html'},
# name='logout'),
url(r'^mods/$', mod_index, name='mod_index'),
url(r'^mods/all/$', all_mods, name='all_mods'),
url(r'^mods/alts/$', mod_alts, name='mod_alts'),
url(r'^mods/category/all/$', categories, name='mod_categories'),
url(r'^mods/category/(?P<slug>[-\w]+)/$', category_detail,
name='mod_category_detail'),
url(r'^mods/steps/$', by_step, name='by_step'),
url(r'^mods/tag/$', tags, name='mod_tags'),
url(r'^mods/tag/(?P<slug>[-\w]+)/$', tag_detail,
name='mod_tag_detail'),
url(r'^mods/(?P<slug>[-\w]+)/$', mod_detail, name='mod_detail'),
url(r'^privacy/$', privacy, name='privacy'),
url(r'^resources/$', resources, name='resources'),
url(r'^search/', include('search.urls', namespace='search')),
# url(r'^whatismyip/$', whatismyip, name='whatismyip'),
# url(r'^zEndusal/', include("zadmin.urls", namespace='zadmin')),
url(r'^$', index, name='index'),
path('mods/', mod_index, name='mod_index'),
path('mods/all/', all_mods, name='all_mods'),
path('mods/alts/', mod_alts, name='mod_alts'),
path('mods/category/all/', categories, name='mod_categories'),
path('mods/category/<slug:slug>/', category_detail, name='mod_category_detail'),
path('mods/steps/', by_step, name='by_step'),
path('mods/tag/', tags, name='mod_tags'),
path('mods/tag/<slug:slug>/', tag_detail, name='mod_tag_detail'),
path('mods/<slug:slug>/', mod_detail, name='mod_detail'),
path('privacy/', privacy, name='privacy'),
path('resources/', resources, name='resources'),
path('search/', include('search.urls', namespace='search')),
# path('whatismyip/', whatismyip, name='whatismyip'),
# path('zEndusal/', include("zadmin.urls", namespace='zadmin')),
path('', index, name='index'),
]
@ -43,7 +41,7 @@ if DEBUG:
try:
import debug_toolbar
urlpatterns = [
url(r'^__debug__/', include(debug_toolbar.urls)),
path('__debug__/', include(debug_toolbar.urls)),
] + urlpatterns
except ImportError:
# Not installing or using debug toolbar.


+ 1
- 1
momw/profil

@ -1 +1 @@
Subproject commit 949c05a391988c8df7f276ffdd7e1c8369c8a771
Subproject commit 7a1764ce82639225419190dac20407c70a6f2390

+ 1
- 0
momw/search/apps.py View File

@ -3,3 +3,4 @@ from django.apps import AppConfig
class SearchConfig(AppConfig):
name = 'search'
verbose_name = "Search Engine"

+ 1
- 0
momw/search/urls.py View File

@ -1,6 +1,7 @@
from django.conf.urls import url
from .views import advanced_search
app_name = "search"
urlpatterns = [
url(r'^$', advanced_search, name='advanced'),
]

+ 1
- 1
momw/utilz

@ -1 +1 @@
Subproject commit 62cee9a0b7560f4381af1eeec584e073d7b4ce4c
Subproject commit 9b38537e4833a71f078a70f9ba7564bceafc5046

+ 1
- 1
momw/zadmin

@ -1 +1 @@
Subproject commit 2b2c4a62d9057881eead4524b2f9049a0315e61a
Subproject commit 18baa56348e54204e45d9f313a8c2384c76ccbae

+ 9
- 8
requirements.txt View File

@ -1,15 +1,16 @@
beautifulsoup4==4.6.0
Django==1.11.7
Django==2.0.1
django-csp==3.3
django-debug-toolbar==1.8
django-filter==1.0.2
django-taggit==0.22.1
djangorestframework==3.6.2
django-debug-toolbar
django-filter==1.1.0
django-taggit==0.22.2
djangorestframework==3.7.7
ipython
jedi
Markdown==2.6.8
pendulum==1.2.0
psycopg2==2.7.1
Markdown==2.6.11
pendulum==1.3.2
psycopg2==2.7.3.2
python3-memcached==1.51
uWSGI==2.0.15
https://static.bhgdo.com/rikeripsum.zip
selenium==3.8.1

Loading…
Cancel
Save