Created
February 20, 2019 11:24
-
-
Save glasgowm148/08e18621ba24d45c4bf898cb28c6babe to your computer and use it in GitHub Desktop.
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
""" | |
WSGI config for foodle project. | |
It exposes the WSGI callable as a module-level variable named ``application``. | |
For more information on this file, see | |
https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ | |
""" | |
import os | |
from django.core.wsgi import get_wsgi_application | |
from django.contrib import admin | |
# Register your models here. | |
from foodlewebapp.models import Category, Page, UserProfile | |
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'foodlewebapp.settings') | |
application = get_wsgi_application() | |
class PageAdmin(admin.ModelAdmin): | |
list_display = ('title', 'category', 'url') | |
class CategoryAdmin(admin.ModelAdmin): | |
prepopulated_fields = {'slug':('name',)} | |
admin.site.register(Category, CategoryAdmin) | |
admin.site.register(Page, PageAdmin) | |
admin.site.register(UserProfile) | |
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
File "/Users/markglasgow/Documents/GitHub/Foodle/venv/lib/python3.6/importlib/__init__.py", line 126, in import_module | |
return _bootstrap._gcd_import(name[level:], package, level) | |
File "<frozen importlib._bootstrap>", line 994, in _gcd_import | |
File "<frozen importlib._bootstrap>", line 971, in _find_and_load | |
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked | |
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked | |
File "<frozen importlib._bootstrap_external>", line 678, in exec_module | |
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed | |
File "/Users/markglasgow/Documents/GitHub/Foodle/foodlewebapp/admin.py", line 22, in <module> | |
application = get_wsgi_application() | |
File "/Users/markglasgow/Documents/GitHub/Foodle/venv/lib/python3.6/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application | |
django.setup(set_prefix=False) | |
File "/Users/markglasgow/Documents/GitHub/Foodle/venv/lib/python3.6/site-packages/django/__init__.py", line 24, in setup | |
apps.populate(settings.INSTALLED_APPS) | |
File "/Users/markglasgow/Documents/GitHub/Foodle/venv/lib/python3.6/site-packages/django/apps/registry.py", line 81, in populate | |
raise RuntimeError("populate() isn't reentrant") | |
RuntimeError: populate() isn't reentrant | |
^C⏎ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment