This repository has been archived by the owner on Jul 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
README
91 lines (64 loc) · 2.72 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
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.