You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defrender(self, context):
key=self.queryset_var.varvalue=self.queryset_var.resolve(context)
order_by=context['request'].fieldiflen(order_by) >1:
try:
try:
field_name=order_byiforder_by[0] =='-':
field_name=order_by[1:]
# check for order field exist in modelvalue.model._meta.get_field(field_name)
context[key] =value.order_by(order_by)
exceptFieldDoesNotExistase:
ifsettings.DEBUG==True:
raiseeexcepttemplate.TemplateSyntaxError:
ifINVALID_FIELD_RAISES_404:
raiseHttp404('Invalid field sorting. If DEBUG were set to '+'False, an HTTP 404 page would have been shown instead.')
context[key] =valueelse:
context[key] =valuereturn''
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: