djangosnippets.org: Latest snippets tagged with 'app'https://djangosnippets.org/tags/app/2015-05-22T13:05:10.797145-05:00 Load template from specific app
2015-05-22T13:05:10.797145-05:00fabiomontefuscolohttps://djangosnippets.org/snippets/10489/<p>It's an update of snippet <a href="https://djangosnippets.org/snippets/1376/">https://djangosnippets.org/snippets/1376/</a> to work with Django 1.8. With this piece of code, you can override admin templates without copy or symlink files. Just write your template and extend the target.</p>
Freely redistributableLoad Template from App
2013-12-01T12:06:33.511683-06:00mikobhttps://djangosnippets.org/snippets/3007/<p>Updated a similar snippet by "King" to work with Django 1.6. This is especially useful for overriding the admin templates without having to symlink or copy them into your project. For example {% extends "admin:base.html" %} would extend the admin page base.html.</p>
Freely redistributableAdmin App/Model Custom Ordering
2010-02-24T17:42:46.967461-06:00stephen_mcdhttps://djangosnippets.org/snippets/1939/<p>This combination of settings.py admin_reorder_tag.py and admin/base_site.html gives you the ability to define custom ordering for the apps and models in the admin app.</p>
<ol>
<li>
<p>Add the setting ADMIN_REORDER to your settings.py as a tuple with each item containing a tuple of the app name and a tuple of the models …</p></li></ol>
Freely redistributableAdmin Apps Names Translation
2010-01-22T09:14:33.127479-06:00Nadhttps://djangosnippets.org/snippets/1882/<p>This Snippet allows for your project's apps names to be displayed as you want in the Admin, including translations.</p>
<p>The lists of apps and languages are created from your settings.py file.</p>
<p><strong>How to use</strong></p>
<p>1st part:</p>
<ul>
<li>
<p>Create a application called 'apps_verbose' in you project with the models.py and admin.py showed …</p></li></ul>
Freely redistributablerss news
2009-11-28T05:00:00.454252-06:00montaohttps://djangosnippets.org/snippets/1821/<p>publish tldrelative rss news exampled web.montao.com.br/li</p>
Freely redistributableLoad template from specific app
2009-03-17T13:55:44.801788-05:00kinghttps://djangosnippets.org/snippets/1376/<p>You can use this template loader if you want to use template specifically from one app. Useful mainly in overriding admin templates - just make your own <code>admin/change_form.html</code> and have it extend <code>admin:admin/change_form.html</code> withou creating any symlinking or copying django admin's templates to alternate location.</p>
<p>Part of the <a href="http://www.ellaproject.cz/">ella project …</a></p>
Freely redistributableDefault settings for a app
2008-06-12T09:16:53.911498-05:00phxxhttps://djangosnippets.org/snippets/796/<p>Save this as conf.py in the app's directory. Now you can do <code>from myapp.conf import settings</code>.</p>
<p>You can access from the imported object every item of your settings.py including the default settings of myapp. Though you don't have to define every setting in settings.py you use in your app. …</p>
Freely redistributableRegrouping admin models
2008-01-31T13:42:45.341508-06:00sleytrhttps://djangosnippets.org/snippets/574/<p>This is modification of Django's original adminapplist template tag. You can move your models from one app to other or completely hide them with this mod. </p>
<p>Copy django_dir/contrib/admin/templates/admin/index.html file to your templates/admin folder, open it, then change {% load adminapplist %} to {% load custom_adminapplist %} (or whatever you named …</p>
Freely redistributable