(1055, "Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'edumple_python.packages.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by")
Request Method: | GET |
---|---|
Request URL: | http://www.edumple.com/courses/class-2/batches/self-study |
Django Version: | 2.1.7 |
Exception Type: | OperationalError |
Exception Value: | (1055, "Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'edumple_python.packages.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by") |
Exception Location: | /usr/local/lib/python3.7/site-packages/MySQLdb/connections.py in query, line 239 |
Python Executable: | /usr/local/bin/python3.7 |
Python Version: | 3.7.12 |
Python Path: | ['/opt/edumple/prod.edumple/edumple', '/usr/local/lib/python37.zip', '/usr/local/lib/python3.7', '/usr/local/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/site-packages', '/usr/local/lib/python3.7/site-packages/odf', '/usr/local/lib/python3.7/site-packages/odf', '/usr/local/lib/python3.7/site-packages/odf', '/usr/local/lib/python3.7/site-packages/odf', '/usr/local/lib/python3.7/site-packages/odf', '/usr/local/lib/python3.7/site-packages/odf', '/usr/local/lib/python3.7/site-packages/odf'] |
Server time: | Fri, 29 Mar 2024 17:01:55 +0530 |
/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py
in _execute
executor = functools.partial(wrapper, executor)
return executor(sql, params, many, context)
def _execute(self, sql, params, *ignored_wrapper_args):
self.db.validate_no_broken_transaction()
with self.db.wrap_database_errors:
if params is None:
return self.cursor.execute(sql)...
else:
return self.cursor.execute(sql, params)
def _executemany(self, sql, param_list, *ignored_wrapper_args):
self.db.validate_no_broken_transaction()
with self.db.wrap_database_errors:
Variable | Value |
---|---|
ignored_wrapper_args | (False, {'connection': <django.db.backends.mysql.base.DatabaseWrapper object at 0x7f8cfc046cd0>, 'cursor': <django.db.backends.utils.CursorDebugWrapper object at 0x7f8cfae38910>}) |
params | None |
self | <django.db.backends.utils.CursorDebugWrapper object at 0x7f8cfae38910> |
sql | ('SELECT `packages`.`id`, `packages`.`course_id`, `packages`.`batch_type_id`, ' '`packages`.`package_name`, `packages`.`slug`, `packages`.`description`, ' '`packages`.`title`, `packages`.`url`, `packages`.`meta_keywords`, ' '`packages`.`meta_description`, `packages`.`admin_price`, ' '`packages`.`calculated_price`, `packages`.`image`, `packages`.`video_id`, ' '`packages`.`video_thumbnail`, `packages`.`video_name`, ' '`packages`.`video_preview_url`, `packages`.`created_by_id`, ' '`packages`.`available_from`, `packages`.`available_to`, ' '`packages`.`is_active`, `packages`.`deleted`, `packages`.`created`, ' '`packages`.`modified`, `packages`.`shortdescription`, ' '`packages`.`free_trial`, `packages`.`is_open`, `packages`.`same_checkbox`, ' '`packages`.`question_total`, `packages`.`question_easy`, ' '`packages`.`question_medium`, `packages`.`question_hard`, ' '`packages`.`video_platform_id`, `packages`.`approximate_platform_duration`, ' '`packages`.`show_on_home`, `packages`.`batch_time`, ' '`packages`.`is_installment_available`, `packages`.`advance_price`, ' '`packages`.`installment_price`, `packages`.`installment_count`, ' '`packages`.`points`, `packages`.`subject_timing_details`, ' '`packages`.`batch_location`, `packages`.`course_structure`, ' '`packages`.`is_structure_edited`, `packages`.`live_platform_link` FROM ' '`packages` LEFT OUTER JOIN `users` ON (`packages`.`created_by_id` = ' '`users`.`id`) WHERE (`packages`.`course_id` = 16 AND `packages`.`deleted` = ' '0 AND `packages`.`is_active` = 1 AND `packages`.`show_on_home` = 1 AND NOT ' '(`users`.`is_institute_blocked` = True AND `users`.`is_institute_blocked` IS ' 'NOT NULL) AND `packages`.`batch_type_id` = 2 AND `packages`.`available_to` > ' 'CURRENT_DATE) GROUP BY created_by_id ORDER BY points DESC') |
/usr/local/lib/python3.7/site-packages/django/db/backends/mysql/base.py
in execute
def __init__(self, cursor):
self.cursor = cursor
def execute(self, query, args=None):
try:
# args is None means no string interpolation
return self.cursor.execute(query, args)...
except Database.OperationalError as e:
# Map some error codes to IntegrityError, since they seem to be
# misclassified and Django would prefer the more logical place.
if e.args[0] in self.codes_for_integrityerror:
raise utils.IntegrityError(*tuple(e.args))
raise
Variable | Value |
---|---|
args | None |
query | ('SELECT `packages`.`id`, `packages`.`course_id`, `packages`.`batch_type_id`, ' '`packages`.`package_name`, `packages`.`slug`, `packages`.`description`, ' '`packages`.`title`, `packages`.`url`, `packages`.`meta_keywords`, ' '`packages`.`meta_description`, `packages`.`admin_price`, ' '`packages`.`calculated_price`, `packages`.`image`, `packages`.`video_id`, ' '`packages`.`video_thumbnail`, `packages`.`video_name`, ' '`packages`.`video_preview_url`, `packages`.`created_by_id`, ' '`packages`.`available_from`, `packages`.`available_to`, ' '`packages`.`is_active`, `packages`.`deleted`, `packages`.`created`, ' '`packages`.`modified`, `packages`.`shortdescription`, ' '`packages`.`free_trial`, `packages`.`is_open`, `packages`.`same_checkbox`, ' '`packages`.`question_total`, `packages`.`question_easy`, ' '`packages`.`question_medium`, `packages`.`question_hard`, ' '`packages`.`video_platform_id`, `packages`.`approximate_platform_duration`, ' '`packages`.`show_on_home`, `packages`.`batch_time`, ' '`packages`.`is_installment_available`, `packages`.`advance_price`, ' '`packages`.`installment_price`, `packages`.`installment_count`, ' '`packages`.`points`, `packages`.`subject_timing_details`, ' '`packages`.`batch_location`, `packages`.`course_structure`, ' '`packages`.`is_structure_edited`, `packages`.`live_platform_link` FROM ' '`packages` LEFT OUTER JOIN `users` ON (`packages`.`created_by_id` = ' '`users`.`id`) WHERE (`packages`.`course_id` = 16 AND `packages`.`deleted` = ' '0 AND `packages`.`is_active` = 1 AND `packages`.`show_on_home` = 1 AND NOT ' '(`users`.`is_institute_blocked` = True AND `users`.`is_institute_blocked` IS ' 'NOT NULL) AND `packages`.`batch_type_id` = 2 AND `packages`.`available_to` > ' 'CURRENT_DATE) GROUP BY created_by_id ORDER BY points DESC') |
self | <django.db.backends.mysql.base.CursorWrapper object at 0x7f8cfbfb10d0> |
/usr/local/lib/python3.7/site-packages/MySQLdb/cursors.py
in execute
args = tuple(map(db.literal, args))
try:
query = query % args
except TypeError as m:
raise ProgrammingError(str(m))
assert isinstance(query, (bytes, bytearray))
res = self._query(query)...
return res
def executemany(self, query, args):
# type: (str, list) -> int
"""Execute a multi-row query.
Variable | Value |
---|---|
args | None |
db | <_mysql.connection open to 'localhost' at 0x7f8ce40ec850> |
query | (b'SELECT `packages`.`id`, `packages`.`course_id`, `packages`.`batch_type_id`, ' b'`packages`.`package_name`, `packages`.`slug`, `packages`.`description`, `pac' b'kages`.`title`, `packages`.`url`, `packages`.`meta_keywords`, `packages`.`me' b'ta_description`, `packages`.`admin_price`, `packages`.`calculated_price`, `p' b'ackages`.`image`, `packages`.`video_id`, `packages`.`video_thumbnail`, `pack' b'ages`.`video_name`, `packages`.`video_preview_url`, `packages`.`created_by_i' b'd`, `packages`.`available_from`, `packages`.`available_to`, `packages`.`is_a' b'ctive`, `packages`.`deleted`, `packages`.`created`, `packages`.`modified`, `' b'packages`.`shortdescription`, `packages`.`free_trial`, `packages`.`is_open`,' b' `packages`.`same_checkbox`, `packages`.`question_total`, `packages`.`questi' b'on_easy`, `packages`.`question_medium`, `packages`.`question_hard`, `package' b's`.`video_platform_id`, `packages`.`approximate_platform_duration`, `package' b's`.`show_on_home`, `packages`.`batch_time`, `packages`.`is_installment_avail' b'able`, `packages`.`advance_price`, `packages`.`installment_price`, `packages' b'`.`installment_count`, `packages`.`points`, `packages`.`subject_timing_detai' b'ls`, `packages`.`batch_location`, `packages`.`course_structure`, `packages`.' b'`is_structure_edited`, `packages`.`live_platform_link` FROM `packages` LEFT ' b'OUTER JOIN `users` ON (`packages`.`created_by_id` = `users`.`id`) WHERE (`pa' b'ckages`.`course_id` = 16 AND `packages`.`deleted` = 0 AND `packages`.`is_act' b'ive` = 1 AND `packages`.`show_on_home` = 1 AND NOT (`users`.`is_institute_bl' b'ocked` = True AND `users`.`is_institute_blocked` IS NOT NULL) AND `packages`' b'.`batch_type_id` = 2 AND `packages`.`available_to` > CURRENT_DATE) GROUP BY ' b'created_by_id ORDER BY points DESC') |
self | <MySQLdb.cursors.Cursor object at 0x7f8cfc41bbd0> |
/usr/local/lib/python3.7/site-packages/MySQLdb/cursors.py
in _query
for i in range(len(args))]))
self._query(q)
return args
def _query(self, q):
db = self._get_db()
self._result = None
db.query(q)...
self._do_get_result(db)
self._post_get_result()
self._executed = q
self._last_executed = q # XXX THIS IS GARBAGE: See above.
return self.rowcount
Variable | Value |
---|---|
db | <_mysql.connection open to 'localhost' at 0x7f8ce40ec850> |
q | (b'SELECT `packages`.`id`, `packages`.`course_id`, `packages`.`batch_type_id`, ' b'`packages`.`package_name`, `packages`.`slug`, `packages`.`description`, `pac' b'kages`.`title`, `packages`.`url`, `packages`.`meta_keywords`, `packages`.`me' b'ta_description`, `packages`.`admin_price`, `packages`.`calculated_price`, `p' b'ackages`.`image`, `packages`.`video_id`, `packages`.`video_thumbnail`, `pack' b'ages`.`video_name`, `packages`.`video_preview_url`, `packages`.`created_by_i' b'd`, `packages`.`available_from`, `packages`.`available_to`, `packages`.`is_a' b'ctive`, `packages`.`deleted`, `packages`.`created`, `packages`.`modified`, `' b'packages`.`shortdescription`, `packages`.`free_trial`, `packages`.`is_open`,' b' `packages`.`same_checkbox`, `packages`.`question_total`, `packages`.`questi' b'on_easy`, `packages`.`question_medium`, `packages`.`question_hard`, `package' b's`.`video_platform_id`, `packages`.`approximate_platform_duration`, `package' b's`.`show_on_home`, `packages`.`batch_time`, `packages`.`is_installment_avail' b'able`, `packages`.`advance_price`, `packages`.`installment_price`, `packages' b'`.`installment_count`, `packages`.`points`, `packages`.`subject_timing_detai' b'ls`, `packages`.`batch_location`, `packages`.`course_structure`, `packages`.' b'`is_structure_edited`, `packages`.`live_platform_link` FROM `packages` LEFT ' b'OUTER JOIN `users` ON (`packages`.`created_by_id` = `users`.`id`) WHERE (`pa' b'ckages`.`course_id` = 16 AND `packages`.`deleted` = 0 AND `packages`.`is_act' b'ive` = 1 AND `packages`.`show_on_home` = 1 AND NOT (`users`.`is_institute_bl' b'ocked` = True AND `users`.`is_institute_blocked` IS NOT NULL) AND `packages`' b'.`batch_type_id` = 2 AND `packages`.`available_to` > CURRENT_DATE) GROUP BY ' b'created_by_id ORDER BY points DESC') |
self | <MySQLdb.cursors.Cursor object at 0x7f8cfc41bbd0> |
/usr/local/lib/python3.7/site-packages/MySQLdb/connections.py
in query
"""
return (cursorclass or self.cursorclass)(self)
def query(self, query):
# Since _mysql releases GIL while querying, we need immutable buffer.
if isinstance(query, bytearray):
query = bytes(query)
_mysql.connection.query(self, query)...
def _bytes_literal(self, bs):
assert isinstance(bs, (bytes, bytearray))
x = self.string_literal(bs) # x is escaped and quoted bytes
if self._binary_prefix:
return b'_binary' + x
Variable | Value |
---|---|
query | (b'SELECT `packages`.`id`, `packages`.`course_id`, `packages`.`batch_type_id`, ' b'`packages`.`package_name`, `packages`.`slug`, `packages`.`description`, `pac' b'kages`.`title`, `packages`.`url`, `packages`.`meta_keywords`, `packages`.`me' b'ta_description`, `packages`.`admin_price`, `packages`.`calculated_price`, `p' b'ackages`.`image`, `packages`.`video_id`, `packages`.`video_thumbnail`, `pack' b'ages`.`video_name`, `packages`.`video_preview_url`, `packages`.`created_by_i' b'd`, `packages`.`available_from`, `packages`.`available_to`, `packages`.`is_a' b'ctive`, `packages`.`deleted`, `packages`.`created`, `packages`.`modified`, `' b'packages`.`shortdescription`, `packages`.`free_trial`, `packages`.`is_open`,' b' `packages`.`same_checkbox`, `packages`.`question_total`, `packages`.`questi' b'on_easy`, `packages`.`question_medium`, `packages`.`question_hard`, `package' b's`.`video_platform_id`, `packages`.`approximate_platform_duration`, `package' b's`.`show_on_home`, `packages`.`batch_time`, `packages`.`is_installment_avail' b'able`, `packages`.`advance_price`, `packages`.`installment_price`, `packages' b'`.`installment_count`, `packages`.`points`, `packages`.`subject_timing_detai' b'ls`, `packages`.`batch_location`, `packages`.`course_structure`, `packages`.' b'`is_structure_edited`, `packages`.`live_platform_link` FROM `packages` LEFT ' b'OUTER JOIN `users` ON (`packages`.`created_by_id` = `users`.`id`) WHERE (`pa' b'ckages`.`course_id` = 16 AND `packages`.`deleted` = 0 AND `packages`.`is_act' b'ive` = 1 AND `packages`.`show_on_home` = 1 AND NOT (`users`.`is_institute_bl' b'ocked` = True AND `users`.`is_institute_blocked` IS NOT NULL) AND `packages`' b'.`batch_type_id` = 2 AND `packages`.`available_to` > CURRENT_DATE) GROUP BY ' b'created_by_id ORDER BY points DESC') |
self | <_mysql.connection open to 'localhost' at 0x7f8ce40ec850> |
/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py
in inner
This decorator is automatically applied to all middleware to ensure that
no middleware leaks an exception and that the next middleware in the stack
can rely on getting a response instead of an exception.
"""
@wraps(get_response)
def inner(request):
try:
response = get_response(request)...
except Exception as exc:
response = response_for_exception(request, exc)
return response
return inner
Variable | Value |
---|---|
exc | OperationalError(1055, "Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'edumple_python.packages.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by") |
get_response | <bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7f8cfcc3f810>> |
request | <WSGIRequest: GET '/courses/class-2/batches/self-study'> |
/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py
in _get_response
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)
except Exception as e:
response = self.process_exception_by_middleware(e, request)...
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
view_name = callback.__name__
else: # CBV
Variable | Value |
---|---|
callback | <function courseBatches at 0x7f8d12e32f80> |
callback_args | () |
callback_kwargs | {'batch_type_slug': 'self-study', 'course_slug': 'class-2'} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7f8cfcb89d10>> |
request | <WSGIRequest: GET '/courses/class-2/batches/self-study'> |
resolver | <URLResolver 'edumple.urls' (None:None) '^/'> |
resolver_match | ResolverMatch(func=common.views.courseBatches, args=(), kwargs={'course_slug': 'class-2', 'batch_type_slug': 'self-study'}, url_name=courseBatches, app_names=[], namespaces=[]) |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f8cfcc3f810> |
wrapped_callback | <function courseBatches at 0x7f8d12e32f80> |
/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py
in _get_response
response = middleware_method(request, callback, callback_args, callback_kwargs)
if response:
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)...
except Exception as e:
response = self.process_exception_by_middleware(e, request)
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
Variable | Value |
---|---|
callback | <function courseBatches at 0x7f8d12e32f80> |
callback_args | () |
callback_kwargs | {'batch_type_slug': 'self-study', 'course_slug': 'class-2'} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7f8cfcb89d10>> |
request | <WSGIRequest: GET '/courses/class-2/batches/self-study'> |
resolver | <URLResolver 'edumple.urls' (None:None) '^/'> |
resolver_match | ResolverMatch(func=common.views.courseBatches, args=(), kwargs={'course_slug': 'class-2', 'batch_type_slug': 'self-study'}, url_name=courseBatches, app_names=[], namespaces=[]) |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f8cfcc3f810> |
wrapped_callback | <function courseBatches at 0x7f8d12e32f80> |
/opt/edumple/prod.edumple/edumple/common/views.py
in courseBatches
batches = batches.filter(batch_type_id=batch_type.id)
sql = batches.query
sql = """{sql}) GROUP BY created_by_id ORDER BY points DESC""".format(sql=sql)
sql = sql.replace('LIKE %', 'LIKE "%').replace('% AND', '%" AND').split(')')
sql[-3] += ' AND `packages`.`available_to` > CURRENT_DATE'
del (sql[-2])
sql = ")".join(sql)
batchesByPoint = fetch_data(connection, sql, True)...
for bbp in batchesByPoint:
bbp['description'] = bbp['description'].replace('"', "'")
batchIdsByPoint = [bbp['id'] for bbp in batchesByPoint]
packages = []
for b in batches:
if b.batch_type.id != 3:
Variable | Value |
---|---|
batchTypes | <QuerySet [<BatchTypes: BatchTypes object (1)>, <BatchTypes: BatchTypes object (2)>, <BatchTypes: BatchTypes object (3)>, <BatchTypes: BatchTypes object (4)>]> |
batch_type | <BatchTypes: BatchTypes object (2)> |
batch_type_slug | 'self-study' |
batches | <QuerySet []> |
context | {'batch_type': <BatchTypes: BatchTypes object (2)>, 'courseBatchType': None} |
course | <Courses: Courses object (16)> |
courseBatchType | None |
course_slug | 'class-2' |
new_path | None |
request | <WSGIRequest: GET '/courses/class-2/batches/self-study'> |
settings | <Settings: Settings object (1)> |
sql | ('SELECT `packages`.`id`, `packages`.`course_id`, `packages`.`batch_type_id`, ' '`packages`.`package_name`, `packages`.`slug`, `packages`.`description`, ' '`packages`.`title`, `packages`.`url`, `packages`.`meta_keywords`, ' '`packages`.`meta_description`, `packages`.`admin_price`, ' '`packages`.`calculated_price`, `packages`.`image`, `packages`.`video_id`, ' '`packages`.`video_thumbnail`, `packages`.`video_name`, ' '`packages`.`video_preview_url`, `packages`.`created_by_id`, ' '`packages`.`available_from`, `packages`.`available_to`, ' '`packages`.`is_active`, `packages`.`deleted`, `packages`.`created`, ' '`packages`.`modified`, `packages`.`shortdescription`, ' '`packages`.`free_trial`, `packages`.`is_open`, `packages`.`same_checkbox`, ' '`packages`.`question_total`, `packages`.`question_easy`, ' '`packages`.`question_medium`, `packages`.`question_hard`, ' '`packages`.`video_platform_id`, `packages`.`approximate_platform_duration`, ' '`packages`.`show_on_home`, `packages`.`batch_time`, ' '`packages`.`is_installment_available`, `packages`.`advance_price`, ' '`packages`.`installment_price`, `packages`.`installment_count`, ' '`packages`.`points`, `packages`.`subject_timing_details`, ' '`packages`.`batch_location`, `packages`.`course_structure`, ' '`packages`.`is_structure_edited`, `packages`.`live_platform_link` FROM ' '`packages` LEFT OUTER JOIN `users` ON (`packages`.`created_by_id` = ' '`users`.`id`) WHERE (`packages`.`course_id` = 16 AND `packages`.`deleted` = ' '0 AND `packages`.`is_active` = 1 AND `packages`.`show_on_home` = 1 AND NOT ' '(`users`.`is_institute_blocked` = True AND `users`.`is_institute_blocked` IS ' 'NOT NULL) AND `packages`.`batch_type_id` = 2 AND `packages`.`available_to` > ' 'CURRENT_DATE) GROUP BY created_by_id ORDER BY points DESC') |
today | datetime.datetime(2024, 3, 29, 17, 1, 55, 194325) |
/opt/edumple/prod.edumple/edumple/common/views.py
in fetch_data
}
return render(request, 'authn/student-account.html', context)
### Get raw sql data in array format by this function ###
def fetch_data(conn, query, __list=False, preserve_index=True):
cursor = conn.cursor()
cursor.execute(query)...
raw = cursor.fetchall()
if (__list):
result = []
else:
result = {}
Variable | Value |
---|---|
__list | True |
conn | <django.db.DefaultConnectionProxy object at 0x7f8d2dea23d0> |
cursor | <django.db.backends.utils.CursorDebugWrapper object at 0x7f8cfae38910> |
preserve_index | True |
query | ('SELECT `packages`.`id`, `packages`.`course_id`, `packages`.`batch_type_id`, ' '`packages`.`package_name`, `packages`.`slug`, `packages`.`description`, ' '`packages`.`title`, `packages`.`url`, `packages`.`meta_keywords`, ' '`packages`.`meta_description`, `packages`.`admin_price`, ' '`packages`.`calculated_price`, `packages`.`image`, `packages`.`video_id`, ' '`packages`.`video_thumbnail`, `packages`.`video_name`, ' '`packages`.`video_preview_url`, `packages`.`created_by_id`, ' '`packages`.`available_from`, `packages`.`available_to`, ' '`packages`.`is_active`, `packages`.`deleted`, `packages`.`created`, ' '`packages`.`modified`, `packages`.`shortdescription`, ' '`packages`.`free_trial`, `packages`.`is_open`, `packages`.`same_checkbox`, ' '`packages`.`question_total`, `packages`.`question_easy`, ' '`packages`.`question_medium`, `packages`.`question_hard`, ' '`packages`.`video_platform_id`, `packages`.`approximate_platform_duration`, ' '`packages`.`show_on_home`, `packages`.`batch_time`, ' '`packages`.`is_installment_available`, `packages`.`advance_price`, ' '`packages`.`installment_price`, `packages`.`installment_count`, ' '`packages`.`points`, `packages`.`subject_timing_details`, ' '`packages`.`batch_location`, `packages`.`course_structure`, ' '`packages`.`is_structure_edited`, `packages`.`live_platform_link` FROM ' '`packages` LEFT OUTER JOIN `users` ON (`packages`.`created_by_id` = ' '`users`.`id`) WHERE (`packages`.`course_id` = 16 AND `packages`.`deleted` = ' '0 AND `packages`.`is_active` = 1 AND `packages`.`show_on_home` = 1 AND NOT ' '(`users`.`is_institute_blocked` = True AND `users`.`is_institute_blocked` IS ' 'NOT NULL) AND `packages`.`batch_type_id` = 2 AND `packages`.`available_to` > ' 'CURRENT_DATE) GROUP BY created_by_id ORDER BY points DESC') |
/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py
in execute
class CursorDebugWrapper(CursorWrapper):
# XXX callproc isn't instrumented at this time.
def execute(self, sql, params=None):
start = time()
try:
return super().execute(sql, params)...
finally:
stop = time()
duration = stop - start
sql = self.db.ops.last_executed_query(self.cursor, sql, params)
self.db.queries_log.append({
'sql': sql,
Variable | Value |
---|---|
__class__ | <class 'django.db.backends.utils.CursorDebugWrapper'> |
duration | 0.00043487548828125 |
params | None |
self | <django.db.backends.utils.CursorDebugWrapper object at 0x7f8cfae38910> |
sql | 'None' |
start | 1711711915.221951 |
stop | 1711711915.222386 |
/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py
in execute
elif kparams is None:
return self.cursor.callproc(procname, params)
else:
params = params or ()
return self.cursor.callproc(procname, params, kparams)
def execute(self, sql, params=None):
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)...
def executemany(self, sql, param_list):
return self._execute_with_wrappers(sql, param_list, many=True, executor=self._executemany)
def _execute_with_wrappers(self, sql, params, many, executor):
context = {'connection': self.db, 'cursor': self}
Variable | Value |
---|---|
params | None |
self | <django.db.backends.utils.CursorDebugWrapper object at 0x7f8cfae38910> |
sql | ('SELECT `packages`.`id`, `packages`.`course_id`, `packages`.`batch_type_id`, ' '`packages`.`package_name`, `packages`.`slug`, `packages`.`description`, ' '`packages`.`title`, `packages`.`url`, `packages`.`meta_keywords`, ' '`packages`.`meta_description`, `packages`.`admin_price`, ' '`packages`.`calculated_price`, `packages`.`image`, `packages`.`video_id`, ' '`packages`.`video_thumbnail`, `packages`.`video_name`, ' '`packages`.`video_preview_url`, `packages`.`created_by_id`, ' '`packages`.`available_from`, `packages`.`available_to`, ' '`packages`.`is_active`, `packages`.`deleted`, `packages`.`created`, ' '`packages`.`modified`, `packages`.`shortdescription`, ' '`packages`.`free_trial`, `packages`.`is_open`, `packages`.`same_checkbox`, ' '`packages`.`question_total`, `packages`.`question_easy`, ' '`packages`.`question_medium`, `packages`.`question_hard`, ' '`packages`.`video_platform_id`, `packages`.`approximate_platform_duration`, ' '`packages`.`show_on_home`, `packages`.`batch_time`, ' '`packages`.`is_installment_available`, `packages`.`advance_price`, ' '`packages`.`installment_price`, `packages`.`installment_count`, ' '`packages`.`points`, `packages`.`subject_timing_details`, ' '`packages`.`batch_location`, `packages`.`course_structure`, ' '`packages`.`is_structure_edited`, `packages`.`live_platform_link` FROM ' '`packages` LEFT OUTER JOIN `users` ON (`packages`.`created_by_id` = ' '`users`.`id`) WHERE (`packages`.`course_id` = 16 AND `packages`.`deleted` = ' '0 AND `packages`.`is_active` = 1 AND `packages`.`show_on_home` = 1 AND NOT ' '(`users`.`is_institute_blocked` = True AND `users`.`is_institute_blocked` IS ' 'NOT NULL) AND `packages`.`batch_type_id` = 2 AND `packages`.`available_to` > ' 'CURRENT_DATE) GROUP BY created_by_id ORDER BY points DESC') |
/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py
in _execute_with_wrappers
def executemany(self, sql, param_list):
return self._execute_with_wrappers(sql, param_list, many=True, executor=self._executemany)
def _execute_with_wrappers(self, sql, params, many, executor):
context = {'connection': self.db, 'cursor': self}
for wrapper in reversed(self.db.execute_wrappers):
executor = functools.partial(wrapper, executor)
return executor(sql, params, many, context)...
def _execute(self, sql, params, *ignored_wrapper_args):
self.db.validate_no_broken_transaction()
with self.db.wrap_database_errors:
if params is None:
return self.cursor.execute(sql)
Variable | Value |
---|---|
context | {'connection': <django.db.backends.mysql.base.DatabaseWrapper object at 0x7f8cfc046cd0>, 'cursor': <django.db.backends.utils.CursorDebugWrapper object at 0x7f8cfae38910>} |
executor | <bound method CursorWrapper._execute of <django.db.backends.utils.CursorDebugWrapper object at 0x7f8cfae38910>> |
many | False |
params | None |
self | <django.db.backends.utils.CursorDebugWrapper object at 0x7f8cfae38910> |
sql | ('SELECT `packages`.`id`, `packages`.`course_id`, `packages`.`batch_type_id`, ' '`packages`.`package_name`, `packages`.`slug`, `packages`.`description`, ' '`packages`.`title`, `packages`.`url`, `packages`.`meta_keywords`, ' '`packages`.`meta_description`, `packages`.`admin_price`, ' '`packages`.`calculated_price`, `packages`.`image`, `packages`.`video_id`, ' '`packages`.`video_thumbnail`, `packages`.`video_name`, ' '`packages`.`video_preview_url`, `packages`.`created_by_id`, ' '`packages`.`available_from`, `packages`.`available_to`, ' '`packages`.`is_active`, `packages`.`deleted`, `packages`.`created`, ' '`packages`.`modified`, `packages`.`shortdescription`, ' '`packages`.`free_trial`, `packages`.`is_open`, `packages`.`same_checkbox`, ' '`packages`.`question_total`, `packages`.`question_easy`, ' '`packages`.`question_medium`, `packages`.`question_hard`, ' '`packages`.`video_platform_id`, `packages`.`approximate_platform_duration`, ' '`packages`.`show_on_home`, `packages`.`batch_time`, ' '`packages`.`is_installment_available`, `packages`.`advance_price`, ' '`packages`.`installment_price`, `packages`.`installment_count`, ' '`packages`.`points`, `packages`.`subject_timing_details`, ' '`packages`.`batch_location`, `packages`.`course_structure`, ' '`packages`.`is_structure_edited`, `packages`.`live_platform_link` FROM ' '`packages` LEFT OUTER JOIN `users` ON (`packages`.`created_by_id` = ' '`users`.`id`) WHERE (`packages`.`course_id` = 16 AND `packages`.`deleted` = ' '0 AND `packages`.`is_active` = 1 AND `packages`.`show_on_home` = 1 AND NOT ' '(`users`.`is_institute_blocked` = True AND `users`.`is_institute_blocked` IS ' 'NOT NULL) AND `packages`.`batch_type_id` = 2 AND `packages`.`available_to` > ' 'CURRENT_DATE) GROUP BY created_by_id ORDER BY points DESC') |
/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py
in _execute
def _execute(self, sql, params, *ignored_wrapper_args):
self.db.validate_no_broken_transaction()
with self.db.wrap_database_errors:
if params is None:
return self.cursor.execute(sql)
else:
return self.cursor.execute(sql, params)...
def _executemany(self, sql, param_list, *ignored_wrapper_args):
self.db.validate_no_broken_transaction()
with self.db.wrap_database_errors:
return self.cursor.executemany(sql, param_list)
Variable | Value |
---|---|
ignored_wrapper_args | (False, {'connection': <django.db.backends.mysql.base.DatabaseWrapper object at 0x7f8cfc046cd0>, 'cursor': <django.db.backends.utils.CursorDebugWrapper object at 0x7f8cfae38910>}) |
params | None |
self | <django.db.backends.utils.CursorDebugWrapper object at 0x7f8cfae38910> |
sql | ('SELECT `packages`.`id`, `packages`.`course_id`, `packages`.`batch_type_id`, ' '`packages`.`package_name`, `packages`.`slug`, `packages`.`description`, ' '`packages`.`title`, `packages`.`url`, `packages`.`meta_keywords`, ' '`packages`.`meta_description`, `packages`.`admin_price`, ' '`packages`.`calculated_price`, `packages`.`image`, `packages`.`video_id`, ' '`packages`.`video_thumbnail`, `packages`.`video_name`, ' '`packages`.`video_preview_url`, `packages`.`created_by_id`, ' '`packages`.`available_from`, `packages`.`available_to`, ' '`packages`.`is_active`, `packages`.`deleted`, `packages`.`created`, ' '`packages`.`modified`, `packages`.`shortdescription`, ' '`packages`.`free_trial`, `packages`.`is_open`, `packages`.`same_checkbox`, ' '`packages`.`question_total`, `packages`.`question_easy`, ' '`packages`.`question_medium`, `packages`.`question_hard`, ' '`packages`.`video_platform_id`, `packages`.`approximate_platform_duration`, ' '`packages`.`show_on_home`, `packages`.`batch_time`, ' '`packages`.`is_installment_available`, `packages`.`advance_price`, ' '`packages`.`installment_price`, `packages`.`installment_count`, ' '`packages`.`points`, `packages`.`subject_timing_details`, ' '`packages`.`batch_location`, `packages`.`course_structure`, ' '`packages`.`is_structure_edited`, `packages`.`live_platform_link` FROM ' '`packages` LEFT OUTER JOIN `users` ON (`packages`.`created_by_id` = ' '`users`.`id`) WHERE (`packages`.`course_id` = 16 AND `packages`.`deleted` = ' '0 AND `packages`.`is_active` = 1 AND `packages`.`show_on_home` = 1 AND NOT ' '(`users`.`is_institute_blocked` = True AND `users`.`is_institute_blocked` IS ' 'NOT NULL) AND `packages`.`batch_type_id` = 2 AND `packages`.`available_to` > ' 'CURRENT_DATE) GROUP BY created_by_id ORDER BY points DESC') |
/usr/local/lib/python3.7/site-packages/django/db/utils.py
in __exit__
db_exc_type = getattr(self.wrapper.Database, dj_exc_type.__name__)
if issubclass(exc_type, db_exc_type):
dj_exc_value = dj_exc_type(*exc_value.args)
# Only set the 'errors_occurred' flag for errors that may make
# the connection unusable.
if dj_exc_type not in (DataError, IntegrityError):
self.wrapper.errors_occurred = True
raise dj_exc_value.with_traceback(traceback) from exc_value...
def __call__(self, func):
# Note that we are intentionally not using @wraps here for performance
# reasons. Refs #21109.
def inner(*args, **kwargs):
with self:
Variable | Value |
---|---|
db_exc_type | <class 'MySQLdb._exceptions.OperationalError'> |
dj_exc_type | <class 'django.db.utils.OperationalError'> |
dj_exc_value | OperationalError(1055, "Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'edumple_python.packages.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by") |
exc_type | <class 'MySQLdb._exceptions.OperationalError'> |
exc_value | OperationalError(1055, "Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'edumple_python.packages.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by") |
self | <django.db.utils.DatabaseErrorWrapper object at 0x7f8cfca09d10> |
traceback | <traceback object at 0x7f8cf9954aa0> |
/usr/local/lib/python3.7/site-packages/django/db/backends/utils.py
in _execute
executor = functools.partial(wrapper, executor)
return executor(sql, params, many, context)
def _execute(self, sql, params, *ignored_wrapper_args):
self.db.validate_no_broken_transaction()
with self.db.wrap_database_errors:
if params is None:
return self.cursor.execute(sql)...
else:
return self.cursor.execute(sql, params)
def _executemany(self, sql, param_list, *ignored_wrapper_args):
self.db.validate_no_broken_transaction()
with self.db.wrap_database_errors:
Variable | Value |
---|---|
ignored_wrapper_args | (False, {'connection': <django.db.backends.mysql.base.DatabaseWrapper object at 0x7f8cfc046cd0>, 'cursor': <django.db.backends.utils.CursorDebugWrapper object at 0x7f8cfae38910>}) |
params | None |
self | <django.db.backends.utils.CursorDebugWrapper object at 0x7f8cfae38910> |
sql | ('SELECT `packages`.`id`, `packages`.`course_id`, `packages`.`batch_type_id`, ' '`packages`.`package_name`, `packages`.`slug`, `packages`.`description`, ' '`packages`.`title`, `packages`.`url`, `packages`.`meta_keywords`, ' '`packages`.`meta_description`, `packages`.`admin_price`, ' '`packages`.`calculated_price`, `packages`.`image`, `packages`.`video_id`, ' '`packages`.`video_thumbnail`, `packages`.`video_name`, ' '`packages`.`video_preview_url`, `packages`.`created_by_id`, ' '`packages`.`available_from`, `packages`.`available_to`, ' '`packages`.`is_active`, `packages`.`deleted`, `packages`.`created`, ' '`packages`.`modified`, `packages`.`shortdescription`, ' '`packages`.`free_trial`, `packages`.`is_open`, `packages`.`same_checkbox`, ' '`packages`.`question_total`, `packages`.`question_easy`, ' '`packages`.`question_medium`, `packages`.`question_hard`, ' '`packages`.`video_platform_id`, `packages`.`approximate_platform_duration`, ' '`packages`.`show_on_home`, `packages`.`batch_time`, ' '`packages`.`is_installment_available`, `packages`.`advance_price`, ' '`packages`.`installment_price`, `packages`.`installment_count`, ' '`packages`.`points`, `packages`.`subject_timing_details`, ' '`packages`.`batch_location`, `packages`.`course_structure`, ' '`packages`.`is_structure_edited`, `packages`.`live_platform_link` FROM ' '`packages` LEFT OUTER JOIN `users` ON (`packages`.`created_by_id` = ' '`users`.`id`) WHERE (`packages`.`course_id` = 16 AND `packages`.`deleted` = ' '0 AND `packages`.`is_active` = 1 AND `packages`.`show_on_home` = 1 AND NOT ' '(`users`.`is_institute_blocked` = True AND `users`.`is_institute_blocked` IS ' 'NOT NULL) AND `packages`.`batch_type_id` = 2 AND `packages`.`available_to` > ' 'CURRENT_DATE) GROUP BY created_by_id ORDER BY points DESC') |
/usr/local/lib/python3.7/site-packages/django/db/backends/mysql/base.py
in execute
def __init__(self, cursor):
self.cursor = cursor
def execute(self, query, args=None):
try:
# args is None means no string interpolation
return self.cursor.execute(query, args)...
except Database.OperationalError as e:
# Map some error codes to IntegrityError, since they seem to be
# misclassified and Django would prefer the more logical place.
if e.args[0] in self.codes_for_integrityerror:
raise utils.IntegrityError(*tuple(e.args))
raise
Variable | Value |
---|---|
args | None |
query | ('SELECT `packages`.`id`, `packages`.`course_id`, `packages`.`batch_type_id`, ' '`packages`.`package_name`, `packages`.`slug`, `packages`.`description`, ' '`packages`.`title`, `packages`.`url`, `packages`.`meta_keywords`, ' '`packages`.`meta_description`, `packages`.`admin_price`, ' '`packages`.`calculated_price`, `packages`.`image`, `packages`.`video_id`, ' '`packages`.`video_thumbnail`, `packages`.`video_name`, ' '`packages`.`video_preview_url`, `packages`.`created_by_id`, ' '`packages`.`available_from`, `packages`.`available_to`, ' '`packages`.`is_active`, `packages`.`deleted`, `packages`.`created`, ' '`packages`.`modified`, `packages`.`shortdescription`, ' '`packages`.`free_trial`, `packages`.`is_open`, `packages`.`same_checkbox`, ' '`packages`.`question_total`, `packages`.`question_easy`, ' '`packages`.`question_medium`, `packages`.`question_hard`, ' '`packages`.`video_platform_id`, `packages`.`approximate_platform_duration`, ' '`packages`.`show_on_home`, `packages`.`batch_time`, ' '`packages`.`is_installment_available`, `packages`.`advance_price`, ' '`packages`.`installment_price`, `packages`.`installment_count`, ' '`packages`.`points`, `packages`.`subject_timing_details`, ' '`packages`.`batch_location`, `packages`.`course_structure`, ' '`packages`.`is_structure_edited`, `packages`.`live_platform_link` FROM ' '`packages` LEFT OUTER JOIN `users` ON (`packages`.`created_by_id` = ' '`users`.`id`) WHERE (`packages`.`course_id` = 16 AND `packages`.`deleted` = ' '0 AND `packages`.`is_active` = 1 AND `packages`.`show_on_home` = 1 AND NOT ' '(`users`.`is_institute_blocked` = True AND `users`.`is_institute_blocked` IS ' 'NOT NULL) AND `packages`.`batch_type_id` = 2 AND `packages`.`available_to` > ' 'CURRENT_DATE) GROUP BY created_by_id ORDER BY points DESC') |
self | <django.db.backends.mysql.base.CursorWrapper object at 0x7f8cfbfb10d0> |
/usr/local/lib/python3.7/site-packages/MySQLdb/cursors.py
in execute
args = tuple(map(db.literal, args))
try:
query = query % args
except TypeError as m:
raise ProgrammingError(str(m))
assert isinstance(query, (bytes, bytearray))
res = self._query(query)...
return res
def executemany(self, query, args):
# type: (str, list) -> int
"""Execute a multi-row query.
Variable | Value |
---|---|
args | None |
db | <_mysql.connection open to 'localhost' at 0x7f8ce40ec850> |
query | (b'SELECT `packages`.`id`, `packages`.`course_id`, `packages`.`batch_type_id`, ' b'`packages`.`package_name`, `packages`.`slug`, `packages`.`description`, `pac' b'kages`.`title`, `packages`.`url`, `packages`.`meta_keywords`, `packages`.`me' b'ta_description`, `packages`.`admin_price`, `packages`.`calculated_price`, `p' b'ackages`.`image`, `packages`.`video_id`, `packages`.`video_thumbnail`, `pack' b'ages`.`video_name`, `packages`.`video_preview_url`, `packages`.`created_by_i' b'd`, `packages`.`available_from`, `packages`.`available_to`, `packages`.`is_a' b'ctive`, `packages`.`deleted`, `packages`.`created`, `packages`.`modified`, `' b'packages`.`shortdescription`, `packages`.`free_trial`, `packages`.`is_open`,' b' `packages`.`same_checkbox`, `packages`.`question_total`, `packages`.`questi' b'on_easy`, `packages`.`question_medium`, `packages`.`question_hard`, `package' b's`.`video_platform_id`, `packages`.`approximate_platform_duration`, `package' b's`.`show_on_home`, `packages`.`batch_time`, `packages`.`is_installment_avail' b'able`, `packages`.`advance_price`, `packages`.`installment_price`, `packages' b'`.`installment_count`, `packages`.`points`, `packages`.`subject_timing_detai' b'ls`, `packages`.`batch_location`, `packages`.`course_structure`, `packages`.' b'`is_structure_edited`, `packages`.`live_platform_link` FROM `packages` LEFT ' b'OUTER JOIN `users` ON (`packages`.`created_by_id` = `users`.`id`) WHERE (`pa' b'ckages`.`course_id` = 16 AND `packages`.`deleted` = 0 AND `packages`.`is_act' b'ive` = 1 AND `packages`.`show_on_home` = 1 AND NOT (`users`.`is_institute_bl' b'ocked` = True AND `users`.`is_institute_blocked` IS NOT NULL) AND `packages`' b'.`batch_type_id` = 2 AND `packages`.`available_to` > CURRENT_DATE) GROUP BY ' b'created_by_id ORDER BY points DESC') |
self | <MySQLdb.cursors.Cursor object at 0x7f8cfc41bbd0> |
/usr/local/lib/python3.7/site-packages/MySQLdb/cursors.py
in _query
for i in range(len(args))]))
self._query(q)
return args
def _query(self, q):
db = self._get_db()
self._result = None
db.query(q)...
self._do_get_result(db)
self._post_get_result()
self._executed = q
self._last_executed = q # XXX THIS IS GARBAGE: See above.
return self.rowcount
Variable | Value |
---|---|
db | <_mysql.connection open to 'localhost' at 0x7f8ce40ec850> |
q | (b'SELECT `packages`.`id`, `packages`.`course_id`, `packages`.`batch_type_id`, ' b'`packages`.`package_name`, `packages`.`slug`, `packages`.`description`, `pac' b'kages`.`title`, `packages`.`url`, `packages`.`meta_keywords`, `packages`.`me' b'ta_description`, `packages`.`admin_price`, `packages`.`calculated_price`, `p' b'ackages`.`image`, `packages`.`video_id`, `packages`.`video_thumbnail`, `pack' b'ages`.`video_name`, `packages`.`video_preview_url`, `packages`.`created_by_i' b'd`, `packages`.`available_from`, `packages`.`available_to`, `packages`.`is_a' b'ctive`, `packages`.`deleted`, `packages`.`created`, `packages`.`modified`, `' b'packages`.`shortdescription`, `packages`.`free_trial`, `packages`.`is_open`,' b' `packages`.`same_checkbox`, `packages`.`question_total`, `packages`.`questi' b'on_easy`, `packages`.`question_medium`, `packages`.`question_hard`, `package' b's`.`video_platform_id`, `packages`.`approximate_platform_duration`, `package' b's`.`show_on_home`, `packages`.`batch_time`, `packages`.`is_installment_avail' b'able`, `packages`.`advance_price`, `packages`.`installment_price`, `packages' b'`.`installment_count`, `packages`.`points`, `packages`.`subject_timing_detai' b'ls`, `packages`.`batch_location`, `packages`.`course_structure`, `packages`.' b'`is_structure_edited`, `packages`.`live_platform_link` FROM `packages` LEFT ' b'OUTER JOIN `users` ON (`packages`.`created_by_id` = `users`.`id`) WHERE (`pa' b'ckages`.`course_id` = 16 AND `packages`.`deleted` = 0 AND `packages`.`is_act' b'ive` = 1 AND `packages`.`show_on_home` = 1 AND NOT (`users`.`is_institute_bl' b'ocked` = True AND `users`.`is_institute_blocked` IS NOT NULL) AND `packages`' b'.`batch_type_id` = 2 AND `packages`.`available_to` > CURRENT_DATE) GROUP BY ' b'created_by_id ORDER BY points DESC') |
self | <MySQLdb.cursors.Cursor object at 0x7f8cfc41bbd0> |
/usr/local/lib/python3.7/site-packages/MySQLdb/connections.py
in query
"""
return (cursorclass or self.cursorclass)(self)
def query(self, query):
# Since _mysql releases GIL while querying, we need immutable buffer.
if isinstance(query, bytearray):
query = bytes(query)
_mysql.connection.query(self, query)...
def _bytes_literal(self, bs):
assert isinstance(bs, (bytes, bytearray))
x = self.string_literal(bs) # x is escaped and quoted bytes
if self._binary_prefix:
return b'_binary' + x
Variable | Value |
---|---|
query | (b'SELECT `packages`.`id`, `packages`.`course_id`, `packages`.`batch_type_id`, ' b'`packages`.`package_name`, `packages`.`slug`, `packages`.`description`, `pac' b'kages`.`title`, `packages`.`url`, `packages`.`meta_keywords`, `packages`.`me' b'ta_description`, `packages`.`admin_price`, `packages`.`calculated_price`, `p' b'ackages`.`image`, `packages`.`video_id`, `packages`.`video_thumbnail`, `pack' b'ages`.`video_name`, `packages`.`video_preview_url`, `packages`.`created_by_i' b'd`, `packages`.`available_from`, `packages`.`available_to`, `packages`.`is_a' b'ctive`, `packages`.`deleted`, `packages`.`created`, `packages`.`modified`, `' b'packages`.`shortdescription`, `packages`.`free_trial`, `packages`.`is_open`,' b' `packages`.`same_checkbox`, `packages`.`question_total`, `packages`.`questi' b'on_easy`, `packages`.`question_medium`, `packages`.`question_hard`, `package' b's`.`video_platform_id`, `packages`.`approximate_platform_duration`, `package' b's`.`show_on_home`, `packages`.`batch_time`, `packages`.`is_installment_avail' b'able`, `packages`.`advance_price`, `packages`.`installment_price`, `packages' b'`.`installment_count`, `packages`.`points`, `packages`.`subject_timing_detai' b'ls`, `packages`.`batch_location`, `packages`.`course_structure`, `packages`.' b'`is_structure_edited`, `packages`.`live_platform_link` FROM `packages` LEFT ' b'OUTER JOIN `users` ON (`packages`.`created_by_id` = `users`.`id`) WHERE (`pa' b'ckages`.`course_id` = 16 AND `packages`.`deleted` = 0 AND `packages`.`is_act' b'ive` = 1 AND `packages`.`show_on_home` = 1 AND NOT (`users`.`is_institute_bl' b'ocked` = True AND `users`.`is_institute_blocked` IS NOT NULL) AND `packages`' b'.`batch_type_id` = 2 AND `packages`.`available_to` > CURRENT_DATE) GROUP BY ' b'created_by_id ORDER BY points DESC') |
self | <_mysql.connection open to 'localhost' at 0x7f8ce40ec850> |
AnonymousUser
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
CONTENT_LENGTH | '' |
CONTENT_TYPE | 'text/plain' |
DBUS_SESSION_BUS_ADDRESS | 'unix:path=/run/user/0/bus' |
DJANGO_SETTINGS_MODULE | 'edumple.settings' |
GATEWAY_INTERFACE | 'CGI/1.1' |
HOME | '/root' |
HTTP_ACCEPT | '*/*' |
HTTP_ACCEPT_ENCODING | 'gzip, br' |
HTTP_CDN_LOOP | 'cloudflare' |
HTTP_CF_CONNECTING_IP | '3.238.228.237' |
HTTP_CF_IPCOUNTRY | 'US' |
HTTP_CF_RAY | '86bf894c1f918292-IAD' |
HTTP_CF_VISITOR | '{"scheme":"https"}' |
HTTP_CONNECTION | 'close' |
HTTP_HOST | 'www.edumple.com' |
HTTP_USER_AGENT | 'claudebot' |
HTTP_X_FORWARDED_FOR | '172.70.175.110' |
HTTP_X_FORWARDED_PROTO | 'https' |
LC_CTYPE | 'C.UTF-8' |
LESSCLOSE | '/usr/bin/lesspipe %s %s' |
LESSOPEN | '| /usr/bin/lesspipe %s' |
LOGNAME | 'root' |
LS_COLORS | 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:' |
MOTD_SHOWN | 'pam' |
OLDPWD | '/home/edumple' |
PATH | '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin' |
PATH_INFO | '/courses/class-2/batches/self-study' |
PWD | '/opt/edumple/prod.edumple/edumple' |
QUERY_STRING | '' |
REMOTE_ADDR | '127.0.0.1' |
REMOTE_HOST | '' |
REQUEST_METHOD | 'GET' |
RUN_MAIN | 'true' |
SCRIPT_NAME | '' |
SERVER_NAME | '4s7k.c.time4vps.cloud' |
SERVER_PORT | '8000' |
SERVER_PROTOCOL | 'HTTP/1.0' |
SERVER_SOFTWARE | 'WSGIServer/0.2' |
SHELL | '/bin/bash' |
SHLVL | '0' |
SSH_CLIENT | '103.59.75.165 14879 22' |
SSH_CONNECTION | '103.59.75.165 14879 194.135.80.159 22' |
SSH_TTY | '/dev/pts/0' |
TERM | 'xterm-256color' |
TZ | 'Asia/Calcutta' |
USER | 'root' |
XDG_RUNTIME_DIR | '/run/user/0' |
XDG_SESSION_CLASS | 'user' |
XDG_SESSION_ID | '12601361' |
XDG_SESSION_TYPE | 'tty' |
_ | '/usr/bin/nohup' |
wsgi.errors | <_io.TextIOWrapper name='<stderr>' mode='w' encoding='UTF-8'> |
wsgi.file_wrapper | '' |
wsgi.input | <django.core.handlers.wsgi.LimitedStream object at 0x7f8cfb4f7b90> |
wsgi.multiprocess | False |
wsgi.multithread | True |
wsgi.run_once | False |
wsgi.url_scheme | 'http' |
wsgi.version | (1, 0) |
edumple.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | [] |
ALLOWED_HOSTS | ['*'] |
ALLOW_UNICODE_SLUGS | True |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | ['common.backends.AuthBackend'] |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'common.Users' |
BASE_DIR | '/opt/edumple/prod.edumple/edumple' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
CKEDITOR_UPLOAD_PATH | 'uploads/' |
CORS_ALLOW_CREDENTIALS | True |
CORS_ORIGIN_ALLOW_ALL | True |
CRISPY_TEMPLATE_PACK | 'bootstrap4' |
CRONJOBS | [('*/1 * * * *', 'edumple.cron.cronDisplayCount')] |
CSRF_COOKIE_AGE | 31449600 |
CSRF_COOKIE_DOMAIN | None |
CSRF_COOKIE_HTTPONLY | False |
CSRF_COOKIE_NAME | 'csrftoken' |
CSRF_COOKIE_PATH | '/' |
CSRF_COOKIE_SAMESITE | 'Lax' |
CSRF_COOKIE_SECURE | False |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_HEADER_NAME | 'HTTP_X_CSRFTOKEN' |
CSRF_TRUSTED_ORIGINS | [] |
CSRF_USE_SESSIONS | False |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.mysql', 'HOST': 'localhost', 'NAME': 'edumple_python', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '3306', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'root'}} |
DATABASE_ROUTERS | [] |
DATA_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
DATA_UPLOAD_MAX_NUMBER_FIELDS | 1000 |
DATETIME_FORMAT | 'N j, Y, P' |
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'] |
DATE_FORMAT | 'N j, Y' |
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'] |
DEBUG | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
DECIMAL_SEPARATOR | '.' |
DEFAULT_CHARSET | 'utf-8' |
DEFAULT_CONTENT_TYPE | 'text/html' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
DEFAULT_FILE_STORAGE | 'django.core.files.storage.FileSystemStorage' |
DEFAULT_FROM_EMAIL | 'webmaster@localhost' |
DEFAULT_HOST | 'www' |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_TABLESPACE | '' |
DISALLOWED_USER_AGENTS | [] |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_HOST | 'mail.edumple.com' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | 'no-reply@edumple.com' |
EMAIL_PORT | 587 |
EMAIL_SSL_CERTFILE | None |
EMAIL_SSL_KEYFILE | '********************' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
EMAIL_TIMEOUT | None |
EMAIL_USE_LOCALTIME | False |
EMAIL_USE_SSL | False |
EMAIL_USE_TLS | True |
FCM_DJANGO_SETTINGS | {'APP_VERBOSE_NAME': 'FCM Django', 'DELETE_INACTIVE_DEVICES': False, 'ERRORS': {'invalid_package_name': 'InvalidPackageName', 'invalid_registration': 'InvalidRegistration', 'missing_registration': 'MissingRegistration', 'not_registered': 'NotRegistered'}, 'FCM_SERVER': 'https://fcm.googleapis.com/fcm/send', 'FCM_SERVER_KEY': '********************', 'ONE_DEVICE_PER_USER': False, 'USER_MODEL': 'common.Users'} |
FILE_CHARSET | 'utf-8' |
FILE_UPLOAD_DIRECTORY_PERMISSIONS | None |
FILE_UPLOAD_HANDLERS | ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler'] |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
FILE_UPLOAD_PERMISSIONS | None |
FILE_UPLOAD_TEMP_DIR | None |
FIRST_DAY_OF_WEEK | 0 |
FIXTURE_DIRS | [] |
FORCE_SCRIPT_NAME | None |
FORMAT_MODULE_PATH | None |
FORM_RENDERER | 'django.forms.renderers.DjangoTemplates' |
IGNORABLE_404_URLS | [] |
IMPORT_EXPORT_USE_TRANSACTIONS | True |
INSTALLED_APPS | ['django.contrib.auth', 'django.contrib.admin', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'corsheaders', 'cache_headers', 'student', 'teacher', 'publisher', 'licensee', 'superadmin', 'saleTeams', 'crispy_forms', 'common', 'common.templatetags', 'bs4', 'ckeditor', 'ckeditor_uploader', 'import_export', 'django_crontab', 'fcm_django', 'django.contrib.sites', 'django.contrib.sitemaps', 'django.contrib.redirects'] |
INTERNAL_IPS | [] |
LANGUAGES | [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('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'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')] |
LANGUAGES_BIDI | ['he', 'ar', 'fa', 'ur'] |
LANGUAGE_CODE | 'en-us' |
LANGUAGE_COOKIE_AGE | None |
LANGUAGE_COOKIE_DOMAIN | None |
LANGUAGE_COOKIE_NAME | 'django_language' |
LANGUAGE_COOKIE_PATH | '/' |
LOCALE_PATHS | [] |
LOGGING | {} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
LOGIN_URL | 'login/' |
LOGOUT_REDIRECT_URL | None |
MANAGERS | [] |
MEDIA_ROOT | '/opt/edumple/prod.edumple/edumple/media/' |
MEDIA_URL | '/media/' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
MESSAGE_TAGS | {10: 'alert-secondary', 20: 'alert-info', 25: 'alert-success', 30: 'alert-warning', 40: 'alert-danger'} |
MIDDLEWARE | ['corsheaders.middleware.CorsMiddleware', 'cache_headers.middleware.CacheHeadersMiddleware', 'django.middleware.security.SecurityMiddleware', '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', 'django.contrib.redirects.middleware.RedirectFallbackMiddleware'] |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
PREPEND_WWW | False |
ROOT_HOSTCONF | 'edumple.hosts' |
ROOT_URLCONF | 'edumple.urls' |
SECRET_KEY | '********************' |
SECURE_BROWSER_XSS_FILTER | False |
SECURE_CONTENT_TYPE_NOSNIFF | False |
SECURE_HSTS_INCLUDE_SUBDOMAINS | False |
SECURE_HSTS_PRELOAD | False |
SECURE_HSTS_SECONDS | 0 |
SECURE_PROXY_SSL_HEADER | None |
SECURE_REDIRECT_EXEMPT | [] |
SECURE_SSL_HOST | None |
SECURE_SSL_REDIRECT | False |
SERVER_EMAIL | 'root@localhost' |
SESSION_CACHE_ALIAS | 'default' |
SESSION_COOKIE_AGE | 1209600 |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_HTTPONLY | True |
SESSION_COOKIE_NAME | 'sessionid' |
SESSION_COOKIE_PATH | '/' |
SESSION_COOKIE_SAMESITE | 'Lax' |
SESSION_COOKIE_SECURE | False |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
SESSION_FILE_PATH | None |
SESSION_SAVE_EVERY_REQUEST | False |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
SETTINGS_MODULE | 'edumple.settings' |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
SHORT_DATE_FORMAT | 'm/d/Y' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS | ['django_mysql.W002'] |
SITE_ID | 1 |
STATICFILES_DIRS | ['/opt/edumple/prod.edumple/edumple/static'] |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | '/static/' |
STATIC_URL | '/static/' |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/opt/edumple/prod.edumple/edumple/templates'], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages']}}] |
TEMPLATE_CONTEXT_PROCESSORS | ('django.core.context_processors.request',) |
TEST_NON_SERIALIZED_APPS | [] |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
THOUSAND_SEPARATOR | ',' |
TIME_FORMAT | 'P' |
TIME_INPUT_FORMATS | ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] |
TIME_ZONE | 'Asia/Calcutta' |
USE_I18N | True |
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
USE_TZ | True |
USE_X_FORWARDED_HOST | False |
USE_X_FORWARDED_PORT | False |
WSGI_APPLICATION | 'edumple.wsgi.application' |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
YEAR_MONTH_FORMAT | 'F Y' |
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 page generated by the handler for this status code.