https://github.com/coppolaemilio/pygame-website
Repository for Pygame orientated website
https://github.com/coppolaemilio/pygame-website
Last synced: 3 months ago
JSON representation
Repository for Pygame orientated website
- Host: GitHub
- URL: https://github.com/coppolaemilio/pygame-website
- Owner: coppolaemilio
- License: gpl-2.0
- Created: 2015-09-30T09:07:42.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-30T08:55:02.000Z (over 9 years ago)
- Last Synced: 2025-01-18T01:12:57.176Z (5 months ago)
- Language: Python
- Size: 78.1 KB
- Stars: 1
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pygame-website
Repository for Pygame orientated website
Githib link: https://github.com/maximinus/pygame-website
To set up and run on Linux:
===========================Start a virtual environment. This will create a directory called pygame:
virtualenv pygame
Start the environment:
source pygame/bin/activate
Now you need to download the repository:
git clone https://github.com/maximinus/pygame-website.git
cd pygame-websiteNow we need to download all python packages:
pip install -r requirments.txt
Now we can run the django server:
cd pygamesite
./serveNow load up a web browser and go to:
127.0.0.1:8000
And you should see a welcome screen.
The directory structure in the pygamesite is as follows:
/media - this is for uploads from users
/static - this is for static files
/images
/css
/js
/templates - this is the templates used to build the HTML. These files are 95% HTML and a little bit of Django templatesThe other folders all relate to Django internals.
Referencing static media
========================If there is a file on the server such as:
/static/some_folder/some_file.png
And we wish to use on the HTML as:
![]()
Then to use in the templates we have to do:
See the source code for main.html under /templates for the example.