This file contains 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
server { | |
listen 80; | |
server_name sentry.roadside-developer.com; | |
access_log /var/log/nginx/access.sentry.roadside-developer.com; | |
gzip on; | |
gzip_proxied any; | |
gzip_types text/plain application/xml application/x-javascript text/javascript text/css; | |
location / { |
This file contains 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 os | |
import imp | |
import shutil | |
import pkgutil | |
import logging | |
from optparse import make_option | |
from django.core.management.base import BaseCommand, CommandError |
This file contains 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
server { | |
server_name domain.tld; | |
root /var/www/zenphoto; | |
index index.php; | |
# pass the PHP scripts to php-fpm server | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; |
This file contains 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
from functools import update_wrapper | |
from django.conf import settings | |
from django.utils.decorators import classonlymethod | |
from django.views.generic.base import TemplateResponseMixin | |
from haystack.query import SearchQuerySet | |
from haystack.forms import FacetedSearchForm | |
from haystack.views import FacetedSearchView as HaystackFacetedSearchView |
This file contains 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
""" | |
The following mixins and views are borrowed and adapted from the following | |
gist: | |
https://gist.github.com/michelts/1029336 | |
""" | |
from functools import partial | |
from django.views.generic.base import TemplateResponseMixin | |
from django.views.generic.edit import ProcessFormView, FormMixin |
This file contains 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
from myproject.utils import loaddata | |
class Migration(DataMigration): | |
def forwards(self, orm): | |
loaddata(orm, 'some_fancy_fixture.json') |
This file contains 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 xml | |
from boto.mws import response | |
from boto.handler import XmlHandler | |
from boto.mws.connection import MWSConnection | |
from unittest import TestCase | |
NESTED_MEMBER_LIST_XML = """<GetTestResponse> |
This file contains 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
====================================================================== | |
ERROR: upload devices from inventory file | |
---------------------------------------------------------------------- | |
File "/usr/lib/python2.7/unittest/case.py", line 332, in run | |
testMethod() | |
File "/home/elbaschid/Worx/Tangent/vodafone/tests/eshop/functional/test_upload_inventory.py", line 114, in test_upload_inventory | |
after_save_page = save_form.submit().maybe_follow() | |
File "/home/elbaschid/.virtualenvs/vodafone/local/lib/python2.7/site-packages/webtest/forms.py", line 538, in submit | |
params=fields, **args) | |
File "/home/elbaschid/.virtualenvs/vodafone/local/lib/python2.7/site-packages/webtest/response.py", line 293, in goto |
This file contains 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
from xhtml2pdf import pisa | |
from xhtml2pdf.pdf import pisaPDF | |
class OrderListView(ListView, BulkEditMixin): | |
... | |
actions = ( | |
'generate_packing_slips', | |
... |
This file contains 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
{% load staticfiles %} | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<style type="text/css"> | |
@page { | |
size: a4 portrait; | |
margin: 1cm; | |
margin-left:2cm; | |
margin-right:2cm; |
OlderNewer