Author: jtauber
Date: Sat Sep 27 05:35:58 2008
New Revision: 949
Modified:
trunk/local_apps/profiles/management/commands/cache_profile_feeds.py
trunk/pinax/fixtures/generate/profiles.py
trunk/pinax/templates/feedutil/plugins/profiles/profile.html
Log:
moved blogrss over to coming from other services model rather than profile
Modified:
trunk/local_apps/profiles/management/commands/cache_profile_feeds.py
==============================================================================
--- trunk/local_apps/profiles/management/commands/cache_profile_feeds.py
(original)
+++ trunk/local_apps/profiles/management/commands/cache_profile_feeds.py
Sat Sep 27 05:35:58 2008
@@ -1,14 +1,14 @@
from django.core.management.base import NoArgsCommand
from feedutil.templatetags.feedutil import pull_feed
-from profiles.models import Profile
+from account.models import OtherServiceInfo
from django.conf import settings
class Command(NoArgsCommand):
- help = 'For each profile which has a blogrss url, cache the feed.'
+ help = 'For each blogrss url, cache the feed.'
def handle_noargs(self, **options):
- for ent in
Profile.objects.filter(blogrss__isnull=False).values('blogrss'):
+ for info in OtherServiceInfo.objects.filter(key="blogrss"):
try:
- pull_feed(ent['blogrss'])
+ pull_feed(info.value)
except:
if settings.DEBUG: raise
Modified: trunk/pinax/fixtures/generate/profiles.py
==============================================================================
--- trunk/pinax/fixtures/generate/profiles.py (original)
+++ trunk/pinax/fixtures/generate/profiles.py Sat Sep 27 05:35:58 2008
@@ -19,8 +19,9 @@
defaults=dict(
name = user.get_full_name(),
about = capfirst(words(8, common=False)) + '.',
- blogrss = random.choice(RSS_FEEDS),
- timezone = random.choice(TIMEZONE_CHOICES)[0],
+# @@@ need to move these to account fixtures
+# blogrss = random.choice(RSS_FEEDS),
+# timezone = random.choice(TIMEZONE_CHOICES)[0],
),
)
print "Created User Profile: %s" % (profile,)
Modified: trunk/pinax/templates/feedutil/plugins/profiles/profile.html
==============================================================================
--- trunk/pinax/templates/feedutil/plugins/profiles/profile.html
(original)
+++ trunk/pinax/templates/feedutil/plugins/profiles/profile.html Sat Sep
27
05:35:58 2008
@@ -1,10 +1,12 @@
{% load feedutil %}
+{% load other_service_tags %}
{% load i18n %}
-{% if owner.get_profile.blogrss %}
+{% other_service owner 'blogrss' as blogrss %}
+{% if blogrss %}
<div class="feed-entries">
<h2>{% trans "Recent Blog Posts" %}</h2>
- {% feed owner.get_profile.blogrss 5 %}
+ {% feed blogrss 5 %}
</div>
{% endif %}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---