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
Environment: | |
Request Method: GET | |
Request URL: .../video/8000/2108-making-a-big-company-feel-smal | |
Django Version: 1.3 | |
Python Version: 2.6.5 | |
Installed Applications: | |
['django.contrib.staticfiles', |
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
index d2d20e8..30dadec 100644 | |
--- a/localtv/models.py | |
+++ b/localtv/models.py | |
@@ -822,6 +822,36 @@ class Feed(Source, StatusedThumbnailable): | |
def get_absolute_url(self): | |
return ('localtv_list_feed', [self.pk]) | |
+ @classmethod | |
+ def from_scraped_feed(cls, feed, user, status=None, auto_approve=False): | |
+ current_site = Site.objects.get_current() |
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
-e git+http://git.participatoryculture.org/djpagetabs@master#egg=djpagetabs-0.0.1-py2.6-dev | |
-e git+http://git.participatoryculture.org/djvideo@master#egg=djvideo-0.0.1-py2.6-dev | |
-e git+git://github.com/pculture/vidscraper.git@pre-suite#egg=vidscraper-0.0.1-py2.6-dev | |
-e git+http://git.participatoryculture.org/django-email-share/@master#egg=django_email_share-0.0.1-py2.6-dev | |
-e git+http://git.participatoryculture.org/django-uploadtemplate@master#egg=django_uploadtemplate-0.0.1-py2.6-dev | |
BeautifulSoup==3.2.0 | |
Django==1.3.1 | |
PIL==1.1.7 | |
lxml==2.3beta1 | |
-e hg+http://bitbucket.org/andrewgodwin/south/@tip#egg=south |
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.db import Count | |
from haystack import indexes | |
from learnit.models import Course | |
class CourseIndex(indexes.SearchIndex, indexes.Indexable): | |
text = indexes.CharField(document=True, use_template=True) | |
author = indexes.IntegerField(model_attr="user_id") |
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 basket app | |
from core.utils import registry | |
from basket.abstract_models import AbstractBasket | |
if "Basket" not in registry or registry.get("Basket")._meta.app_label == "basket": | |
class Basket(AbstractBasket): | |
pass |
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
{% extends 'oncampus/students/base.html' %} | |
{% load collections pipette_tags %} | |
{% block content %} | |
{% spaceless %} | |
{% container banners references philo.collection as banners_collection %} | |
{% membersof banners_collection with oberlin.banner as banners %} | |
{% container newsletter_node references philo.node as newsletter_node %} |
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.localflavor.us import us_states | |
from django.contrib.localflavor.us.models import USStateField | |
from django.db import models | |
from .utils import US_STATE_CHAR2FIPS, US_STATE_FIPS, US_STATE_FIPS_SHORT | |
class USStateFipsCode(object): | |
"""A US state class which includes FIPS characters and numbers.""" | |
def __init__(self, number): |
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
function multifloor_time_area(cfg) | |
local id = cfg.id | |
local floor = cfg.floor | |
cfg.id = nil | |
cfg.floor = nil | |
local locations = wesnoth.get_locations(cfg) | |
-- then do things! | |
end |
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
local game_events = wesnoth.game_events | |
local time_utils = wesnoth.require "~/add-ons/Brent/lua/time/utils.lua" | |
-- timedelta is the local time change per turn | |
timedelta = 4 | |
turns_per_day = 6 | |
local old_on_load = game_events.on_load | |
function game_events.on_load(cfg) |
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.db import models | |
class Orange(models.Model): | |
pass | |
class BaseClass(models.Model): | |
field = models.ForeignKey(Orange) | |
class Meta: |