Found 3 repositories(showing 3)
sethmlarson
Template for a Python package with a secure project host and package repository configuration.
IntegrityError at /classes/169/ (1062, "Duplicate entry '538-169' for key 'user_id'") Request Method: POST Request URL: http://chiport.mysqool.com/classes/169/ Django Version: 1.4 Exception Type: IntegrityError Exception Value: (1062, "Duplicate entry '538-169' for key 'user_id'") Exception Location: /home/ubuntu/sites/mysqool/pyenv/lib/python2.7/site-packages/MySQLdb/connections.py in defaulterrorhandler, line 36 Python Executable: /usr/bin/python Python Version: 2.7.3 Python Path: ['/home/ubuntu/sites/mysqool/pyenv/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg', '/home/ubuntu/sites/mysqool/pyenv/lib/python2.7/site-packages/pip-1.1-py2.7.egg', '/home/ubuntu/sites/mysqool/pyenv/src/ajax-select', '/home/ubuntu/sites/mysqool', '/home/ubuntu/sites/mysqool/pyenv/lib/python2.7/site-packages', '/home/ubuntu/sites/mysqool/pyenv/lib/python2.7/site-packages/PIL', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/home/ubuntu/sites/mysqool', '/home/ubuntu/sites/mysqool/apps', '/home/ubuntu/sites/mysqool/mysqool', '/home/ubuntu/sites/mysqool/mysqool/../apps/', '/home/ubuntu/sites/mysqool/mysqool/'] Server time: Mon, 22 Oct 2012 10:24:41 -0500 Traceback Switch to copy-and-paste view /home/ubuntu/sites/mysqool/pyenv/lib/python2.7/site-packages/django/core/handlers/base.py in get_response response = callback(request, *callback_args, **callback_kwargs) ... ▶ Local vars /home/ubuntu/sites/mysqool/apps/classes/views/klass.py in class_detail transaction=class_transaction) ... ▶ Local vars /home/ubuntu/sites/mysqool/pyenv/lib/python2.7/site-packages/django/db/models/manager.py in create return self.get_query_set().create(**kwargs) ... ▶ Local vars /home/ubuntu/sites/mysqool/pyenv/lib/python2.7/site-packages/django/db/models/query.py in create obj.save(force_insert=True, using=self.db) ... ▶ Local vars /home/ubuntu/sites/mysqool/apps/enrollment/models.py in save super(Enrollment, self).save(*args, **kwargs) ... ▶ Local vars /home/ubuntu/sites/mysqool/pyenv/lib/python2.7/site-packages/django/db/models/base.py in save self.save_base(using=using, force_insert=force_insert, force_update=force_update) ... ▶ Local vars /home/ubuntu/sites/mysqool/pyenv/lib/python2.7/site-packages/django/db/models/base.py in save_base result = manager._insert([self], fields=fields, return_id=update_pk, using=using, raw=raw) ... ▶ Local vars /home/ubuntu/sites/mysqool/pyenv/lib/python2.7/site-packages/django/db/models/manager.py in _insert return insert_query(self.model, objs, fields, **kwargs) ... ▶ Local vars /home/ubuntu/sites/mysqool/pyenv/lib/python2.7/site-packages/django/db/models/query.py in insert_query return query.get_compiler(using=using).execute_sql(return_id) ... ▶ Local vars /home/ubuntu/sites/mysqool/pyenv/lib/python2.7/site-packages/django/db/models/sql/compiler.py in execute_sql cursor.execute(sql, params) ... ▶ Local vars /home/ubuntu/sites/mysqool/pyenv/lib/python2.7/site-packages/django/db/backends/util.py in execute return self.cursor.execute(sql, params) ... ▶ Local vars /home/ubuntu/sites/mysqool/pyenv/lib/python2.7/site-packages/django/db/backends/mysql/base.py in execute return self.cursor.execute(query, args) ... ▶ Local vars /home/ubuntu/sites/mysqool/pyenv/lib/python2.7/site-packages/MySQLdb/cursors.py in execute self.errorhandler(self, exc, value) ... ▶ Local vars /home/ubuntu/sites/mysqool/pyenv/lib/python2.7/site-packages/MySQLdb/connections.py in defaulterrorhandler raise errorclass, errorvalue ... ▶ Local vars Request information GET No GET data POST Variable Value enroll u'Enroll' csrfmiddlewaretoken u'EY4XM6MqG0yE6afiqZtGwFh2v511Y4TT' users u'310' FILES No FILES data COOKIES Variable Value csrftoken 'EY4XM6MqG0yE6afiqZtGwFh2v511Y4TT' sessionid 'ddb59a24417d9786170978a5346e3c9b' META Variable Value mod_wsgi.listener_port '80' HTTP_REFERER 'http://chiport.mysqool.com/classes/169/' mod_wsgi.listener_host '' SERVER_SOFTWARE 'Apache/2.2.22 (Ubuntu)' SCRIPT_NAME u'' mod_wsgi.handler_script '' SERVER_SIGNATURE '<address>Apache/2.2.22 (Ubuntu) Server at chiport.mysqool.com Port 80</address>\n' REQUEST_METHOD 'POST' PATH_INFO u'/classes/169/' HTTP_ORIGIN 'http://chiport.mysqool.com' SERVER_PROTOCOL 'HTTP/1.1' QUERY_STRING '' CONTENT_LENGTH '86' HTTP_USER_AGENT 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/536.25 (KHTML, like Gecko) Version/6.0 Safari/536.25' HTTP_CONNECTION 'keep-alive' HTTP_COOKIE 'csrftoken=EY4XM6MqG0yE6afiqZtGwFh2v511Y4TT; sessionid=ddb59a24417d9786170978a5346e3c9b' SERVER_NAME 'chiport.mysqool.com' REMOTE_ADDR '71.201.52.157' mod_wsgi.request_handler 'wsgi-script' wsgi.url_scheme 'http' PATH_TRANSLATED '/home/ubuntu/sites/mysqool/mysqool.wsgi/classes/169/' SERVER_PORT '80' wsgi.multiprocess True mod_wsgi.input_chunked '0' SERVER_ADDR '10.39.97.132' DOCUMENT_ROOT '/etc/apache2/htdocs' mod_wsgi.process_group '' SCRIPT_FILENAME '/home/ubuntu/sites/mysqool/mysqool.wsgi' SERVER_ADMIN 'info@mysqool.com' wsgi.input <mod_wsgi.Input object at 0x7f847d321c70> HTTP_HOST 'chiport.mysqool.com' wsgi.multithread True mod_wsgi.callable_object 'application' REQUEST_URI '/classes/169/' HTTP_ACCEPT 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' wsgi.version (1, 1) GATEWAY_INTERFACE 'CGI/1.1' wsgi.run_once False wsgi.errors <mod_wsgi.Log object at 0x7f847d321af0> REMOTE_PORT '57290' HTTP_ACCEPT_LANGUAGE 'en-us' mod_wsgi.version (3, 3) CONTENT_TYPE 'application/x-www-form-urlencoded' mod_wsgi.application_group 'staging.mysqool.com|' mod_wsgi.script_reloading '1' wsgi.file_wrapper '' CSRF_COOKIE 'EY4XM6MqG0yE6afiqZtGwFh2v511Y4TT' HTTP_ACCEPT_ENCODING 'gzip, deflate' Settings Using settings module mysqool.settings Setting Value USE_L10N False USE_THOUSAND_SEPARATOR False CSRF_COOKIE_SECURE False LANGUAGE_CODE 'en-us' ROOT_URLCONF 'mysqool.urls' MANAGERS (('', ''),) DEFAULT_CHARSET 'utf-8' STATIC_ROOT '/home/ubuntu/sites/mysqool/mysqool/static/' MESSAGE_STORAGE 'django.contrib.messages.storage.fallback.FallbackStorage' EMAIL_SUBJECT_PREFIX '[Django] ' SEND_BROKEN_LINK_EMAILS False URL_VALIDATOR_USER_AGENT 'Django/1.4 (https://www.djangoproject.com)' STATICFILES_FINDERS ('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder') SESSION_COOKIE_DOMAIN None SESSION_COOKIE_NAME 'sessionid' ADMIN_FOR () TIME_INPUT_FORMATS ('%H:%M %p', '%P', '%H:%M%A', '%H:%M %A', '%H:%M%a', '%H:%M %a') DATABASES {'default': {'ENGINE': 'django.db.backends.mysql', 'HOST': '', 'NAME': 'mysqool', 'OPTIONS': {}, 'PASSWORD': u'********************', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': None, 'TIME_ZONE': 'America/Chicago', 'USER': 'mysqool'}} FILE_UPLOAD_PERMISSIONS None FILE_UPLOAD_HANDLERS ('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler') DEFAULT_CONTENT_TYPE 'text/html' TEST_RUNNER 'django.test.simple.DjangoTestSuiteRunner' AJAX_SELECT_BOOTSTRAP True APPEND_SLASH True FIRST_DAY_OF_WEEK 0 DATABASE_ROUTERS [] YEAR_MONTH_FORMAT 'F Y' STATICFILES_STORAGE 'django.contrib.staticfiles.storage.StaticFilesStorage' CACHES {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'LOCATION': ''}} SERVER_EMAIL 'noreply@mysqool.com' SESSION_COOKIE_PATH '/' USE_X_FORWARDED_HOST False MIDDLEWARE_CLASSES ('mediagenerator.middleware.MediaMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', 'debug_toolbar.middleware.DebugToolbarMiddleware', 'mysqool.middleware.authentication.EnforceLoginMiddleware') USE_I18N False THOUSAND_SEPARATOR ',' SECRET_KEY u'********************' LANGUAGE_COOKIE_NAME 'django_language' DEFAULT_INDEX_TABLESPACE '' TRANSACTIONS_MANAGED False LOGGING_CONFIG 'django.utils.log.dictConfig' TEMPLATE_LOADERS ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader') WSGI_APPLICATION 'mysqool.wsgi.application' TEMPLATE_DEBUG True X_FRAME_OPTIONS 'SAMEORIGIN' AUTHENTICATION_BACKENDS ('mysqool.backends.authentication.EmailOrUsernameModelBackend', 'django.contrib.auth.backends.ModelBackend') FORCE_SCRIPT_NAME None CACHE_BACKEND 'locmem://' SIGNING_BACKEND 'django.core.signing.TimestampSigner' SESSION_COOKIE_SECURE False CSRF_COOKIE_DOMAIN None FILE_CHARSET 'utf-8' DEBUG True SESSION_FILE_PATH None DEFAULT_FILE_STORAGE 'django.core.files.storage.FileSystemStorage' INSTALLED_APPS ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.humanize', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.flatpages', 'django.contrib.admin', 'django.contrib.webdesign', 'administration', 'attendance', 'calendars', 'classes', 'dashboard', 'enrollment', 'helper', 'people', 'schools', 'transactions', 'mediagenerator', 'widget_tweaks', 'crispy_forms', 'ajax_select', 'debug_toolbar', 'registration', 'profiles', 'oembed', 'south', 'tagging') LANGUAGES (('ar', 'Arabic'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('bn', 'Bengali'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy-nl', 'Frisian'), ('ga', 'Irish'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('id', 'Indonesian'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('nb', 'Norwegian Bokmal'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese')) COMMENTS_ALLOW_PROFANITIES False STATICFILES_DIRS ('/home/ubuntu/sites/mysqool/mysqool/static-files/',) PREPEND_WWW False SECURE_PROXY_SSL_HEADER None AUTH_PROFILE_MODULE 'people.Profile' SESSION_COOKIE_HTTPONLY True DEBUG_PROPAGATE_EXCEPTIONS False CACHE_MIDDLEWARE_ALIAS 'default' MONTH_DAY_FORMAT 'F j' LOGIN_URL '/login/' SESSION_EXPIRE_AT_BROWSER_CLOSE False TIME_FORMAT ('%I:%M %p',) DATE_INPUT_FORMATS ('%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y') CSRF_COOKIE_NAME 'csrftoken' EMAIL_HOST_PASSWORD u'********************' PASSWORD_RESET_TIMEOUT_DAYS u'********************' AJAX_LOOKUP_CHANNELS {'student_name': ('schools.lookups', 'UserLookup')} SESSION_SAVE_EVERY_REQUEST False ADMIN_MEDIA_PREFIX '/static//admin/' NUMBER_GROUPING 0 SESSION_ENGINE 'django.contrib.sessions.backends.db' CSRF_FAILURE_VIEW 'django.views.csrf.csrf_failure' CSRF_COOKIE_PATH '/' LOGIN_REDIRECT_URL '/' PUBLIC_URLS ('api/', 'login/', 'logout/', 'registration/password/reset/(.*)') PROJECT_ROOT '/home/ubuntu/sites/mysqool/mysqool' LOGGING {'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'handlers': {'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'filters': ['require_debug_false'], 'level': 'ERROR'}}, 'loggers': {'django.request': {'handlers': ['mail_admins'], 'level': 'ERROR', 'propagate': True}}, 'version': 1} IGNORABLE_404_URLS () LOCALE_PATHS () TEMPLATE_STRING_IF_INVALID '' LOGOUT_URL '/accounts/logout/' EMAIL_USE_TLS True FIXTURE_DIRS () EMAIL_HOST 'smtp.sendgrid.net' DATE_FORMAT 'N j, Y' MEDIA_ROOT '/home/ubuntu/sites/mysqool/mysqool/media/' DEFAULT_EXCEPTION_REPORTER_FILTER 'django.views.debug.SafeExceptionReporterFilter' ADMINS (('', ''),) FORMAT_MODULE_PATH None DEFAULT_FROM_EMAIL 'noreply@mysqool.com' MEDIA_URL '/media/' DATETIME_FORMAT 'N j, Y, P' TEMPLATE_DIRS ('/home/ubuntu/sites/mysqool/mysqool/templates',) DIF ('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y') SITE_ID 1 DISALLOWED_USER_AGENTS () ALLOWED_INCLUDE_ROOTS () DECIMAL_SEPARATOR '.' SHORT_DATE_FORMAT 'm/d/Y' AJAX_SELECT_INLINES 'inline' CACHE_MIDDLEWARE_KEY_PREFIX u'********************' TIME_ZONE 'America/Chicago' FILE_UPLOAD_MAX_MEMORY_SIZE 2621440 EMAIL_BACKEND 'django.core.mail.backends.smtp.EmailBackend' DEFAULT_TABLESPACE '' TEMPLATE_CONTEXT_PROCESSORS ('django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static', 'django.core.context_processors.request', 'django.core.context_processors.tz', 'django.contrib.messages.context_processors.messages', 'mysqool.context_processors.school_info') SESSION_COOKIE_AGE 86400 SETTINGS_MODULE 'mysqool.settings' USE_ETAGS False LANGUAGES_BIDI ('he', 'ar', 'fa') FILE_UPLOAD_TEMP_DIR None INTERNAL_IPS ('127.0.0.1',) STATIC_URL '/static/' EMAIL_PORT 587 USE_TZ False SHORT_DATETIME_FORMAT 'm/d/Y P' PASSWORD_HASHERS u'********************' ABSOLUTE_URL_OVERRIDES {} CACHE_MIDDLEWARE_SECONDS 600 DEBUG_TOOLBAR_CONFIG {'INTERCEPT_REDIRECTS': False} DATETIME_INPUT_FORMATS ('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y', '%m/%d/%Y %I:%M %p', '%m/%d/%Y %I:%M%p') EMAIL_HOST_USER 'sandersnewmedia' PROFANITIES_LIST u'********************' You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.
When you are starting a business then you need to have a good website. For a business, PHP Web Development will be a kick-start. As many developers are using PHP for their web development. Many reasons give developers a free hand to use PHP for developing any kind of website. The full form of PHP is “Hypertext Preprocessor” and PHP is an open-source server-side scripting platform that gives a good choice for the development of any kind of business. PHP offers a wide range of opportunities to create dynamic content quickly. From the view of developers, PHP is more likely a command-line scripting and server scripting language. According to research by Google, over 70% of website content is powered by PHP. It is also used to develop social media platforms such as Twitter, Facebook, Instagram, and many more. More than these, PHP is also used for developing web content management websites such as WordPress, Joomla, and many more. In this article, we are going to discuss why PHP Web Development is a Good Choice for Your Business? Why do businesses prefer PHP web development as a good choice? A high-Security provide When compared to different scripting languages, PHP development ensures good security for websites and information. This makes a business free from software attacks and maintains data securely. PHP provides astonishing features to control the flow of the system. PHP has a 24/7 support team with full experts and provides better solutions for a given problem. PHP provides amazing frameworks which are suitable for all types of business platforms and content management websites. Hiring an efficient developer can lead to effective websites and the growth of businesses. The major quality required for developers is experience and freeness towards PHP. A complete package PHP allows all kinds of extensions which are available on the internet. To make feasible and fantastic websites PHP has inbuilt extensions and can provide a performance. From the point of view of users, it can give a good experience and quick access to websites. Developers can give good quality and secured websites in less time. PHP has the ability to integrate with all kinds of programming languages and it can give a high-performance standard. For instance, PHP can integrate with python, Ruby, WordPress, etc. Maintain good customers PHP gives a fast response time to websites. Especially when we want to develop a website for e-commerce, customers should not face any sort of problem with loading and presentation of content. In these kinds of cases, PHP is mostly preferred for its pro-active fastness. Due to the wide range of templates, a best-required template can be chosen to maintain a good number of customers. PHP has the power to manage multiple tasks at a time. Millions of users visit business websites every day, handling these customers can be an easy task. Budget-friendly Many of the websites on the internet are developed by PHP because of their budget-free nature(open-source). It has a General Public License that is free to download and can modify to have a better website. Developers can focus more on the features of a website. Mainly due to the open-source nature, PHP brings down the budget for companies. Maintenance and Development Reusability of code is easier and PHP saves a lot of time in modifying the code. Basic knowledge of PHP anyone can develop a best-secured website. The maintenance of the website is absolutely trouble-free. Frameworks available in PHP are fast and secured. When these are integrated with HTML the performance goes high and it becomes, even more, faster and easier to maintain. PHP has decipherable syntax, due to this code modification is easy. Flexibility Using PHP on multiple platforms is one of the biggest advantages of PHP including qualities like flexibility and integrity. PHP can be used on platforms such as Unix, Linex, Windows, even on Mac, etc. This language has the unique feature of supporting more than 20 databases like MySql, PostgreSQL, and so on. This is the reason why most of the companies are showing interest in PHP coding for better results. Last words The above-mentioned reasons are the most important to deliver facts about Why PHP Web Development is a Good Choice for Your Business? With these, you can get an idea of what to choose and why. To know more: https://codism.io/top-benefits-of-choosing-php-web-development-for-your-business/
All 3 repositories loaded