Docs - Topic Guides
for p in Person.objects.raw('SELECT * FROM myapp_person')
print(p)
https://docs.djangoproject.com/en/2.0/topics
How to Guides
- Authentication usingREMOTE_USER
- Writing customdjango-admincommands
- Writing custom model fields
- Custom Lookups
- Custom template tags and filters
- Writing a custom storage system
- Deploying Django
- Upgrading Django to a newer version
- Error reporting
- Providing initial data for models
- Django on Jython
- Integrating Django with a legacy database
- Outputting CSV with Django
- Outputting PDFs with Django
- Overriding templates
- Managing static files (e.g. images, JavaScript, CSS)
- Deploying static files
- How to install Django on Windows
- Writing database migrations
https://docs.djangoproject.com/en/2.0/howto
API Reference
- Applications
- System check framework
- Built-in class-based views API
- Clickjacking Protection
- contribpackages
- Cross Site Request Forgery protection
- Databases
- django-adminandmanage.py
- Running management commands from your code
- Django Exceptions
- File handling
- Forms
- Middleware
- Migration Operations
- Models
- Request and response objects
- SchemaEditor
- Settings
- Signals
- Templates
- TemplateResponse and SimpleTemplateResponse
- Unicode data
- django.urlsutility functions
- django.urlsfunctions for use in URLconfs
- django.conf.urlsfunctions for use in URLconfs
- Django Utils
- Validators
- Built-in Views
https://docs.djangoproject.com/en/2.0/ref
Management Command
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument(
'--customer',
action='store',
dest='customer_name',
default=None,
help='Customer name for which device dump has to be generated'
)
parser.add_argument(
'--only_upload_folder_name',
action='store',
dest='only_upload_folder_name',
default=None,
help="Set to true if generated files for a customer only need to be uploaded to drive"
)
def handle(self, *args, **options):
customer_name = options ['customer_name']
only_upload_folder_name = options ['only_upload_folder_name']