This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Django", | |
| "type": "python", | |
| "request": "launch", | |
| "stopOnEntry": false, | |
| "pythonPath": "${workspaceRoot}/venv/bin/python3.4", | |
| "program": "${workspaceRoot}/manage.py", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -o errexit | |
| # Author: David Underhill | |
| # Script to permanently delete files/folders from your git repository. To use | |
| # it, cd to your repository's root and then run the script with a list of paths | |
| # you want to delete, e.g., git-delete-history path1 path2 | |
| if [ $# -eq 0 ]; then | |
| exit 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| heroku pg:reset SHARED_DATABASE --confirm appname | |
| heroku run appname/manage.py migrate | |
| heroku run appname/manage.py createsuperuser | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Orignal version taken from http://www.djangosnippets.org/snippets/186/ | |
| # Original author: udfalkso | |
| # Modified by: Shwagroo Team and Gun.io | |
| import sys | |
| import os | |
| import re | |
| import hotshot, hotshot.stats | |
| import tempfile | |
| import StringIO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| fabfile for Django | |
| ------------------ | |
| see http://morethanseven.net/2009/07/27/fabric-django-git-apache-mod_wsgi-virtualenv-and-p/ | |
| modified for fabric 0.9/1.0 by Hraban (fiëé visuëlle) | |
| several additions, corrections and customizations, too |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http { | |
| # Default virtual host for www.example.com. This will pick up all HTTP | |
| # requests to port 80 that are not for one of the other virtual hosts. | |
| server { | |
| listen 80; | |
| server_name www.example.com; | |
| # ...your server config here... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import datetime | |
| from django.conf import settings | |
| from django.contrib.auth import logout | |
| from django.contrib.auth.models import User | |
| from django.contrib.sessions.models import Session | |
| from django.http import HttpRequest | |
| from django.utils.importlib import import_module | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {# use in combination with https://github.com/zyga/django-pagination #} | |
| {# and http://twitter.github.com/bootstrap/ #} | |
| {# project-dir/templates/pagination/pagination.html #} | |
| {% if is_paginated %} | |
| {% load i18n %} | |
| <div class="pagination"> | |
| <ul> | |
| {% block previouslink %} | |
| {% if page_obj.has_previous %} |