Skip to content

Instantly share code, notes, and snippets.

View sreevardhanreddi's full-sized avatar
💭
developer, developer, developer ...

sreevardhanreddi sreevardhanreddi

💭
developer, developer, developer ...
View GitHub Profile
@sreevardhanreddi
sreevardhanreddi / gunicorn.py
Last active September 12, 2020 06:50 — forked from HacKanCuBa/gunicorn.py
A config file of gunicorn(http://gunicorn.org/) contains fundamental configuration.
"""Gunicorn config file.
by HacKan (https://hackan.net)
Find it at: https://gist.github.com/HacKanCuBa/275bfca09d614ee9370727f5f40dab9e
Based on: https://gist.github.com/KodeKracker/6bc6a3a35dcfbc36e2b7
Changelog
=========
See revisions to access other versions of this file.
@sreevardhanreddi
sreevardhanreddi / django_deploy.md
Last active August 25, 2020 07:51 — forked from bradtraversy/django_deploy.md
Django Deployment - Digital Ocean

Django Deployment guide using Gunicorn and Nginx on Digital Ocean.

This is a summarized document from this digital ocean doc

Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server

Security & Access

Creating SSH keys (Optional)

@sreevardhanreddi
sreevardhanreddi / sample.md
Last active February 27, 2019 12:38 — forked from bradtraversy/sample.md
Markdown Cheat Sheet

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

This text is italic

@sreevardhanreddi
sreevardhanreddi / login_required.py
Created February 21, 2019 07:07 — forked from robgolding/login_required.py
Django Class-Based View Mixins: Part 1
class LoginRequiredMixin(object):
"""
View mixin which requires that the user is authenticated.
"""
@method_decorator(login_required)
def dispatch(self, request, *args, **kwargs):
return super(LoginRequiredMixin, self).dispatch(
self, request, *args, **kwargs)