Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.
/ softhub Public archive

App store built with Django, developed for my bachelor's thesis.

License

Notifications You must be signed in to change notification settings

davcri/softhub

Repository files navigation

Softhub

Softhub is a demonstrative web application written in modern Python 3 using Django Web Framework.

This is a project for my bachelor thesis in computer engineering:

Django: design and development of an open source web application

Development requirements

  • python: to install Django and its modules
  • npm: required by bower
  • bower: to handle dependencies found in bower.json

Set up a local development environment

For detailed install instructions, see the wiki page, otherwise read the following installation Overview.

Note: this guide is tested on Arch Linux that use python3.x as default.
Run these commands from the project folder:

# create a directory for the virtualenv
virtualenv ENV
# activate the virtualenv
source ENV/bin/activate
# install python dependencies
pip install -r requirements.txt

# install bower if necessary
npm install -g bower

# install web dependencies with bower
bower install

# run migrations
python manage.py migrate

# [Optional] run a custom Softhub command to initialize the database
# https://gitlab.com/davcri91/softhub-site/blob/master/softhub/management/commands/initialize_db.py
python manage.py initialize_db

# [Optional] run a custom Softhub command to populate the database with faked data
python manage.py fake_data

# run the local development server
python manage.py runserver

The following files are used to store dependencies:
requirements.txt: contains python dependencies
bower.json: contains external JS and CSS libraries, used by bower
.bower.rc: configuration file for bower, used to tell bower where to store dependencies

Administrator section

In order to access the admin section, run the app server then go to /softhub/admin/.

If you executed initialize_db command, an admin account will be automatically creted with

username: admin
password: admin12

If you dind't execute initialize_db, you'll need to create an admin account using python manage.py createsuperuser.

Standard and conventions

Code is written trying to follow PEP8 standard: https://www.python.org/dev/peps/pep-0008/

Management commands

Generate models diagrams (you'll need Graphviz installed):

python manage.py graph_models -a -o models.png

Thanks

I used and modified the following templates (all MIT-licensed) :