home / django_tickets / tickets

tickets: 8195

This data as json

id created changetime last_pulled_from_trac stage status component type severity version resolution summary description owner reporter keywords easy has_patch needs_better_patch needs_tests needs_docs ui_ux
8195 2008-08-09 20:07:51 2008-08-12 17:21:15 2022-03-06 03:41:37.079110 Unreviewed closed Database layer (models, ORM)     dev worksforme Importing models from same directory throws unhelpful exception (trying to get app_label) Before: {{{ In [1]: import models --------------------------------------------------------------------------- <type 'exceptions.IndexError'> Traceback (most recent call last) (strip my stuff) ...django/db/models/base.py in __new__(cls, name, bases, attrs) 54 # For 'django.contrib.sites.models', this would be 'sites'. 55 model_module = sys.modules[new_class.__module__] ---> 56 kwargs = {"app_label": model_module.__name__.split('.')[-2]} 57 else: 58 kwargs = {} }}} After attached patch, the relative import succeeds. nobody kcarnold   0 1 0 0 0 0
Powered by Datasette · Queries took 1.09ms