All Posts Create a Post  
0
votes
395
views
Custom redirect urls django
Posted at 1 year ago / Oct. 11, 2020, 8:04 a.m.

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 …

146 3 3 0
0
votes
268
views
Change backend gmail to Postmarkapp for Django
Posted at 1 year ago / Oct. 11, 2020, 8:04 a.m.

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 …

146 3 3 0
0
votes
263
views
Remove all files .pyc with recrusive method
Posted at 1 year ago / Oct. 11, 2020, 8:04 a.m.

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 …

146 3 3 0
0
votes
255
views
How to make cronjob for Django in Hosting, VPS or Server
Posted at 1 year ago / Oct. 11, 2020, 8:04 a.m.

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 …

146 3 3 0
0
votes
273
views
Django Blog Python Learning released v.3.6 with feature autobackup
Posted at 1 year ago / Oct. 11, 2020, 8:04 a.m.

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 …

146 3 3 0
0
votes
254
views
Quick to understanding git step by step
Posted at 1 year ago / Oct. 11, 2020, 8:04 a.m.

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 …

146 3 3 0
0
votes
259
views
Create Command Line interfaces with Python
Posted at 1 year ago / Oct. 11, 2020, 8:04 a.m.

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 …

146 3 3 0
0
votes
263
views
Django: Redirect HTTP to HTTPS
Posted at 1 year ago / Oct. 11, 2020, 8:04 a.m.

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 …

146 3 3 0
0
votes
256
views
Understanding Google reCAPTCHA in Django
Posted at 1 year ago / Oct. 11, 2020, 8:04 a.m.

Understanding Google reCAPTCHA in Django. I found this awesome answer to simply understand how to use API from Google reCAPTCHA. import urllib, urllib2 def recaptcha(request, postdata): rc_challenge = postdata.get('recaptcha_challenge_field', '') …

146 3 3 0
0
votes
288
views
Djipsum: Plugin to generate the lorem ipsum (fake content) for django model
Posted at 1 year ago / Oct. 11, 2020, 8:04 a.m.

Djipsum Plugin to generate the lorem ipsum (fake content) for django model. Sometimes, I feel bored when i want to create many contents such as fake content in once time. …

146 3 3 0
  Page 10 of 11