Skip to content

Commit f3e4bbe

Browse files
author
Adi Chirilov
committed
v1.0.0 - Initial Release
1 parent 91842d8 commit f3e4bbe

File tree

303 files changed

+59015
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

303 files changed

+59015
-1
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
DEBUG=True
2+
SECRET_KEY=S3cr3t_K#Key
3+
SERVER=material-dashboard-django.creative-tim.com

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
5+
# tests and coverage
6+
*.pytest_cache
7+
.coverage
8+
9+
# database & logs
10+
*.db
11+
*.sqlite3
12+
*.log
13+
14+
# venv
15+
env
16+
venv
17+
18+
# other
19+
.DS_Store
20+
21+
# javascript
22+
package-lock.json
23+
24+
staticfiles/*
25+
!staticfiles/.gitkeep
26+
.vscode/symbols.json

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Change Log
2+
3+
4+
## [1.0.0] 2020-07-30
5+
### Initial Release

Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM python:3.6
2+
3+
ENV FLASK_APP run.py
4+
5+
COPY manage.py gunicorn-cfg.py requirements.txt .env ./
6+
COPY app app
7+
COPY authentication authentication
8+
COPY core core
9+
10+
RUN pip install -r requirements.txt
11+
12+
RUN python manage.py makemigrations
13+
RUN python manage.py migrate
14+
15+
EXPOSE 5005
16+
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "core.wsgi"]

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 - present Creative-Tim / AppSeed.us
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: gunicorn core.wsgi --log-file=-

README.md

Lines changed: 202 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,202 @@
1-
# material-dashboard-django
1+
# [Material Dashboard Django](https://www.creative-tim.com/product/material-dashboard-django) [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&logo=twitter)](https://twitter.com/home?status=Material%20Dashboard,%20a%20free%20Material%20Bootstrap%204%20Admin%20Template%20%E2%9D%A4%EF%B8%8F%20https%3A//bit.ly/2Lyat1Y%20%23bootstrap%20%23material%20%23design%20%23developers%20%23freebie%20%20via%20%40CreativeTim)
2+
3+
![version](https://img.shields.io/badge/version-1.0.0-blue.svg) [![GitHub issues open](https://img.shields.io/github/issues/creativetimofficial/material-dashboard-django.svg?maxAge=2592000)](https://github.com/creativetimofficial/material-dashboard-django/issues?q=is%3Aopen+is%3Aissue) [![GitHub issues closed](https://img.shields.io/github/issues-closed-raw/creativetimofficial/material-dashboard-django.svg?maxAge=2592000)](https://github.com/creativetimofficial/material-dashboard-django/issues?q=is%3Aissue+is%3Aclosed) [![Join the chat at https://gitter.im/NIT-dgp/General](https://badges.gitter.im/NIT-dgp/General.svg)](https://gitter.im/creative-tim-general/Lobby) [![Chat](https://img.shields.io/badge/chat-on%20discord-7289da.svg)](https://discord.gg/E4aHAQy)
4+
5+
![Material Dashboard Django - Admin Dashboard coded in Django.](https://github.com/creativetimofficial/material-dashboard-django/blob/master/media/material-dashboard-django-intro.gif)
6+
7+
<br />
8+
9+
> Free product - **Django Dashboard** starter project - Features:
10+
11+
- UI Kit: **Material Dashboard** (Free Version) provided by **[Creative-Tim](https://www.creative-tim.com/)**
12+
- [Codebase](https://github.com/app-generator/boilerplate-code-django-dashboard) version v1.0.2 - provided by **[AppSeed](https://appseed.us/)**
13+
- UI-Ready app, SQLite Database, Django Native ORM
14+
- Modular design, clean code-base
15+
- Session-Based Authentication, Forms validation
16+
- Deployment scripts: Docker, Gunicorn / Nginx
17+
18+
<br />
19+
20+
## Table of Contents
21+
22+
* [Demo](#demo)
23+
* [Quick Start](#quick-start)
24+
* [Documentation](#documentation)
25+
* [File Structure](#file-structure)
26+
* [Browser Support](#browser-support)
27+
* [Resources](#resources)
28+
* [Reporting Issues](#reporting-issues)
29+
* [Technical Support or Questions](#technical-support-or-questions)
30+
* [Licensing](#licensing)
31+
* [Useful Links](#useful-links)
32+
33+
<br />
34+
35+
## Demo
36+
37+
> To authenticate use the default credentials ***test / ApS12_ZZs8*** or create a new user on the [registration page](https://creativetim-django-dashboard-black-pro.appseed.us/register/).
38+
39+
- **Material Dashboard Django** [Login Page](https://www.creative-tim.com/live/material-dashboard-django)
40+
41+
<br />
42+
43+
## Quick start
44+
45+
> UNZIP the sources or clone the private repository. After getting the code, open a terminal and navigate to the working directory, with product source code.
46+
47+
```bash
48+
$ # Get the code
49+
$ git clone https://github.com/creativetimofficial/material-dashboard-django.git
50+
$ cd material-dashboard-django
51+
$
52+
$ # Virtualenv modules installation (Unix based systems)
53+
$ virtualenv env
54+
$ source env/bin/activate
55+
$
56+
$ # Virtualenv modules installation (Windows based systems)
57+
$ # virtualenv env
58+
$ # .\env\Scripts\activate
59+
$
60+
$ # Install modules - SQLite Storage
61+
$ pip3 install -r requirements.txt
62+
$
63+
$ # Create tables
64+
$ python manage.py makemigrations
65+
$ python manage.py migrate
66+
$
67+
$ # Start the application (development mode)
68+
$ python manage.py runserver # default port 8000
69+
$
70+
$ # Start the app - custom port
71+
$ # python manage.py runserver 0.0.0.0:<your_port>
72+
$
73+
$ # Access the web app in browser: http://127.0.0.1:8000/
74+
```
75+
76+
> Note: To use the app, please access the registration page and create a new user. After authentication, the app will unlock the private pages.
77+
78+
<br />
79+
80+
## Documentation
81+
The documentation for the **Material Dashboard Django** is hosted at our [website](https://demos.creative-tim.com/material-dashboard-django/docs/1.0/getting-started/getting-started-django.html).
82+
83+
<br />
84+
85+
## File Structure
86+
Within the download you'll find the following directories and files:
87+
88+
```bash
89+
< PROJECT ROOT >
90+
|
91+
|-- core/ # Implements app logic and serve the static assets
92+
| |-- settings.py # Django app bootstrapper
93+
| |-- wsgi.py # Start the app in production
94+
| |-- urls.py # Define URLs served by all apps/nodes
95+
| |
96+
| |-- static/
97+
| | |-- <css, JS, images> # CSS files, Javascripts files
98+
| |
99+
| |-- templates/ # Templates used to render pages
100+
| |
101+
| |-- includes/ # HTML chunks and components
102+
| | |-- navigation.html # Top menu component
103+
| | |-- sidebar.html # Sidebar component
104+
| | |-- footer.html # App Footer
105+
| | |-- scripts.html # Scripts common to all pages
106+
| |
107+
| |-- layouts/ # Master pages
108+
| | |-- base-fullscreen.html # Used by Authentication pages
109+
| | |-- base.html # Used by common pages
110+
| |
111+
| |-- accounts/ # Authentication pages
112+
| | |-- login.html # Login page
113+
| | |-- register.html # Register page
114+
| |
115+
| index.html # The default page
116+
| page-404.html # Error 404 page
117+
| page-500.html # Error 404 page
118+
| *.html # All other HTML pages
119+
|
120+
|-- authentication/ # Handles auth routes (login and register)
121+
| |
122+
| |-- urls.py # Define authentication routes
123+
| |-- views.py # Handles login and registration
124+
| |-- forms.py # Define auth forms
125+
|
126+
|-- app/ # A simple app that serve HTML files
127+
| |
128+
| |-- views.py # Serve HTML pages for authenticated users
129+
| |-- urls.py # Define some super simple routes
130+
|
131+
|-- requirements.txt # Development modules - SQLite storage
132+
|
133+
|-- .env # Inject Configuration via Environment
134+
|-- manage.py # Start the app - Django default start script
135+
|
136+
|-- ************************************************************************
137+
```
138+
139+
<br />
140+
141+
## Browser Support
142+
143+
At present, we officially aim to support the last two versions of the following browsers:
144+
145+
<img src="https://s3.amazonaws.com/creativetim_bucket/github/browser/chrome.png" width="64" height="64"> <img src="https://s3.amazonaws.com/creativetim_bucket/github/browser/firefox.png" width="64" height="64"> <img src="https://s3.amazonaws.com/creativetim_bucket/github/browser/edge.png" width="64" height="64"> <img src="https://s3.amazonaws.com/creativetim_bucket/github/browser/safari.png" width="64" height="64"> <img src="https://s3.amazonaws.com/creativetim_bucket/github/browser/opera.png" width="64" height="64">
146+
147+
<br />
148+
149+
## Resources
150+
151+
- Demo: <https://www.creative-tim.com/live/material-dashboard-django>
152+
- Download Page: <https://www.creative-tim.com/product/material-dashboard-django>
153+
- Documentation: <https://demos.creative-tim.com/material-dashboard-django/docs/1.0/getting-started/getting-started-django.html>
154+
- License Agreement: <https://www.creative-tim.com/license>
155+
- Support: <https://www.creative-tim.com/contact-us>
156+
- Issues: [Github Issues Page](https://github.com/creativetimofficial/material-dashboard-django/issues)
157+
158+
<br />
159+
160+
## Reporting Issues
161+
162+
We use GitHub Issues as the official bug tracker for the **Material Dashboard Django**. Here are some advices for our users that want to report an issue:
163+
164+
1. Make sure that you are using the latest version of the **Material Dashboard Django**. Check the CHANGELOG from your dashboard on our [website](https://www.creative-tim.com/).
165+
2. Providing us reproducible steps for the issue will shorten the time it takes for it to be fixed.
166+
3. Some issues may be browser-specific, so specifying in what browser you encountered the issue might help.
167+
168+
<br />
169+
170+
## Technical Support or Questions
171+
172+
If you have questions or need help integrating the product please [contact us](https://www.creative-tim.com/contact-us) instead of opening an issue.
173+
174+
<br />
175+
176+
## Licensing
177+
178+
- Copyright 2019 - present [Creative Tim](https://www.creative-tim.com/)
179+
- Licensed under [Creative Tim EULA](https://www.creative-tim.com/license)
180+
181+
<br />
182+
183+
## Useful Links
184+
185+
- [More products](https://www.creative-tim.com/bootstrap-themes) from Creative Tim
186+
- [Tutorials](https://www.youtube.com/channel/UCVyTG4sCw-rOvB9oHkzZD1w)
187+
- [Freebies](https://www.creative-tim.com/bootstrap-themes/free) from Creative Tim
188+
- [Affiliate Program](https://www.creative-tim.com/affiliates/new) (earn money)
189+
190+
<br />
191+
192+
## Social Media
193+
194+
- Twitter: <https://twitter.com/CreativeTim>
195+
- Facebook: <https://www.facebook.com/CreativeTim>
196+
- Dribbble: <https://dribbble.com/creativetim>
197+
- Instagram: <https://www.instagram.com/CreativeTimOfficial>
198+
199+
<br />
200+
201+
---
202+
[Material Dashboard Django](https://www.creative-tim.com/product/material-dashboard-django) - Provided by [Creative Tim](https://www.creative-tim.com/) and [AppSeed](https://appseed.us)

app/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""

app/admin.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""
5+
6+
from django.contrib import admin
7+
8+
# Register your models here.

app/config.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""
5+
6+
from django.apps import AppConfig
7+
8+
class MyConfig(AppConfig):
9+
name = 'cfg'

app/migrations/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""

app/models.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""
5+
6+
from django.db import models
7+
from django.contrib.auth.models import User
8+
9+
# Create your models here.
10+

app/tests.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""
5+
6+
from django.test import TestCase
7+
8+
# Create your tests here.

app/urls.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""
5+
6+
from django.urls import path, re_path
7+
from app import views
8+
9+
urlpatterns = [
10+
11+
# The home page
12+
path('', views.index, name='home'),
13+
14+
# Matches any html file
15+
re_path(r'^.*\.*', views.pages, name='pages'),
16+
17+
]

app/views.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""
5+
6+
from django.contrib.auth.decorators import login_required
7+
from django.shortcuts import render, get_object_or_404, redirect
8+
from django.template import loader
9+
from django.http import HttpResponse
10+
from django import template
11+
12+
@login_required(login_url="/login/")
13+
def index(request):
14+
return render(request, "index.html")
15+
16+
@login_required(login_url="/login/")
17+
def pages(request):
18+
context = {}
19+
# All resource paths end in .html.
20+
# Pick out the html file name from the url. And load that template.
21+
try:
22+
23+
load_template = request.path.split('/')[-1]
24+
html_template = loader.get_template( load_template )
25+
return HttpResponse(html_template.render(context, request))
26+
27+
except template.TemplateDoesNotExist:
28+
29+
html_template = loader.get_template( 'page-404.html' )
30+
return HttpResponse(html_template.render(context, request))
31+
32+
except:
33+
34+
html_template = loader.get_template( 'page-500.html' )
35+
return HttpResponse(html_template.render(context, request))

authentication/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""

authentication/admin.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""
5+
6+
from django.contrib import admin
7+
8+
# Register your models here.

0 commit comments

Comments
 (0)