Django Admin 500 Internal Server Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About
Django 500 Internal Server Error Apache
Us Learn more about Stack Overflow the company Business Learn more about hiring 500 internal server error django ajax developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the
Django Post 500 Internal Server Error
Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up django admin page is giving me wordpress admin 500 internal server error 500 error in production [duplicate] up vote 4 down vote favorite 2 This question already has an answer here: How to fix the django_sites table? 4 answers I am trying to setup django admin page for my site. for my local dev server it is working now fine, but once i pushed the code to server, and tried to open the admin page, it is giving me magento admin 500 internal server error 500 error page. i saw the traceback, it is saying: DoesNotExist: Site matching query does not exist. but I dont know why and what is happening here. this is the whole traceback, http://pastebin.com/QCdGWTDq can someone please help me? python django django-admin share|improve this question asked May 13 '13 at 19:46 doniyor 12.6k2171127 marked as duplicate by karthikr, Jim Garrison, Eli, syb0rg, CraigTeegarden May 14 '13 at 1:18 This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. Does your django.fcgi file add your root folder to the system path? e.g. path = '/var/www/django/' if path not in sys.path: sys.path.insert(0, path) The idea is that it should find your site's directory at this path (e.g. /var/www/django/mysite/) –pztrick May 13 '13 at 19:53 the rest of the page is working, but only admin is not working. @pztrick –doniyor May 13 '13 at 19:55 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote accepted Just add a Site object via Django shell on production site: $ python manage.py shell >>> from django.contrib.sites.models import Site >>> Site.obje
here for a quick overview of the site Help Center Detailed answers to any questions you might have
Wp Admin 500 Internal Server Error
Meta Discuss the workings and policies of this site About Us django error logging Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with
Django Error 500
us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, http://stackoverflow.com/questions/16529941/django-admin-page-is-giving-me-500-error-in-production just like you, helping each other. Join them; it only takes a minute: Sign up django - admin login error “500 server error” up vote -1 down vote favorite I just finished to setup my website with django, so I tryed to login on my /admin page but the server return "500 server error", I cannot http://stackoverflow.com/questions/37259187/django-admin-login-error-500-server-error manage my db now. There isn't error on apache log, this is what browser console say: Failed to load resource: the server responded with a status of 500 (Internal Server Error) http://www.example.com/admin/login/?next=/admin/ I think that this part of url is really strange, I'm not sure: /admin/login/?next=/admin/ This is my urls.py file: from django.conf.urls import url from django.contrib import admin from Gestione import views urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', views.index), url(r'^faq', views.faq), url(r'^contacts', views.contacts), ] I'm on ubuntu server 15.04 with apache 2.4.10 and django 1.9.6 Thanks for help EDIT: settings.py import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '*********' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = False ALLOWED_HOSTS = ['www.example.com','example.com'] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'Gestione', ] MIDDLEWARE_CLASSES = [ 'django.mid
to web development. Everything is working fine on the development side, https://community.webfaction.com/questions/16343/how-to-get-rid-of-server-error-500-django but I can not figure out why I'm getting the 500 error while in production. I've read all the docs, and my settings appear to be http://serverfault.com/questions/186924/deploying-django-in-centos-internal-server-error-500 fine. I had this in production at one point, and I wanted to change one of my html docs. After I transferred it, the 500 500 internal error returned. I decided to just start all over with my production app and change the html doc back to the way it was. Still can't get the site live. Here are my settings: # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) # 500 internal server SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '#########################' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = False TEMPLATE_DEBUG = False ALLOWED_HOSTS = ['.vintagebasketball.com'] TEMPLATE_LOADERS=( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', ) # Application definition LOCAL_APPS = ( 'home', 'blog', ) THIRD_PARTY_APPS = ( ) DEFAULT_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.comments', 'django.contrib.staticfiles', 'django.contrib.sites', ) INSTALLED_APPS = LOCAL_APPS + THIRD_PARTY_APPS + DEFAULT_APPS MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) ROOT_URLCONF = 'vintageBB.urls' WSGI_APPLICATION = 'vintageBB.wsgi.application' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'vintagebb_db', 'USER': '#######', 'PASSWORD': '#######', } } LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True STATIC_URL = '/static/' I'm not worried about the static files yet, although when I did have this working I used collectstatic and I was able to add CSS to my project. I'm using Python2.7 and
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Deploying Django in CentOS - Internal Server Error 500 up vote 0 down vote favorite My system: CentOS: 5.5 x86_64 GNU/Linux Apache/2.2.16 mod_wsgi-3.2-1.el5.x86_64 python 2.6.6 django 1.2.3 My file example.wsgi: #!/usr/local/bin/python import os, site, sys # add the virtual environment path site.addsitedir('/home/admin/domains/example.com/env/lib/python2.6/site-packages') site.addsitedir('/home/admin/domains/example.com/myproject') site.addsitedir('/home/admin/domains/example.com') # fix markdown.py (and potentially others) using stdout sys.stdout = sys.stderr #Calculate the path based on the location of the WSGI script. project = os.path.dirname(__file__) workspace = os.path.dirname(project) sys.path.append(workspace) os.environ['PYTHON_EGG_CACHE'] = '/home/admin/domains/example.com/.python-eggs' os.environ['DJANGO_SETTINGS_MODULE'] = 'myproject.settings' from django.core.handlers.wsgi import WSGIHandler application = WSGIHandler() And Apache config: ServerRoot /etc/httpd