Shogun Website
JavaScript Python CSS HTML Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
news
pages
scripts
shogun
static
templates
util
.gitignore
Makefile
README
manage.py
parserHTML.py

README

Author : Shogun.
Description : Shogun web, done in django.

Adding Content
==============

From the admin page create a new ShogunPage and then create a new article that links to it. 
You will also need to edit the navbar to add your new page to the navbar

Adding Markdown pages from GitHub
run:

    PYTHONPATH=. util/gfmarkdown.py -d <path to shogun repo>

from the shogun web / directory to get the latest markdown files and prepare them for the website

Explanation of directory content
================================

  - /news : All news in its respectives years in HTML format.

  - /static :
     - /admin   : To allow admin user interface works outer than localhost.
     - /css     : css
     - /design  : images
     - /figures : The images used in the articles.
     - /js :
         - /tiny_mce : HTML editor to make easier to add/edit content in the articles.
         - /editors  : Database fields with special configuration.

  - /templates : All templates for each different page .
     - page.html    : General html.
     - subpage.html : Extends page, html of the subpages.
     - home.html    : Initial page.

  - /pages :
     - views.py  : Handles the requests.
     - models.py : DataBase description (Tables, fields, ...).
     - admin.py  : Define which objects the admin can modify with the admin ui.

  - /shogun :
     - settings.py : Configuration.
     - urls.py     : Urls and method in views.py that handles the url.

  - /scripts :
      Some useful scripts for working on the site

  - parserHTML.py : Parse the news in "/news" (HTML format).


Explanation of the database
===========================

  Current
  -------
  - ShogunPages : main page file
  - Articles    : Content. Belongs to a ShogunPage
  - NavBar      : The NavBar is stored in the DB
  - News        : News loaded using parserHTML.py from /news.

  Legacy
  ------
	- Pages    : Main possible views (home,about,documentation,references,...).
	- Subpages : Views inside the pages, for documentation (Information, Samples, Downloads).
	- News     : News loaded using parserHTML.py from /news.
	- Articles : Content of each page/subpage.


Explanation for execution
=========================

	- In root directory : python manage.py runserver port
	- Admin ui access   : http://ip/port/admin/


Development
============

  - Obtain a mysql dump from the production server from someone with access
  - run the mysql2sqlite.sh script:

    ./mysql2sqlite.sh mysql.dump | sqlite3 shogun.sqlite

  - Do not commit the shogun.sqlite file as it contains real db user names etc.


Notes
=====
  - When clicks in a picture, see it in a big page.
    1 - In HTML code : <img src="/bigpicture/namePicture"><src>
    2 - The picture must be in /static/figures/ with the name namePicture.