Shogun Website
JavaScript Python CSS HTML Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


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

    PYTHONPATH=. util/ -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 :
     -  : Handles the requests.
     - : DataBase description (Tables, fields, ...).
     -  : Define which objects the admin can modify with the admin ui.

  - /shogun :
     - : Configuration.
     -     : Urls and method in that handles the url.

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

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

Explanation of the database

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

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

Explanation for execution

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


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

    ./ mysql.dump | sqlite3 shogun.sqlite

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

  - 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.