• Stars
    star
    106
  • Rank 324,092 (Top 7 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An awesome Django + Bootstrap4 project template for Django 2.0+ include IOT restful api

ran-django-template


python3.5 python3.6 python3.7 django3.0 Build Status

Feature

For Site

  • Create Django web server in local
  • Gallery and carousel control in home page
  • Beautify site admin interface
  • Restful API for IOT control
  • Oauth2.0 for third party account login,such as: Github
  • QR code generator
  • PC, Mobile auto adaptation
  • Support Font awesome, django-jet, Bootstrap, Animate.css

For Blog

  • Rich text editor
  • Article management and counting, including adding, deleting and editing
  • Tag management, including adding, deleting and editing
  • Classified management, including adding, deleting and editing
  • Read more

Documentation

Add INSTALLED_APPS setting:

    INSTALLED_APPS = [
		'jet.dashboard', #  before your django admin
		'jet',	#  before your django admin
	    	'apps.gallery.apps.GalleryConfig',
		'allauth',
		'allauth.account',
		'allauth.socialaccount',
		'allauth.socialaccount.providers.github',
		'myauth',
		'widget_tweaks',
		'werkzeug_debugger_runserver',
		'django_extensions',
		'rest_framework',
		'apps.myapp',
		'apps.blogs',
		'apps.qrcreate',
		'apps.blog',    # Blog for new version
		'django_summernote',
    ]

How to run it

git clone https://github.com/nature1995/ran-django-template.git
cd ran-django-template
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
python manage.py runserver 0.0.0.0:8000

Access the web page though this link: http://0.0.0.0:8000/

Compatibility

The codes are tested using Travis-CI platform with django 2.1.5 and Python 3.5, 3.6, 3.7.

Django\Python 3.5 3.6 3.7
2.0.x * * *
2.1.x * * *
3.0.0 * * *

Notice:

  1. Because the jet admin do not support django==3.0.0. Please remove jet in setting.py and urls.py, if you would like to use django == 3.0.0

  2. Django 2.1.x need to using the following change:**

If you have the ERROR message with render() got an unexpected keyword argument 'renderer';, please find Python folder: \lib\site-packages\django\forms\boundfield.py. Then, comment the as_widget, line 93, like the follow:

return widget.render(
	name=self.html_initial_name if only_initial else self.html_name,
	value=self.value(),
	attrs=attrs,
	# renderer=self.form.renderer,
)

Demo

Web Page: https://ranxiaolang.com or https://www.zran.xyz

image

Result01.png

Result01.png Result03.png

Result01.png Result03.png Result02.png

Site Admin installation

Add 'jet.dashboard' application to the INSTALLED_APPS setting of your Django project settings.py file (note it should be before 'jet'):

INSTALLED_APPS = (
    ...
    'jet.dashboard',  # before your django admin
    'jet',  # before your django admin
    'django.contrib.admin',
    ...
)

Add URL-pattern to the urlpatterns of your Django project urls.py file (they are needed for related–lookups and autocompletes): before 'jet'):

urlpatterns = patterns(
    ...
    path(r'admin/', admin.site.urls),
    path('jet/', include('jet.urls', 'jet')),  # Django JET URLS
    path('jet/dashboard/', include('jet.dashboard.urls', 'jet-dashboard')),  # Django JET dashboard URLS
    ...
)
before 'jet'):

For Google Analytics widgets only install python package:

pip install google-api-python-client==1.4.1

Create database tables:

python manage.py migrate dashboard
# or
python manage.py syncdb

Collect static if you are in production environment: before 'jet'):

python manage.py collectstatic

Others

Admin Account

python manage.py createsuperuser

username: ranxiaolang
email: YOUR EMAIL  
password: ranxiaolang  

Access the web page though this link: http://0.0.0.0:8000/admin

Django Restframework
Access the web page though this link: http://0.0.0.0:8000/iot/

TODO

  • Add more social Oauth2.0
  • Add comment
  • Add site map

Author

License

This software is licensed under the GNU General Public License v3.0 License. For more information, read the file LICENSE.
Just can be used for non-business projects.

More Repositories

1

Face-Recognition-System

Intelligent Facial Recognition with Django Restful IoT on Raspberry Pi
Python
49
star
2

lanqiao-competition-code

蓝桥杯大赛(嵌入式与开发组)——历年比赛试题与源码 | Author: Ziran Gong(龚子然)
C
43
star
3

AI-Image-classifiers-on-Django-with-RESTAPI

A Keras deep learning image classifiers on Django server with REST API | Django 图片识别平台
Python
36
star
4

Flight-Delay-Prediction

💡🚁2018 Fall EE608 Final Project: Flight Delay Prediction
Jupyter Notebook
13
star
5

Vue-Django-Shop-Website

A Vue.js frontend and Django REST framework backend shop website. (生鲜超市后端代码)
Python
8
star
6

django-penetration-testing

A penetration testing management platform based on django.
Python
6
star
7

Vue-Django-Shop-Frontend

A Vue.js frontend and Django REST framework backend shop website. (生鲜超市前端代码)
Vue
6
star
8

Leetcode-Python3

Leetcode-Python3 Solution | Author: Ziran Gong
Python
5
star
9

Flutter-beautiful-app

Flutter beautiful app tutorial project | Author: Ziran Gong
Dart
5
star
10

nature1995.github.io

🐳个人博客(Blog)源代码 (US: https://nature1995.club | CN: https://cn.nature1995.club)
HTML
3
star
11

Image-classifiers-on-Django-with-RESTAPI-V2

A Keras deep learning image classifiers on Django server with REST API | Django 图片识别平台V2
Python
3
star
12

Blog2

Legacy for Blog | Author Ziran Gong
HTML
1
star
13

Dj-Word-count

Word count function base on Django by Ziran Gong
Python
1
star
14

weather-forecast-alert

🌈☁️Weather forecasts with chart display and notifications
Python
1
star
15

Dj-personal-web

Website
Python
1
star
16

angry-duckhacks

A speech sentiment text recorder for improve communication by Flask, GCP, Javascript
JavaScript
1
star
17

cncamp

云原生训练营3期作业
Go
1
star
18

text2audio-Baidu

It a project for text2audio though Baidu API
Jupyter Notebook
1
star
19

image-classify-django-server

1
star