0
votes
39
views
Django: Redirect HTTP to HTTPS
posted at July 12, 2018, 3:13 p.m. - 5 months, 1 week ago

Django: Redirect HTTP to HTTPS, basically the Django already support to handle this redirection at https://docs.djangoproject.com/en/dev/topics/security/#ssl-https Edit in your settings.py # Redirecting from `HTTP` to `HTTPS` for Django 1.8 or ...

0
votes
42
views
Create Command Line interfaces with Python
posted at July 12, 2018, 3:13 p.m. - 5 months, 1 week ago

Building command line programs has been a long time passion of mine. There’s something magical about making a simple, intuitive, and composable CLI. There’s also nothing more beautiful than chaining ...

linux python
0
votes
42
views
Quick to understanding git step by step
posted at July 12, 2018, 3:13 p.m. - 5 months, 1 week ago

Quick to understand git step by step. Git is a version control system that is used for software development and other version control tasks. As a distributed revision control system ...

git linux beginner
0
votes
41
views
Django Blog Python Learning released v.3.6 with feature autobackup
posted at July 12, 2018, 3:13 p.m. - 5 months, 1 week ago

Previously, the Django already has a method to backup the database to the json file with quick command: $ ./manage.py dumpdata --format=json > outfile.json Yup, with dumpdata. But why this ...

news python django project
0
votes
39
views
How to make cronjob for Django in Hosting, VPS or Server
posted at July 12, 2018, 3:13 p.m. - 5 months, 1 week ago

How to make cronjob for Django in Hosing, VPS or Server. This config also what we do in this site. For example, in your file of /yourproject/yourapp/management/commands/autobackup.py from django.core.management.base import ...

server linux django
0
votes
42
views
Remove all files .pyc with recrusive method
posted at July 12, 2018, 3:13 p.m. - 5 months, 1 week ago

Remove all files .pyc with recrusive method - This method simple but important. Example in your project dir is like this: project_dir/ __init__.py __init__.pyc something.py something.pyc ... core/ __init__.py __init__.pyc ...

0
votes
50
views
Change backend gmail to Postmarkapp for Django
posted at July 12, 2018, 3:13 p.m. - 5 months, 1 week ago

1. Install module of Python Postmark Install this module manually from souce inside your environtment: https://github.com/themartorana/python-postmark If you work on Django==1.9.*, requirements only mock. 2. Register and Put the Server ...

0
votes
35
views
Custom redirect urls django
posted at July 12, 2018, 3:13 p.m. - 5 months, 1 week ago

Example in this problem we need redirect the url http://localhost:8000/a/b/C/123/4/5/ to http://localhost:8000/abC12345 without / slash. 1. In your views.py from django.http import HttpResponse from django.views.generic.base import RedirectView from django.core.urlresolvers import ...

0
votes
44
views
E11000 duplicate key error index in mongodb
posted at July 12, 2018, 3:13 p.m. - 5 months, 1 week ago

E11000 duplicate key error index in mongodb. I found this error after migrating my field from “unique” to “non-unique”. And in this problem we use mongoengine for flask. First, i ...

0
votes
38
views
How to minify HTML output in Django
posted at July 12, 2018, 3:13 p.m. - 5 months, 1 week ago

So, you want to compress the size of the HTML that Django generates? Here is the Django way to do it. In order to do this, you’ll have to write ...