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
SELECT DISTINCT cms.ID | |
FROM dt_cms_schema.CMSStory cms, dbo.AdDbPageInfo adbpi, dbo.StoryPageElements spe, dbo.Story s, dbo.SubCategory sc, dbo.status st, dbo.Desk d | |
WHERE (adbpi.runDate BETWEEN '2011-04-27' AND '2011-08-05') | |
AND cms.story->storyId = s.storyId | |
AND sc.subCategoryId = 191173 | |
AND s.storyId = spe.storyId | |
AND spe.logicalPagesId = adbpi.logicalPageId | |
AND s.subCategoryId = sc.subCategoryId | |
AND s.StatusId = st.StatusId | |
AND s.deskId = d.deskId |
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
/* Show map until loaded? | |
http://groups.google.com/group/google-maps-js-api-v3/msg/a9dda851790a6c54 | |
*/ | |
function showCrossHair(divId) { | |
var mmap = document.getElementById(divId); | |
var div = document.createElement('div'); | |
div.id = 'crossHair'; | |
div.style.position = 'absolute'; | |
div.style.padding = '0'; |
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 django.contrib import admin | |
from myapp.models import Foo | |
from myapp.forms import FooForm | |
class FooAdmin(admin.ModelAdmin): | |
form = FooForm | |
prepopulated_fields = { 'slug': ['title'] } |
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 django.contrib import admin | |
from django.contrib.admin.views.main import ChangeList | |
from <app>.models import Foo, Bar, Baz | |
from <app>.forms import BazForm | |
# https://docs.djangoproject.com/en/dev/ref/contrib/admin/ | |
#-------------------------------------------------------------------------- | |
# | |
# Classes: |
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
# ... | |
# Note: I put the CKEditor package in my "static" folder. | |
# The below "Media" paths are relative to STATIC_URL. | |
# Don't forget to collectstatic for your <app_name> css/js. | |
class FooAdmin(admin.ModelAdmin): | |
form = FooForm | |
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 sorl.thumbnail import get_thumbnail | |
# ... | |
# http://stackoverflow.com/questions/1378447/question-about-admin-py-list-display | |
def _get_photo(obj): | |
if obj.photo: # 'photo' = model field name. | |
im = get_thumbnail(obj.photo, '60') |
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 <app_name>.models import Foo | |
# ... | |
# Using the default admin interface: | |
admin.site.register(Foo) |
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 django.contrib import admin | |
from test.models import Test | |
admin.site.register(Test) |
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
... | |
<Placemark> | |
<name>Crawdads!</name> | |
<Point> | |
<coordinates>-122.980987,44.003205</coordinates> | |
</Point> | |
<Snippet><![CDATA[0-2108157 @ 08/27/2011 04:51:32 p.m.]]></Snippet> | |
<description><![CDATA[ | |
Crawdads! |
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
var options = { | |
map: map, | |
singleInfoWindow: true, | |
// suppressInfoWindows: true, // If "false", then no access to infoWindow html. :( | |
createMarker: myCreateMarker | |
}; | |
var overlay = new geoXML3.parser(options); | |
overlay.parse('http://foo.com/data.kml?v=' + parseInt(Math.random()*99999999)); |