Skip to content

JBthePenguin/SimpleWebsiteDjango

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Base for a simple Django website

A starting point for a simple website using Django, Bootstrap, Font Awesome and Google Fonts. It contains:

  • template base that include navbar and footer templates
  • templates for each page that extend base with header and main
  • default admin site
  • debug toolbar for development
  • tests for views, templates and responsive design

How to install?

First way: with his install bash script

Execute install_simple.sh with the command source. You can pass a new name for your root folder in parameter:

source install_simple.sh YourWebsite

First you are asked to choose the place for the root directory of your website, and after you have to register the superuser at the end of the installation.

Second way: step by step

Clone me, create a virtual environment inside SimpleWebsiteDjango with virtualenv (!!! maybe you have to install !!!) and activate it:

$ git clone https://github.com/JBthePenguin/SimpleWebsiteDjango.git
$ cd SimpleWebsiteDjango
$ virtualenv -p python3 env
$ source env/bin/activate

Install all necessary dependencies (django, django-debug-toolbar, django-bootstrap4, django-fontawesome-5, selenium):

(env)$ pip install -r requirements.txt

Make the migrations:

(env)$ python manage.py makemigrations
(env)$ python manage.py migrate

Create a superuser:

(env)$ python manage.py createsuperuser

How to use?

Start the server (the virtual environment have to be activated):

(env)$ python manage.py runserver

With your favorite browser, go to url:

Tests

The tests use selenium and maybe you have to install GreckoWebdriver to use firefox. Run the tests:

(env)$ python manage.py test -v 2

If you want to use Chrome, install ChromeWebDriver and change in visitapp/tests/browser.py line 2:

from selenium.webdriver.chrome.webdriver import WebDriver

About

A starting point for a simple website.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published