Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

A Django boilerplate project that will showcase using the Datatables javascript library as well as some other modern front end tools.

License

Notifications You must be signed in to change notification settings

dre2004/django-datatables-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django datatables boilerplate

This project is an example of using Django and the django-datatables-view plugin, it can be used as a boiler plate or just to get a better understanding of how to use this great plugin.

In this sample project I will demonstrate how to get up and running django-datatables-view as well as moving past that with some additional technologies which are popular at the moment and how to combine them all to make a working Django site.

In this example I have used two separate databases, the first for the Django admin and authentication and the other is a read only database which could be a real life scenario when you first want to start working with Django.

The sample database used is the the French Towns and Communes from pgfoundry.org.

I have only tested this project with Python 3.x (specifically 3.7.0b3), running on Linux Mint 19 Tara and Postgres SQL 10.5. In theory you should be able to use whatever database you have access to (SQLlite should also work).

Getting Started

  1. Clone this repository
git clone [email protected]:dre2004/django-datatables-boilerplate.git
  1. Install Django and other requirements
pip install -r requirements.txt
  1. Download sample database (French towns) from pgfoundry.org. If you're using Postgres the following instructions should get you up and running.
$ tar zxvf french-towns-communes-francaises-1.0.tar.gz
$ psql -U <INSERT YOUR DB USERNAME> -W postgres

postgres=# create database towns;
CREATE DATABASE
postgres=# create user readonly with password 'securepass123!';
postgres=# \c towns
You are now connected to database "towns" as user "postgres"
towns=# grant select on all tables in schema public to readonly;
GRANT
postgres=#\q

The commands above will need to be run as the postgres root user (typically postgres as seen in the example) or a user with the relevant privileges.

Prerequisites

What things you need to install the software and how to install them

  1. Python 3.x+ - See Python site for platform specific instructions.
  2. A working database server, my personal preference is Postgresql.
  3. Time and patients - This is a prerequisite for most things in life :).

Deployment

This code isn't production ready, so deploy at your own risk. As a guide the minimum you will need to do to get this production ready will be to add authentication / authorization to the admin app and review and harden the settings.py.

Built With

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

A Django boilerplate project that will showcase using the Datatables javascript library as well as some other modern front end tools.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published