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
| from django.contrib import admin | |
| from django.utils.translation import ugettext_lazy as _ | |
| from atdfb.core.models import Complaint | |
| class ComplaintAdmin(admin.ModelAdmin): | |
| list_display = ('order_number', 'subject', 'message', 'created_at', 'solved_by', 'checked',) | |
| def get_readonly_fields(self, request, obj=None): | |
| if request.user.has_perm('core.can_edit_fields'): | |
| readonly = ('solved_by',) |
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
| <div id="container"> | |
| <div id="i1"></div> | |
| </div> |
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
| <?php | |
| function replace_accents($string) | |
| { | |
| return str_replace( array('à','á','â','ã','ä', 'ç', 'è','é','ê','ë', 'ì','í','î','ï', 'ñ', 'ò','ó','ô','õ','ö', 'ù','ú','û','ü', 'ý','ÿ', 'À','Á','Â','Ã','Ä', 'Ç', 'È','É','Ê','Ë', 'Ì','Í','Î','Ï', 'Ñ', 'Ò','Ó','Ô','Õ','Ö', 'Ù','Ú','Û','Ü', 'Ý'), array('a','a','a','a','a', 'c', 'e','e','e','e', 'i','i','i','i', 'n', 'o','o','o','o','o', 'u','u','u','u', 'y','y', 'A','A','A','A','A', 'C', 'E','E','E','E', 'I','I','I','I', 'N', 'O','O','O','O','O', 'U','U','U','U', 'Y'), $string); | |
| } |
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
| <img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt=""> |
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
| function isObj(obj) { | |
| var globalObject = window.Object; | |
| return globalObj.prototype.toString.call(obj) == '[object Object]' && | |
| obj.constructor === globalObject; | |
| } |
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
| define('delayable-xhr', [ | |
| 'dojo/request/xhr', | |
| 'dojo/request/util', | |
| 'dojo/Deferred' | |
| ], function ( | |
| xhr, | |
| util, | |
| Deferred | |
| ) { | |
| 'use strict'; |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset=utf-8 /> | |
| <title>JS Bin</title> | |
| <link href="http://ajax.googleapis.com/ajax/libs/dojo/1.9.1/dijit/themes/claro/claro.css" | |
| rel="stylesheet" | |
| type="text/css" | |
| > | |
| <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.9.1/dojo/dojo.js" |
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
| mkdir heroku | |
| cd heroku/ | |
| virtualenv --no-site-packages env | |
| source env/bin/activate | |
| pip install bottle gevent | |
| pip freeze > requirements.txt | |
| cat >app.py <<EOF | |
| import bottle | |
| import os |
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
| from django.template import TemplateDoesNotExist | |
| def load_template_source(template_name, template_dirs=None): | |
| try: | |
| return open(template_name).read(), template_name | |
| except IOError: | |
| raise TemplateDoesNotExist, template_name |
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
| define('InfiniteIterator', [ | |
| 'dojox/collections/_base', | |
| 'dojo/_base/lang' | |
| ], function ( | |
| dxc, | |
| lang | |
| ) { | |
| 'use strict'; | |
| function InfiniteIterator(array) { |