Django REST framework Quickstart
Project setup # Create the project directory $ mkdir tutorial $ cd tutorial # Create a virtualenv to isolate our
Continue readingEverything should be made as simple as possible, but not simpler – Einstein
Project setup # Create the project directory $ mkdir tutorial $ cd tutorial # Create a virtualenv to isolate our
Continue readingInstall or upgrade the httpie with pip to test RESTful Django application apis. $ pip install –upgrade httpie Then, with
Continue readingTo add ‘django_filters’ in INSTALLED_APPS, django-filter should be installed. Notice that there is no s at the end of the
Continue readingWith python 2.x use virtualenv $ virtualenv env This will make a virtual environment with current python version. If current
Continue readingfrom: http://django-debug-toolbar.readthedocs.io/en/stable/installation.html To install and activate debug_toolbar, $ pip install django-debug-toolbar add ‘debug_toolbar’ to INSTALLED_APPS settings. Make sure the ‘django.contrib.staticfiles’ is
Continue readingfrom: https://stackoverflow.com/questions/31275574/reverse-for-success-url-on-django-class-based-view-complain-about-circular-impor for the classes inherited from generic.edit.CreateView, success_url = url.name does not work because: Using reverse in your method works
Continue readingUse following python template: #!/usr/bin/python import os import filecmp, shutil, tempfile NAMESPACE = “jachong” DATA_SECTION_BEGIN = “[DATA]” WARNING = “””
Continue readingFrom: https://docs.python.org/3/library/pdb.html Source code: Lib/pdb.py The module pdb defines an interactive source code debugger for Python programs. It supports setting
Continue readingFrom: http://stackoverflow.com/questions/1878710/struct-objects-in-python A most concise way to make “a generic object to which you can assign/fetch attributes” is probably: item
Continue reading
Recent Comments