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
| <p>Copyright © {% now "Y" %} <strong>My Company</strong>. All Rights Reserved.</p> |
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
| def work: | |
| while work: | |
| reload_coffee('30 mins') |
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
| # Static media | |
| (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), | |
| (r'^media/admin/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.ADMIN_MEDIA_PREFIX}), |
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 myapp.models import * | |
| class MultiDBModelAdmin(admin.ModelAdmin): | |
| using = 'mydb' | |
| def save_model(self, request, obj, form, change): | |
| obj.save(using=self.using) | |
| def queryset(self, request): |
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://www.tinyfluidgrid.com/ | |
| */ | |
| .grid_1 { width: 5%; } | |
| .grid_2 { width: 11.25%; } | |
| .grid_3 { width: 17.5%; } | |
| .grid_4 { width: 23.75%; } | |
| .grid_5 { width: 30%; } | |
| .grid_6 { width: 36.25%; } | |
| .grid_7 { width: 42.5%; } |
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
| DATABASES = { | |
| 'dbSqlite': { | |
| 'ENGINE': 'django.db.backends.sqlite3', | |
| 'NAME': 'data.db3', | |
| 'USER': '', | |
| 'PASSWORD': '', | |
| 'HOST': '', | |
| 'PORT': '', | |
| }, | |
| 'dbFirebird': { |
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 get_ajax(link, para) { | |
| $.get(link, { para }, function(data) { | |
| $('#ajax-data').html(data); | |
| }); | |
| } | |
| $(document).ready(function() { | |
| // Datepicker | |
| $("#date_picker").datepicker({dateFormat: 'yy/mm/dd'}); | |
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
| /* Gradient */ | |
| background-image: -moz-linear-gradient( center bottom, | |
| rgb(22,21,18) 22%, | |
| rgb(49,49,45) 61%, | |
| rgb(79,79,72) 81% ); | |
| background-image: -webkit-gradient( linear, | |
| left bottom, | |
| left top, | |
| color-stop(0.22, rgb(22,21,18)), |
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
| h1 {text-decoration:overline} | |
| h2 {text-decoration:line-through} | |
| h3 {text-decoration:underline} | |
| h4 {text-decoration:blink} | |
| background:red url(image.png) repeat top left scroll; | |
| font:bold 1em/1.2em georgia,"times new roman",serif; | |
| border:5px solid red; |
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
| """ | |
| Here's my sample Django settings for a project I recently did. Visit http://damonjablons.wordpress.com to see the explanation. | |
| """ | |
| import os | |
| import socket | |
| # Set DEBUG = True if on the production server | |
| if socket.gethostname() == 'your.domain.com': | |
| DEBUG = False |
OlderNewer