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
--[[ | |
Usage: | |
When running wesnoth, type: | |
:lua shell() | |
This will open the shell. Type any lua code you like in the shell. Variables will be stored in a shell-specific environment. The shell defines some additional functions: | |
clear() :: clears the output area. | |
close() :: closes the shell. |
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: |
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
diff --git a/contrib/cowell/admin.py b/contrib/cowell/admin.py | |
new file mode 100644 | |
index 0000000..94df7cb | |
--- /dev/null | |
+++ b/contrib/cowell/admin.py | |
@@ -0,0 +1,107 @@ | |
+from django import forms | |
+from django.contrib import admin | |
+from philo.contrib.cowell.fields import ForeignKeyAttribute, ManyToManyAttribute | |
+from philo.contrib.cowell.forms import ProxyFieldForm, proxy_fields_for_entity_model |
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 problem: Running get_view_forms returns an empty queryset even if get_entity_forms(node) would return a non-empty queryset. |
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.test import TestCase | |
from django.contrib.auth.models import User | |
from stepping_out.mail.models import UserEmail, MailingList, sync_user_emails | |
class MailingListTest(TestCase): | |
def setUp(self): | |
self.user1 = User.objects.create_user(username="username", password="password") | |
self.user2 = User.objects.create_user(username="test", password="test") | |
self.useremail = UserEmail.objects.create(email='mrow@test.com') |
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
class Collection: | |
#Not for metadata - for personal use. | |
class Photo: | |
photographer | |
caption #default caption (location and people in picture?) and different depending on where it's being displayed | |
location | |
date taken | |
date added to system |
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 | |
from django.conf import settings | |
from philo.models import Tag, Titled, Entity, MultiView, Page, register_value_model | |
from philo.exceptions import ViewCanNotProvideSubpath | |
from django.conf.urls.defaults import url, patterns, include | |
from django.core.urlresolvers import reverse | |
from django.http import Http404, HttpResponse | |
from datetime import datetime | |
from philo.utils import paginate | |
from philo.contrib.penfield.validators import validate_pagination_count |
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: http://127.0.0.1:8000/admin/oberlin/sourcearticle/8/ | |
Django Version: 1.3 pre-alpha SVN-13431 | |
Python Version: 2.6.1 | |
Installed Applications: | |
['philo', | |
'django.contrib.auth', | |
'django.contrib.contenttypes', |
NewerOlder