From: Stefan Koegl Date: Fri, 24 Sep 2010 10:51:54 +0000 (+0200) Subject: fix typos, missing imports X-Git-Url: https://repo.or.cz/w/mygpo.git/commitdiff_plain/7f55664bf31a7d8c2a355dee58e59290ceb8207a fix typos, missing imports --- diff --git a/mygpo/search/models.py b/mygpo/search/models.py index f67798e1..150a6530 100644 --- a/mygpo/search/models.py +++ b/mygpo/search/models.py @@ -1,4 +1,6 @@ from django.db import models +from mygpo.search.util import tag_string +from mygpo.data.models import PodcastTag from mygpo.api.models import Podcast, PodcastGroup import shlex @@ -35,11 +37,11 @@ class SearchEntry(models.Model): entry = SearchEntry() entry.text = obj.title entry.obj_id = obj.id - entry.priority = subscriber_count or obj.get_subscriber_count() + entry.priority = subscriber_count or obj.subscriber_count() if isinstance(obj, Podcast): entry.obj_type = 'podcast' - podcasts = Podcast.objects.filter(podcast=obj) + podcasts = [obj] elif isinstance(obj, PodcastGroup): entry.obj_type = 'podcast_group' podcasts = Podcast.objects.filter(group=group) diff --git a/mygpo/web/templates/episode.html b/mygpo/web/templates/episode.html index fa878c91..3393cbb6 100644 --- a/mygpo/web/templates/episode.html +++ b/mygpo/web/templates/episode.html @@ -97,6 +97,7 @@ {% url podcast podast_id as podcast-url %} {%blocktrans with episode.podcast.id as podcast_id %}Your own chapters are shown in bold. If you don't want them to appear to other users, go to the podcast page and mark your subscription as private.{% endblocktrans %} {% else %} + {% url podcast podast_id as podcast-url %} {% blocktrans with episode.podcast.id as podcast_id %}The following list contains your chapters in bold and those of other users. However, yours are not shown to others, because you've marked your subscription as prive on the podcast page. You can change that there, if you want.{% endblocktrans %} {% endif %} {% endif %} diff --git a/mygpo/web/views/podcast.py b/mygpo/web/views/podcast.py index 421a631f..026f17ee 100644 --- a/mygpo/web/views/podcast.py +++ b/mygpo/web/views/podcast.py @@ -7,13 +7,13 @@ from django.template import RequestContext from django.contrib.auth.decorators import login_required from django.contrib.sites.models import Site from django.utils.translation import ugettext as _ - from mygpo.api.models import Podcast, Episode, EpisodeAction, Device, SubscriptionAction, Subscription, SyncGroup +from mygpo.api.sanitizing import sanitize_url from mygpo.web.forms import PrivacyForm, SyncForm from mygpo.data.models import Listener, PodcastTag from mygpo.decorators import manual_gc, allowed_methods from mygpo.utils import daterange - +from mygpo.log import log MAX_TAGS_ON_PAGE=50 diff --git a/mygpo/web/views/users.py b/mygpo/web/views/users.py index 2215e958..7f408f4b 100644 --- a/mygpo/web/views/users.py +++ b/mygpo/web/views/users.py @@ -18,6 +18,7 @@ from django.shortcuts import render_to_response from django.http import HttpResponseRedirect from django.contrib.auth import authenticate, login +from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.template.defaultfilters import slugify from django.template import RequestContext @@ -27,9 +28,12 @@ from django.contrib.sites.models import Site from django.conf import settings from mygpo.decorators import manual_gc, allowed_methods from django.utils.translation import ugettext as _ +from registration.models import RegistrationProfile import string import random + +from mygpo.web.forms import ResendActivationForm from mygpo.constants import DEFAULT_LOGIN_REDIRECT def login_user(request):