Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- your_project
- |-- your_project/
- |-- myapp/
- |-- templates/
- |-- admin/
- |-- myapp/
- |-- change_form.html <- do not misspell this
- TEMPLATES = [
- {
- 'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'DIRS': [os.path.join(BASE_DIR, 'templates')], # <- add this line
- 'APP_DIRS': True,
- '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',
- ],
- },
- },
- ]
- ~/.virtualenvs/edge/lib/python2.7/site-packages/django/contrib/admin/templates/admin
- {% extends "admin/change_form.html" %}
- {% block field_sets %}
- {# your modification here #}
- {% endblock %}
- # urls.py
- ...
- from django.contrib import admin
- admin.site.index_template = 'admin/my_custom_index.html'
- admin.autodiscover()
- class Myadmin(admin.ModelAdmin):
- change_form_template = 'change_form.htm'
- app_index.html
- change_form.html
- change_list.html
- delete_confirmation.html
- object_history.html
- your_project
- |-- your_project/
- |-- myapp/
- |-- templates/
- |-- admin/
- |-- login.html <- do not misspell this
- {% extends 'django_admin/change_form.html' %}
- Your stuff here
- mysite-container/ # project container directory
- manage.py
- mysite/ # project package
- __init__.py
- admin.py
- apps.py
- settings.py
- urls.py
- wsgi.py
- app1/
- app2/
- ...
- static/
- templates/
- ln -s /usr/local/lib/python2.7/dist-packages/django/contrib/admin/templates/admin/ templates/django_admin
- ~/virtualenvs/mydomain/lib/python2.7/site-packages/django/contrib/admin/templates/admin
- /templates/
- admin
- admin_src -> [to django source]
- base.html
- index.html
- sitemap.xml
- etc...
- {% extends "admin_src/base.html" %}
- {% block extrahead %}
- <link rel='shortcut icon' href='{{ STATIC_URL }}img/favicon-admin.ico' />
- {% endblock %}
- admin.site.index_template = 'admin/custom_index.html'
- admin.AdminSite.app_index_template = "servers/servers-home.html"
- change_list_template = "servers/servers_changelist.html"
- change_form_template = "servers/server_changeform.html"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement