Code Monkey home page Code Monkey logo

django-super-inlines's People

Contributors

bertrandbordage avatar end0 avatar poiuytrez avatar smcoll avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-super-inlines's Issues

Multiple third level forms

When adding a second third level form, the forms get confused, eg:

owner:
    house:
        1. room
        2. hallway
  1. The "Add another room" text is the same for both.
  2. Clicking "Add another room" for room does nothing.
  3. Clicking "Add another room" for hallway adds two fieldsets with two forms in each, which is one room and one hall in each fieldset.

I'm using Django 1.8

B.t.w, this is an awesome piece of work you did, it's going to come in very handy.

javascript error when adding inline

Hi,

Thanks for the nice super-inlines package. I am excited to use it. After install and following the instructions, the

$("#{{ formset.prefix }}-group").formset(onAfterAdd, postInit);

line appears to be causing a javascript error.

Uncaught TypeError: $(...).formset is not a function

This could be due to my lack of knowledge of using Javascript – any help you might lend would be greatly appreciated.

Thanks,
george.

Running Python 3.4.3
Django 1.8.2

Template error with Django 1.8.3

Hello,
I've quickly tried super-inlines in Django 1.8.3 and template rendering seems to raise a KeyError :

Environment:


Request Method: GET
Request URL: http://127.0.0.1:8000/admin/test_nested/publications/add/

Django Version: 1.8.3
Python Version: 2.7.10
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'super_inlines',
 'django.contrib.admin',
 'corpus_brochures',
 'test_nested')
Installed Middleware:
('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')


Template error:
In template /home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/super_inlines/templates/admin/edit_inline/stacked.html, error at line 56
   request

   46 :               {{ inline_admin_form.form.non_field_errors }}



   47 :             {% endif %}



   48 :             {% for fieldset in inline_admin_form %}



   49 :               {% include "admin/includes/fieldset.html" %}



   50 :             {% endfor %}



   51 :             {% if inline_admin_form.needs_explicit_pk_field %}



   52 :               {{ inline_admin_form.pk_field.field }}



   53 :             {% endif %}



   54 :             {{ inline_admin_form.fk_field.field }}



   55 : 



   56 :              {% get_sub_inline_formsets inline original forloop.counter0 forloop.last as sub_inlines %} 



   57 :             {% for sub_inline in sub_inlines %}



   58 :               {% include sub_inline.opts.template with inline_admin_formset=sub_inline is_subinline=True %}



   59 :             {% endfor %}



   60 : 



   61 :           </div>



   62 :         {% endwith %}



   63 :       {% endfor %}



   64 :     </div>



   65 : 



   66 :     {% if not is_subinline %}


Traceback:
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  164.                 response = response.render()
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/response.py" in render
  158.             self.content = self.rendered_content
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/response.py" in rendered_content
  135.         content = template.render(context, self._request)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/backends/django.py" in render
  74.         return self.template.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/base.py" in render
  209.                     return self._render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/base.py" in _render
  201.         return self.nodelist.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/base.py" in render
  903.                 bit = self.render_node(node, context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/debug.py" in render_node
  79.             return node.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  135.         return compiled_parent._render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/base.py" in _render
  201.         return self.nodelist.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/base.py" in render
  903.                 bit = self.render_node(node, context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/debug.py" in render_node
  79.             return node.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  135.         return compiled_parent._render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/base.py" in _render
  201.         return self.nodelist.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/base.py" in render
  903.                 bit = self.render_node(node, context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/debug.py" in render_node
  79.             return node.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  65.                 result = block.nodelist.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/base.py" in render
  903.                 bit = self.render_node(node, context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/debug.py" in render_node
  79.             return node.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  65.                 result = block.nodelist.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/base.py" in render
  903.                 bit = self.render_node(node, context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/debug.py" in render_node
  79.             return node.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/defaulttags.py" in render
  217.                             nodelist.append(node.render(context))
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  159.                 return template.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/base.py" in render
  211.                 return self._render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/base.py" in _render
  201.         return self.nodelist.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/base.py" in render
  903.                 bit = self.render_node(node, context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/debug.py" in render_node
  79.             return node.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/defaulttags.py" in render
  576.             return self.nodelist.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/base.py" in render
  903.                 bit = self.render_node(node, context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/debug.py" in render_node
  79.             return node.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/defaulttags.py" in render
  329.                 return nodelist.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/base.py" in render
  903.                 bit = self.render_node(node, context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/debug.py" in render_node
  79.             return node.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/defaulttags.py" in render
  217.                             nodelist.append(node.render(context))
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/defaulttags.py" in render
  576.             return self.nodelist.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/base.py" in render
  903.                 bit = self.render_node(node, context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/debug.py" in render_node
  79.             return node.render(context)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/base.py" in render
  1227.                     context[self.target_var] = func(*resolved_args, **resolved_kwargs)
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/super_inlines/templatetags/super_inlines.py" in get_sub_inline_formsets
  16.     request = context['request']
File "/home/leo/Documents/Logiciels/anaconda/lib/python2.7/site-packages/django/template/context.py" in __getitem__
  71.         raise KeyError(key)

Exception Type: KeyError at /admin/test_nested/publications/add/
Exception Value: u'request'

Merci beaucoup de rendre disponible à la communauté votre travail quoi qu'il en soit.

AttributeError: 'Your2ndLevelInline' object has no attribute 'has_add_permission'

Django Version: 1.9
Exception Type: AttributeError
Exception Value:
'ServiceItemDimension' object has no attribute 'has_add_permission'
Exception Location: C:\Python27\lib\site-packages\super_inlines\admin.py in get_inline_instances, line 18

I am getting this error when i try to add a new object or edit an existing one.

Django 2.0 support

Here is my solution how to make this project support Django 2.0 and newer.
Go to the super_inlines\templatetags\super_inlines.py and replace all from this file by this code:


from __future__ import unicode_literals
from django.template import Library

from ..admin import SuperInlineModelAdmin



register = Library()
register_tag = register.simple_tag

@register_tag(takes_context=True)
def get_sub_inline_formsets(context, inline, original, index, is_template):
    if not isinstance(inline, SuperInlineModelAdmin):
        return ()
    request = context['request']
    formsets, inline_instances = inline._create_formsets(
        request, obj=original, change=original is not None, index=index,
        is_template=is_template)
    return inline.get_inline_formsets(request, formsets, inline_instances,
                                      obj=original)

TypeError when calling _create_formsets() for Django < 1.7.2

Hello,

I noticed that when I visit the admin change view for a model instance with nested inlines under a Django version 1.7.1 or lower, I get the following error:

Environment:

Request Method: GET
Request URL: http://localhost:8000/admin/.../.../1/

Django Version: 1.7.1
Python Version: 2.7.6
Installed Applications:
[u'super_inlines',
 u'django.contrib.admin',
 u'django.contrib.auth',
 u'django.contrib.contenttypes',
 u'django.contrib.staticfiles',
 u'django.contrib.sites',
 u'django.contrib.sessions',
 u'subdomains']

Installed Middleware:
(u'django.contrib.sessions.middleware.SessionMiddleware',
 u'subdomains.middleware.SubdomainURLRoutingMiddleware',
 u'django.middleware.common.CommonMiddleware',
 u'django.middleware.csrf.CsrfViewMiddleware',
 u'django.contrib.auth.middleware.AuthenticationMiddleware',
 u'django.contrib.messages.middleware.MessageMiddleware')

Traceback:
File "/.../virtualenv/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  111.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/.../virtualenv/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in wrapper
  584.                 return self.admin_site.admin_view(view)(*args, **kwargs)
File "/.../virtualenv/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  105.                     response = view_func(request, *args, **kwargs)
File "/.../virtualenv/local/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  52.         response = view_func(request, *args, **kwargs)
File "/.../virtualenv/local/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
  204.             return view(request, *args, **kwargs)
File "/.../virtualenv/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in change_view
  1457.         return self.changeform_view(request, object_id, form_url, extra_context)
File "/.../virtualenv/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
  29.             return bound_func(*args, **kwargs)
File "/.../virtualenv/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  105.                     response = view_func(request, *args, **kwargs)
File "/.../virtualenv/local/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
  25.                 return func.__get__(self, type(self))(*args2, **kwargs2)
File "/.../virtualenv/local/lib/python2.7/site-packages/django/db/transaction.py" in inner
  394.                 return func(*args, **kwargs)
File "/.../virtualenv/local/lib/python2.7/site-packages/django/contrib/admin/options.py" in changeform_view
  1421.                 formsets, inline_instances = self._create_formsets(request, obj)

Exception Type: TypeError at /admin/.../.../1/
Exception Value: _create_formsets() takes exactly 4 arguments (3 given)

The problem disappears if I use Django version 1.7.2 or higher. I have django-super-inlines 0.1.3.

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 385: ordinal not in range(128)

 Downloading django-super-inlines-0.1.4.tar.gz
  Running setup.py (path:/tmp/pip_build_root/django-super-inlines/setup.py) egg_info for package django-super-inlines
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_root/django-super-inlines/setup.py", line 22, in <module>
        long_description=open('README.rst').read(),
      File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 385: ordinal not in range(128)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_root/django-super-inlines/setup.py", line 22, in <module>

    long_description=open('README.rst').read(),

  File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode

    return codecs.ascii_decode(input, self.errors)[0]

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 385: ordinal not in range(128)

Hello!

I see this issue when install package in Docker container. After some investigation I establised that issue appears when system locale looks like:

Step 3 : RUN locale
 ---> Running in cc6ed90a368e
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

, after setting custom locale everything is ok:

RUN sudo locale-gen "en_US.UTF-8"
ENV LC_CTYPE "en_US.UTF-8"
ENV LC_NUMERIC "en_US.UTF-8"
ENV LC_TIME "en_US.UTF-8"
ENV LC_COLLATE "en_US.UTF-8"
ENV LC_MONETARY "en_US.UTF-8"
ENV LC_MESSAGES "en_US.UTF-8"
ENV LC_PAPER "en_US.UTF-8"
ENV LC_NAME "en_US.UTF-8"
ENV LC_ADDRESS "en_US.UTF-8"
ENV LC_TELEPHONE "en_US.UTF-8"
ENV LC_MEASUREMENT "en_US.UTF-8"
ENV LC_IDENTIFICATION "en_US.UTF-8"

This issue is critical for using this library in docker-based production environment.

No update when using nested inline generic foreign keys

Hi Bertrand,

First, super_inlines has been a wonderful addition to my project. Thanks very much for a clean, nice package.

Second, I may have uncovered an issue when trying to inline models referenced with generic foreign keys. Here are test model and admin files that reveal this issue:


models.py:

from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation
from django.db.models.fields import CharField

class ModelA(models.Model):

float_value = models.FloatField()
model_b = models.ForeignKey('ModelB')

class ModelB(models.Model):

name = CharField(max_length=30)
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
content_object = GenericForeignKey('content_type', 'object_id')

class ModelC(models.Model):

name = CharField(max_length=30)
float = GenericRelation(ModelB, related_query_name = 'model_b')
model_d = models.ForeignKey('ModelD', null = True)

class ModelD(models.Model):

pass

admin.py:

from super_inlines.admin import SuperInlineModelAdmin, SuperModelAdmin
from django.contrib.contenttypes.admin import GenericStackedInline
from .models import ModelA, ModelB, ModelC, ModelD
from django.contrib.admin import TabularInline, StackedInline, site

class ModelAInlineModelAdmin(SuperInlineModelAdmin, TabularInline):
model = ModelA
fields = ('float_value',)
extra = 1

class ModelBInlineModelAdmin(SuperInlineModelAdmin, GenericStackedInline):
model = ModelB
fields = ('name', )
inlines = (ModelAInlineModelAdmin,)
extra = 1

class ModelCInlineModelAdmin(SuperInlineModelAdmin, StackedInline):
model = ModelC
fields = ('name', )
inlines = (ModelBInlineModelAdmin,)
extra = 1

class ModelDModelAdmin(SuperModelAdmin):
model = ModelD
fields = ()
inlines = (ModelCInlineModelAdmin,)

class ModelCModelAdmin(SuperModelAdmin):
model = ModelC
fields = ('name',)
inlines = (ModelBInlineModelAdmin,)

site.register(ModelD, ModelDModelAdmin)
site.register(ModelC, ModelCModelAdmin)


When populating the ModelA values through the ModelDModelAdmin, the ModelA values do not update. However, when updating the ModelA values through the ModelCModelAdmin, the ModelA values update correctly. Thus, it seems that the SuperInlineModelAdmin may not be referencing the generic foreign key correctly (although the SuperModelAdmin does).

Thanks in advance for any help you can lend.

best,
george.

Validation error

When saving a form with a third level, and the second level model has a required field but is not filled out, an error is thrown. Validation is being done on the top level model, but not the middle one. This is the exception msg:

Cannot assign "<Server: >": "Server" instance isn't saved in the database.

In this case "Server:" is the name of my second level model. If you want I can give you the entire debug output but for now here is the traceback:

Environment:

Request Method: POST
Request URL: http://127.0.0.1:8000/admin/ui/project/4/

Django Version: 1.8.1
Python Version: 2.7.6
Installed Applications:
('super_inlines',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'ui')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.security.SecurityMiddleware')


Traceback:
File "/Library/Python/2.7/site-packages/django/core/handlers/base.py" in get_response
  132.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/Library/Python/2.7/site-packages/django/contrib/admin/options.py" in wrapper
  616.                 return self.admin_site.admin_view(view)(*args, **kwargs)
File "/Library/Python/2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  110.                     response = view_func(request, *args, **kwargs)
File "/Library/Python/2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  57.         response = view_func(request, *args, **kwargs)
File "/Library/Python/2.7/site-packages/django/contrib/admin/sites.py" in inner
  233.             return view(request, *args, **kwargs)
File "/Library/Python/2.7/site-packages/django/contrib/admin/options.py" in change_view
  1519.         return self.changeform_view(request, object_id, form_url, extra_context)
File "/Library/Python/2.7/site-packages/django/utils/decorators.py" in _wrapper
  34.             return bound_func(*args, **kwargs)
File "/Library/Python/2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  110.                     response = view_func(request, *args, **kwargs)
File "/Library/Python/2.7/site-packages/django/utils/decorators.py" in bound_func
  30.                 return func.__get__(self, type(self))(*args2, **kwargs2)
File "/Library/Python/2.7/site-packages/django/utils/decorators.py" in inner
  145.                     return func(*args, **kwargs)
File "/Library/Python/2.7/site-packages/django/contrib/admin/options.py" in changeform_view
  1468.                 self.save_related(request, form, formsets, not add)
File "/Library/Python/2.7/site-packages/django/contrib/admin/options.py" in save_related
  1102.             self.save_formset(request, form, formset, change=change)
File "/Library/Python/2.7/site-packages/django/contrib/admin/options.py" in save_formset
  1090.         formset.save()
File "/Library/Python/2.7/site-packages/django/forms/models.py" in save
  640.         return self.save_existing_objects(commit) + self.save_new_objects(commit)
File "/Library/Python/2.7/site-packages/django/forms/models.py" in save_new_objects
  771.             self.new_objects.append(self.save_new(form, commit=commit))
File "/Library/Python/2.7/site-packages/django/forms/models.py" in save_new
  897.         setattr(form.instance, self.fk.name, self.instance)
File "/Library/Python/2.7/site-packages/django/db/models/fields/related.py" in __set__
  668.                         (value, self.field.rel.to._meta.object_name)

Exception Type: ValueError at /admin/ui/project/4/
Exception Value: Cannot assign "<Server: >": "Server" instance isn't saved in the database.

Cheers!

Add functionality to call javascript hooks before/after adding a new inline form in a formset

It's a common issue that one needs to run some code after a new row is added in an inline formset (usually to setup widgets). django-suit has a system in-place to handle this (see darklow/django-suit#337 (comment))

I think a similar system in super-inlines would make super-inlines more super.

django-suit implementation:

  1. Functionality to register new hooks: https://github.com/darklow/django-suit/blob/develop/suit/static/suit/js/suit.js#L4
  2. Hooks are called after adding a new row: https://github.com/darklow/django-suit/blob/develop/suit/templates/admin/edit_inline/stacked.html#L78

unknow-icon.gif missing with Django 1.9

Hi,

with Django 1.9, some static images have changed like unknow-icon.gif which is know unknow-icon.svg. This causes graphical glitches (missing icon).

This image is used by super_inlines/templates/admin/edit_inline/tabular.html at line 19.

From where I stand I see two quick solutions:

  • change icon-unknown.gif to icon-unknown.svg and bump the version number (breaking compatibility).
  • add the image within the project static files to keep compatibility.

I can contribute to the project, I just wanted an opinion before submitting a PR directly.

Thanks,

Baptiste

display "add another" link for foreign key in inline model

Suppose a House model has a foreign key to a builder company:

class House(models.Model):
    builder = models.ForeignKey('Company')

It would be nice to still have an "add another" link next for builder, just like django admin has to offer.
image

KeyError at /admin/salon/servant/4/ 'request'

Request Method: GET
Request URL: http://192.168.56.102:8080/admin/salon/servant/4/
Django Version: 1.7.7
Exception Type: KeyError
Exception Value:
'request'
Exception Location: /usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/context.py in getitem, line 70
Python Executable: /usr/bin/python3
Python Version: 3.4.0
Python Path:
['/home/dev/workplace/xjc',
'/usr/local/lib/python3.4/dist-packages/mysqlclient-1.3.6-py3.4-linux-x86_64.egg',
'/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg',
'/usr/local/lib/python3.4/dist-packages/djangorestframework-3.1.1-py3.4.egg',
'/usr/local/lib/python3.4/dist-packages/Pillow-2.8.1-py3.4-linux-x86_64.egg',
'/usr/local/lib/python3.4/dist-packages/pingpp-2.0.1-py3.4.egg',
'/usr/local/lib/python3.4/dist-packages/requests-2.6.0-py3.4.egg',
'/usr/local/lib/python3.4/dist-packages/alipay-0.4.2-py3.4.egg',
'/usr/local/lib/python3.4/dist-packages/six-1.9.0-py3.4.egg',
'/usr/local/lib/python3.4/dist-packages/django_alipay-0.1-py3.4.egg',
'/usr/local/lib/python3.4/dist-packages/pep8-1.6.2-py3.4.egg',
'/usr/local/lib/python3.4/dist-packages/uWSGI-2.0.10-py3.4.egg',
'/usr/local/lib/python3.4/dist-packages/setuptools-15.0-py3.4.egg',
'/usr/local/lib/python3.4/dist-packages/pip-6.1.1-py3.4.egg',
'/usr/local/lib/python3.4/dist-packages/Scrapy-0.24.5-py3.4.egg',
'/usr/local/lib/python3.4/dist-packages/cssselect-0.9.1-py3.4.egg',
'/usr/local/lib/python3.4/dist-packages/pyOpenSSL-0.15.1-py3.4.egg',
'/usr/local/lib/python3.4/dist-packages/pytz-2015.2-py3.4.egg',
'/usr/local/lib/python3.4/dist-packages/pycrypto-2.6.1-py3.4-linux-x86_64.egg',
'/usr/local/lib/python3.4/dist-packages/django_super_inlines-0.1.4-py3.4.egg',
'/usr/lib/python3.4',
'/usr/lib/python3.4/plat-x86_64-linux-gnu',
'/usr/lib/python3.4/lib-dynload',
'/usr/local/lib/python3.4/dist-packages',
'/usr/lib/python3/dist-packages']
Server time: Mon, 15 Jun 2015 09:44:35 +0800
Error during template rendering

In template /usr/local/lib/python3.4/dist-packages/django_super_inlines-0.1.4-py3.4.egg/super_inlines/templates/admin/edit_inline/stacked.html, error at line 56
request
46 {{ inline_admin_form.form.non_field_errors }}
47 {% endif %}
48 {% for fieldset in inline_admin_form %}
49 {% include "admin/includes/fieldset.html" %}
50 {% endfor %}
51 {% if inline_admin_form.needs_explicit_pk_field %}
52 {{ inline_admin_form.pk_field.field }}
53 {% endif %}
54 {{ inline_admin_form.fk_field.field }}
55
56 {% get_sub_inline_formsets inline original forloop.counter0 forloop.last as sub_inlines %}
57 {% for sub_inline in sub_inlines %}
58 {% include sub_inline.opts.template with inline_admin_formset=sub_inline is_subinline=True %}
59 {% endfor %}
60
61
62 {% endwith %}
63 {% endfor %}
64
65
66 {% if not is_subinline %}
Traceback Switch to copy-and-paste view

/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/core/handlers/base.py in get_response
response = response.render() ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/response.py in render
self.content = self.rendered_content ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/response.py in rendered_content
content = template.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/base.py in render
return self._render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/base.py in _render
return self.nodelist.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/base.py in render
bit = self.render_node(node, context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/debug.py in render_node
return node.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/loader_tags.py in render
return compiled_parent._render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/base.py in _render
return self.nodelist.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/base.py in render
bit = self.render_node(node, context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/debug.py in render_node
return node.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/loader_tags.py in render
return compiled_parent._render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/base.py in _render
return self.nodelist.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/base.py in render
bit = self.render_node(node, context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/debug.py in render_node
return node.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/loader_tags.py in render
result = block.nodelist.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/base.py in render
bit = self.render_node(node, context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/debug.py in render_node
return node.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/loader_tags.py in render
result = block.nodelist.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/base.py in render
bit = self.render_node(node, context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/debug.py in render_node
return node.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/defaulttags.py in render
nodelist.append(node.render(context)) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/loader_tags.py in render
return template.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/base.py in render
return self._render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/base.py in _render
return self.nodelist.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/base.py in render
bit = self.render_node(node, context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/debug.py in render_node
return node.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/defaulttags.py in render
return self.nodelist.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/base.py in render
bit = self.render_node(node, context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/debug.py in render_node
return node.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/defaulttags.py in render
return nodelist.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/base.py in render
bit = self.render_node(node, context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/debug.py in render_node
return node.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/defaulttags.py in render
nodelist.append(node.render(context)) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/defaulttags.py in render
return self.nodelist.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/base.py in render
bit = self.render_node(node, context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/debug.py in render_node
return node.render(context) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/base.py in render
context[self.target_var] = func(_resolved_args, *_resolved_kwargs) ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/django_super_inlines-0.1.4-py3.4.egg/super_inlines/templatetags/super_inlines.py in get_sub_inline_formsets
request = context['request'] ...
▶ Local vars
/usr/local/lib/python3.4/dist-packages/Django-1.7.7-py3.4.egg/django/template/context.py in getitem
raise KeyError(key) ...
▶ Local vars
Request information

GET
No GET data
POST
No POST data
FILES
No FILES data
COOKIES
Variable Value
csrftoken
'RqEvKHSawakU1XxcLW8kgRD3ayPdxFox'
sessionid
'qato16cbybwuyx2g1nn6k7oxb419juay'
META
Variable Value
SCRIPT_NAME
''
SERVER_PROTOCOL
'HTTP/1.1'
TERM
'xterm'
SSH_TTY
'/dev/pts/3'
PATH_INFO
'/admin/salon/servant/4/'
_
'/usr/bin/python3'
SHELL
'/bin/bash'
CSRF_COOKIE_USED
True
HOME
'/home/dev'
wsgi.run_once
False
wsgi.input
<io.BufferedReader name=8>
TZ
'Asia/Chongqing'
HTTP_COOKIE
'sessionid=qato16cbybwuyx2g1nn6k7oxb419juay; '
'csrftoken=RqEvKHSawakU1XxcLW8kgRD3ayPdxFox'
wsgi.file_wrapper
''
CSRF_COOKIE
'RqEvKHSawakU1XxcLW8kgRD3ayPdxFox'
PATH
'/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games'
XDG_SESSION_ID
'3'
SERVER_SOFTWARE
'WSGIServer/0.2'
HTTP_REFERER
'http://192.168.56.102:8080/admin/salon/servant/'
QUERY_STRING
''
LANG
'en_US.UTF-8'
HTTP_ACCEPT
'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,
/;q=0.8'
LESSCLOSE
'/usr/bin/lesspipe %s %s'
SSH_CONNECTION
'10.61.11.73 61687 10.61.11.45 22'
MAIL
'/var/mail/dev'
GATEWAY_INTERFACE
'CGI/1.1'
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: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:.arj=01;31:.taz=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lz=01;31:.xz=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:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.jpg=01;35:.jpeg=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:.axv=01;35:.anx=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=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:.axa=00;36:.oga=00;36:.spx=00;36:.xspf=00;36:'
SSH_CLIENT
'10.61.11.73 61687 22'
CONTENT_TYPE
'text/plain'
HTTP_ACCEPT_LANGUAGE
'zh-CN,zh;q=0.8'
DJANGO_SETTINGS_MODULE
'xjc.settings'
wsgi.version
(1, 0)
HTTP_USER_AGENT
'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/42.0.2311.90 Safari/537.36'
REQUEST_METHOD
'GET'
HTTP_HOST
'192.168.56.102:8080'
wsgi.url_scheme
'http'
SERVER_NAME
'dev'
HTTP_CONNECTION
'keep-alive'
RUN_MAIN
'true'
XDG_RUNTIME_DIR
'/run/user/1000'
wsgi.errors
<io.TextIOWrapper name='' mode='w' encoding='UTF-8'>
wsgi.multithread
True
PWD
'/home/dev/workplace/xjc'
wsgi.multiprocess
False
LESSOPEN
'| /usr/bin/lesspipe %s'
SHLVL
'1'
REMOTE_ADDR
'192.168.56.1'
HTTP_ACCEPT_ENCODING
'gzip, deflate, sdch'
SERVER_PORT
'8080'
USER
'dev'
LOGNAME
'dev'
OLDPWD
'/home/dev'
CONTENT_LENGTH
''
REMOTE_HOST
''
Settings
Using settings module xjc.settings
Setting Value
ROOT_URLCONF
'xjc.urls'
LANGUAGES_BIDI
('he', 'ar', 'fa', 'ur')
COMMENTS_ALLOW_PROFANITIES
False
ALLOWED_HOSTS
[]
CSRF_FAILURE_VIEW
'django.views.csrf.csrf_failure'
SESSION_SAVE_EVERY_REQUEST
False
DEFAULT_TABLESPACE
''
CSRF_COOKIE_SECURE
False
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.tz',
'django.contrib.messages.context_processors.messages')
DEBUG
True
MANAGERS
()
TEMPLATE_DEBUG
True
STATICFILES_DIRS
('/home/dev/workplace/xjc/static1/',)
DEFAULT_FROM_EMAIL
'webmaster@localhost'
FIRST_DAY_OF_WEEK
0
CSRF_COOKIE_DOMAIN
None
PREPEND_WWW
False
INTERNAL_IPS
()
DATABASE_ROUTERS
[]
DATABASES
{'default': {'ATOMIC_REQUESTS': False,
'AUTOCOMMIT': True,
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.mysql',
'HOST': 'localhost',
'NAME': 'xjc',
'OPTIONS': {},
'PASSWORD': '*******************
',
'PORT': '3306',
'TEST': {'CHARSET': None,
'COLLATION': None,
'MIRROR': None,
'NAME': None},
'TIME_ZONE': 'UTC',
'USER': 'xjc'}}
SQLITE_DB
{'default': {'ENGINE': 'django.db.backends.sqlite3',
'NAME': '/home/dev/workplace/xjc/db.sqlite3'}}
FILE_CHARSET
'utf-8'
CACHE_MIDDLEWARE_ALIAS
'default'
THOUSAND_SEPARATOR
','
SESSION_EXPIRE_AT_BROWSER_CLOSE
False
TIME_INPUT_FORMATS
('%H:%M:%S', '%H:%M:%S.%f', '%H:%M')
SESSION_FILE_PATH
None
LOGGING_CONFIG
'logging.config.dictConfig'
EMAIL_BACKEND
'django.core.mail.backends.smtp.EmailBackend'
FORCE_SCRIPT_NAME
None
MONTH_DAY_FORMAT
'F j'
STATIC_URL
'/static/'
SEND_BROKEN_LINK_EMAILS
False
ABSOLUTE_URL_OVERRIDES
{}
LOGGING
{}
LANGUAGE_COOKIE_AGE
None
DECIMAL_SEPARATOR
'.'
SERVER_EMAIL
'root@localhost'
ADMINS
()
FORMAT_MODULE_PATH
None
NUMBER_GROUPING
0
SILENCED_SYSTEM_CHECKS
[]
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'),
('el', 'Greek'),
('en', 'English'),
('en-au', 'Australian English'),
('en-gb', 'British English'),
('eo', 'Esperanto'),
('es', 'Spanish'),
('es-ar', 'Argentinian 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'),
('gl', 'Galician'),
('he', 'Hebrew'),
('hi', 'Hindi'),
('hr', 'Croatian'),
('hu', 'Hungarian'),
('ia', 'Interlingua'),
('id', 'Indonesian'),
('io', 'Ido'),
('is', 'Icelandic'),
('it', 'Italian'),
('ja', 'Japanese'),
('ka', 'Georgian'),
('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 Bokmal'),
('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-cn', 'Simplified Chinese'),
('zh-hans', 'Simplified Chinese'),
('zh-hant', 'Traditional Chinese'),
('zh-tw', 'Traditional Chinese'))
SHORT_DATE_FORMAT
'm/d/Y'
WSGI_APPLICATION
'xjc.wsgi.application'
TIME_FORMAT
'P'
MEDIA_URL
''
SESSION_COOKIE_HTTPONLY
True
FILE_UPLOAD_MAX_MEMORY_SIZE
2621440
SECRET_KEY
'**
'
USE_ETAGS
False
BASE_DIR
'/home/dev/workplace/xjc'
SESSION_COOKIE_DOMAIN
None
LOGIN_URL
'/accounts/login/'
MEDIA_ROOT
''
TEMPLATE_STRING_IF_INVALID
''
ADMIN_FOR
()
DEFAULT_CONTENT_TYPE
'text/html'
IGNORABLE_404_URLS
()
USE_L10N
True
LANGUAGE_COOKIE_DOMAIN
None
DEFAULT_INDEX_TABLESPACE
''
CACHES
{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
TIME_ZONE
'Asia/Chongqing'
SESSION_COOKIE_NAME
'sessionid'
FILE_UPLOAD_DIRECTORY_PERMISSIONS
None
SESSION_SERIALIZER
'django.contrib.sessions.serializers.JSONSerializer'
REST_FRAMEWORK
{'PAGE_SIZE': 10}
TEMPLATE_DIRS
()
FILE_UPLOAD_HANDLERS
('django.core.files.uploadhandler.MemoryFileUploadHandler',
'django.core.files.uploadhandler.TemporaryFileUploadHandler')
EMAIL_HOST
'localhost'
SESSION_COOKIE_AGE
1209600
CSRF_COOKIE_NAME
'csrftoken'
SESSION_COOKIE_SECURE
False
DATETIME_FORMAT
'N j, Y, P'
PASSWORD_HASHERS
'**
'
TEST_NON_SERIALIZED_APPS
[]
SESSION_ENGINE
'django.contrib.sessions.backends.db'
PROFANITIES_LIST
'**
'
LOCALE_PATHS
()
TEST_RUNNER
'django.test.runner.DiscoverRunner'
YEAR_MONTH_FORMAT
'F Y'
FILE_UPLOAD_TEMP_DIR
None
ALLOWED_INCLUDE_ROOTS
()
LOGIN_REDIRECT_URL
'/accounts/profile/'
USE_THOUSAND_SEPARATOR
False
PASSWORD_RESET_TIMEOUT_DAYS
'**
'
SETTINGS_MODULE
'xjc.settings'
X_FRAME_OPTIONS
'SAMEORIGIN'
MESSAGE_STORAGE
'django.contrib.messages.storage.fallback.FallbackStorage'
TRANSACTIONS_MANAGED
False
AUTH_USER_MODEL
'auth.User'
CSRF_COOKIE_PATH
'/'
DISALLOWED_USER_AGENTS
()
FIXTURE_DIRS
()
SIGNING_BACKEND
'django.core.signing.TimestampSigner'
DATE_FORMAT
'N j, Y'
EMAIL_SUBJECT_PREFIX
'[Django] '
USE_TZ
True
USE_X_FORWARDED_HOST
False
STATIC_ROOT
'/home/dev/workplace/xjc/static/'
INSTALLED_APPS
('super_inlines',
'django.contrib.admin',
'django.contrib.admindocs',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'salon',
'rest_framework')
LANGUAGE_COOKIE_NAME
'django_language'
SESSION_COOKIE_PATH
'/'
TEMPLATE_LOADERS
('django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader')
AUTHENTICATION_BACKENDS
('django.contrib.auth.backends.ModelBackend',)
CACHE_MIDDLEWARE_SECONDS
600
STATICFILES_FINDERS
('django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder')
LOGOUT_URL
'/accounts/logout/'
CSRF_COOKIE_HTTPONLY
False
APPEND_SLASH
True
USE_I18N
True
SESSION_CACHE_ALIAS
'default'
DEFAULT_FILE_STORAGE
'django.core.files.storage.FileSystemStorage'
EMAIL_USE_SSL
False
DEFAULT_EXCEPTION_REPORTER_FILTER
'django.views.debug.SafeExceptionReporterFilter'
MIGRATION_MODULES
{}
MYSQL_DB
{'default': {'ATOMIC_REQUESTS': False,
'AUTOCOMMIT': True,
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.mysql',
'HOST': 'localhost',
'NAME': 'xjc',
'OPTIONS': {},
'PASSWORD': '**
',
'PORT': '3306',
'TEST': {'CHARSET': None,
'COLLATION': None,
'MIRROR': None,
'NAME': None},
'TIME_ZONE': 'UTC',
'USER': 'xjc'}}
STATICFILES_STORAGE
'django.contrib.staticfiles.storage.StaticFilesStorage'
EMAIL_USE_TLS
False
CSRF_COOKIE_AGE
31449600
DEFAULT_CHARSET
'utf-8'
SHORT_DATETIME_FORMAT
'm/d/Y P'
CACHE_MIDDLEWARE_KEY_PREFIX
'**
'
DEBUG_PROPAGATE_EXCEPTIONS
False
MIDDLEWARE_CLASSES
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware')
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')
FILE_UPLOAD_PERMISSIONS
None
EMAIL_HOST_PASSWORD
'**
*****************'
LANGUAGE_COOKIE_PATH
'/'
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')
EMAIL_HOST_USER
''
SECURE_PROXY_SSL_HEADER
None
EMAIL_PORT
25
LANGUAGE_CODE
'en-us'
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.

assignment_tag is deprecated

Looks like assignment_tag is deprecated since Django 1.9, and will be removed by Django 2.0.

simple_tag can be used instead, and it's probably fine to drop support for pre-1.9 by now anyway, since 1.11 is the latest LTS.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.