Skip to content

Commit

Permalink
wrote 'Django administration' text chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
shabda committed Feb 1, 2018
1 parent be88379 commit 898d805
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 55 deletions.
42 changes: 42 additions & 0 deletions docs/change_text.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,49 @@
How to change 'Django administration' text?
================================================

By default Django admin shows 'Django administration'. You have been asked to replace this with 'UMSRA Administration'

The text is at these pages:

- Login Page
- The listview page
- The HTML title tag

Login, Listview and Changeview Page
++++++++++++++++++++++++++++++++++++++++++++

By default it looks like this and is set to :code:`“Django administration”`

.. image:: images/default_login.png

:code:`site_header` can be set to change this.

Listview Page
++++++++++++++++++++++

BY default it looks like this and is set to :code:`“Site administration”`

.. image:: images/default_listview.png

:code:`index_title` can be set to change this.



HTML title tag
++++++++++++++++++++++

By default it looks like this and is set to :code:`“Django site admin”`

.. image:: images/default_title.png


:code:`site_title` can be set to change this.


We can make the three changes in urls.py::


admin.site.site_header = "UMSRA Admin"
admin.site.site_title = "UMSRA Admin Portal"
admin.site.index_title = "Welcome to UMSRA Researcher Portal"

58 changes: 3 additions & 55 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Django admin cookbook documentation build configuration file, created by
# sphinx-quickstart on Wed Jan 31 17:08:48 2018.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- General configuration ------------------------------------------------

Expand All @@ -46,7 +26,7 @@
master_doc = 'index'

# General information about the project.
project = 'Django admin cookbook'
project = 'Django Admin Cookbook'
copyright = '2018, Agiliq'
author = 'Agiliq'

Expand Down Expand Up @@ -108,13 +88,6 @@
]
}


# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'Djangoadmincookbookdoc'


# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
Expand All @@ -139,31 +112,6 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'Djangoadmincookbook.tex', 'Django admin cookbook Documentation',
'Agiliq', 'manual'),
(master_doc, 'Djangoadmincookbook.tex', 'Django Admin Cookbook',
'Agiliq', 'howto'),
]


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'djangoadmincookbook', 'Django admin cookbook Documentation',
[author], 1)
]


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'Djangoadmincookbook', 'Django admin cookbook Documentation',
author, 'Djangoadmincookbook', 'One line description of project.',
'Miscellaneous'),
]



5 changes: 5 additions & 0 deletions heroes_and_monsters/heroes_and_monsters/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
from django.contrib import admin
from django.urls import path

admin.site.site_header = "UMSRA Admin"
admin.site.site_title = "UMSRA Admin Portal"
admin.site.index_title = "Welcome to UMSRA Researcher Portal"


urlpatterns = [
path('admin/', admin.site.urls),
]

0 comments on commit 898d805

Please sign in to comment.