This is a Django Web App that allows the user to build their own faction for the niche wargame saga created by [studio tomahawk] (https://www.studio-tomahawk.com/en/saga/)
1: Install Python 3.12.3 from: https://www.python.org/downloads/ be sure to add Python to your systems PATH variable during the installation
2: Install Django 5.0.6 from: https://www.djangoproject.com/download/
3: Clone this repository into the folder of your choice.
1: Either open the repository folder in an Integrated Developer Environment or Navigate to it Using The Command Prompt
2: Change directory to the project folder (Either in your IDE terminal or using the Command Prompt)
3: Execute this command: python manage.py runserver
4: The server will output the following stack trace (or similar): System check identified no issues (0 silenced). (Todays Date) - (Todays Time) Django version 5.0.6, using settings 'sagabuilder.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK.
Don't worry if your development server is on a different url than: http://127.0.0.1:8000/ your url is located after the text: "Starting development server at "
5: Access Running Application open a web browser of your choice and navigate to url/saga example: http://127.0.0.1:8000/saga
The "Saga Faction Builder Home Page" is loaded on startup from that page you can perform the following operations by clicking on the following buttons:
- Create Faction, Create Page (Both redirect to the page to create a new faction)
- View Existing Faction (Select which one in the Dropdown)
- Edit Existing Faction (Select which one in the Dropdown)
- On this page you can edit all fields within a faction in the app a Faction must obey the following constraints however, or all changes will be rejected: 1: The Name, Description and Special Rules text entries cannot be empty. 2: If a faction has no special rules that should be indicated with the '-' character
Pressing the: Add Hero , Add Hearthguard, add Warrior, and add Levy buttons will load a default version of that unit to the table that can then be edited or removed.
-
All data with a blue background is NEW DATA, it has no representation in the database and therefore clicking the Delete button in that row will remove it from the table
-
All data without a blue background is OLD DATA, it represents a record in the database and therefore clicking the Delete button in that row will Color that row Light Gray and will only remove it from the database after the "Save Changes" button has been pressed. To reverse the deletion of OLD DATA click the cancel button in its Light Gray row.
- Pressing the Delete Faction Button will remove the faction and all of its units from the database
- Pressing the Save Changes Button will attempt to push any changes made to the Faction and Units to the database HOWEVER if the rules listed under "Create / Edit Page" have not been followed, no changes will be pushed to the database
- If after pressing Push Changes you are redirected to a table that shows your faction then you followed the listed rules and your data has been added tothe database.
- Otherwise if you are redirected to the home page after pressing Push Changes, you broke one of the listed rules, or edited the post data so that it failed internal validation.
- If you are redirected to the Home Page after pressing Delete Faction, the faction has been successfully deleted
- If you are redirected to the Create Page after pressing Delete Faction, the faction you requested to delete already does not exist in the database