From e757eae0a3f6589c0001af2d3b9595892ec91092 Mon Sep 17 00:00:00 2001 From: eric Date: Fri, 8 Mar 2013 18:33:10 -0500 Subject: [PATCH 01/11] one line js fix --- frontend/templates/stripe_stuff.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/templates/stripe_stuff.html b/frontend/templates/stripe_stuff.html index 7cc23754..10bb35dc 100644 --- a/frontend/templates/stripe_stuff.html +++ b/frontend/templates/stripe_stuff.html @@ -52,6 +52,8 @@ function stripeResponseHandler(status, response) { if (response.error) { // re-enable the submit button $j('.submit-button').removeAttr("disabled"); + // stop the spinny thing + $j('.submit-button').removeClass("show-loading"); // show the errors on the form $j(".payment-errors").html(response.error.message).show(); } else { From 303c53c82e4c8ccc2c46c8bf75bbc153726c4780 Mon Sep 17 00:00:00 2001 From: eric Date: Fri, 8 Mar 2013 18:50:35 -0500 Subject: [PATCH 02/11] While I'm looking at this, make the cvc input a password [#41678953] --- frontend/templates/fund_the_pledge.html | 2 +- static/css/pledge.css | 2 +- static/less/pledge.less | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/templates/fund_the_pledge.html b/frontend/templates/fund_the_pledge.html index f5c8d0b1..518fc83e 100644 --- a/frontend/templates/fund_the_pledge.html +++ b/frontend/templates/fund_the_pledge.html @@ -140,7 +140,7 @@ $j(document).ready(function() {
- (what is this?) + (what is this?)
a typical credit card with CVCFor most cards, this is a 3-digit number at the end of the signature strip on the back. For American Express, it's a four-digit number in small print on the front.
diff --git a/static/css/pledge.css b/static/css/pledge.css index e2e5f777..648251f1 100644 --- a/static/css/pledge.css +++ b/static/css/pledge.css @@ -1 +1 @@ -.header-text{height:36px;line-height:36px;display:block;text-decoration:none;font-weight:bold;letter-spacing:-0.05em}.panelborders{border-width:1px 0;border-style:solid none;border-color:#fff}.roundedspan{border:1px solid #d4d4d4;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:1px;color:#fff;margin:0 8px 0 0;display:inline-block}.roundedspan>span{padding:7px 7px;min-width:15px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;text-align:center;display:inline-block}.roundedspan>span .hovertext{display:none}.roundedspan>span:hover .hovertext{display:inline}.mediaborder{padding:5px;border:solid 5px #edf3f4}.actionbuttons{width:auto;height:36px;line-height:36px;background:#8dc63f;-moz-border-radius:32px;-webkit-border-radius:32px;border-radius:32px;color:white;cursor:pointer;font-size:13px;font-weight:bold;padding:0 15px;border:0;margin:5px 0}.errors{-moz-border-radius:16px 16px 0 0;-webkit-border-radius:16px 16px 0 0;border-radius:16px 16px 0 0;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center}.errors li{list-style:none;border:0}#content-block .jsmod-content,.book-detail{float:left;width:auto}input[type="submit"]{float:right;font-size:19px;margin:10px 0 10px;cursor:pointer}.pledge_amount{padding:10px;font-size:19px;background:#edf3f4}.pledge_amount.premium_level{margin-top:3px}form.pledgeform{width:470px}#id_preapproval_amount{width:50%;line-height:30px;font-size:15px}ul.support li,ul.support li:hover{background-image:none}p{margin:7px auto}.jsmodule.pledge{margin:auto}.jsmodule.pledge .jsmod-content{float:right!important}.modify_notification{width:452px;margin-bottom:7px;border:solid 2px #d6dde0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;padding:7px}.modify_notification h4{margin:0 0 5px 0}.cancel_notice{width:470px;padding:5px;margin-top:10px}#fakepledgesubmit{background-color:#e35351;cursor:default;font-weight:bold;font-size:19px;display:none}span.menu-item-price{float:none!important}#mandatory_premiums{font-size:15px}#mandatory_premiums div{float:left}#mandatory_premiums div.ack_level{width:16%;margin-right:3%;height:100%;padding:1%}#mandatory_premiums div.ack_header{width:73%;padding:1%}#mandatory_premiums div.ack_active,#mandatory_premiums div.ack_inactive{width:100%;font-size:13px}#mandatory_premiums div.ack_active .ack_header,#mandatory_premiums div.ack_active .ack_level{border:solid #3d4e53;border-width:1%;background:white}#mandatory_premiums div.ack_inactive .ack_header,#mandatory_premiums div.ack_inactive .ack_level{border:solid #d6dde0;border-width:1%;background:#d6dde0}#mandatory_premiums div.ack_inactive input,#mandatory_premiums div.ack_inactive textarea{background:#d6dde0;border:dashed 1px #3d4e53}#mandatory_premiums>div{margin:7px 0}#mandatory_premiums input[type=text],#mandatory_premiums textarea{width:95%;font-size:15px;color:#3d4e53;margin:5px 0}#mandatory_premiums input[type=text]{height:19.5px;line-height:19.5px}#id_ack_link{border:0;cursor:default}.fund_options a.fakeinput{font-size:19px;margin:10px auto;float:left;line-height:normal}.fund_options input[type="submit"]{float:left}.fund_options div{width:50%;float:left}.fund_options div ul{background:#edf3f4}.fund_options div.highlight{color:#73a334}.fund_options div.highlight ul{border-color:#a7c1ca;background:white}.fund_options ul{padding:5px 10px 5px 15px;border:solid 1px #d6dde0;margin-right:15px;list-style-type:none}.fund_options ul li{margin:5px 0}.fund_options ul a{color:#6994a3}#authorize{border:3px solid #d6dde0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;margin-top:10px;padding:10px}#authorize.off{display:none}#authorize div.innards input[type="text"]{font-size:15px;line-height:22.5px;border-width:2px;padding:1% 1%;margin:1% 0;color:#3d4e53}#authorize div.innards input[type="text"]:disabled{border-color:white}#authorize div.innards input[type="text"].address,#authorize div.innards input[type="text"]#card_Number{width:61%}#authorize div.innards label{width:31%;float:left;line-height:22.5px;font-size:15px;border:solid white;border-width:2px 0;padding:1% 2% 1% 0;margin:1% 0;text-align:right}#authorize div.innards .form-row span{float:left;line-height:22.5px;font-size:15px;margin:1%;padding:1% 0}#authorize .cvc{position:relative;z-index:0}#authorize #cvc_help{font-style:italic;float:none;font-size:13px;color:#6994a3;cursor:pointer}#authorize #cvc_answer{display:none;z-index:100;border:2px solid #d6dde0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;margin:1% 0;padding:1%;width:46%;position:absolute;top:90%;right:0;opacity:1;background-color:white}#authorize #cvc_answer img{float:right;margin-left:5px}.payment-errors{display:none;-moz-border-radius:16px 16px 0 0;-webkit-border-radius:16px 16px 0 0;border-radius:16px 16px 0 0;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center;-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;width:auto;margin:auto}.payment-errors li{list-style:none;border:0}span.level2.menu.answer{border-left:solid 7px #edf3f4}span.level2.menu.answer a{font-size:15px}#anonbox{margin-top:10px;background:#edf3f4;float:left;width:48%;padding:1%} \ No newline at end of file +.header-text{height:36px;line-height:36px;display:block;text-decoration:none;font-weight:bold;letter-spacing:-0.05em}.panelborders{border-width:1px 0;border-style:solid none;border-color:#fff}.roundedspan{border:1px solid #d4d4d4;-moz-border-radius:7px;-webkit-border-radius:7px;border-radius:7px;padding:1px;color:#fff;margin:0 8px 0 0;display:inline-block}.roundedspan>span{padding:7px 7px;min-width:15px;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;text-align:center;display:inline-block}.roundedspan>span .hovertext{display:none}.roundedspan>span:hover .hovertext{display:inline}.mediaborder{padding:5px;border:solid 5px #edf3f4}.actionbuttons{width:auto;height:36px;line-height:36px;background:#8dc63f;-moz-border-radius:32px;-webkit-border-radius:32px;border-radius:32px;color:white;cursor:pointer;font-size:13px;font-weight:bold;padding:0 15px;border:0;margin:5px 0}.errors{-moz-border-radius:16px 16px 0 0;-webkit-border-radius:16px 16px 0 0;border-radius:16px 16px 0 0;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center}.errors li{list-style:none;border:0}#content-block .jsmod-content,.book-detail{float:left;width:auto}input[type="submit"]{float:right;font-size:19px;margin:10px 0 10px;cursor:pointer}.pledge_amount{padding:10px;font-size:19px;background:#edf3f4}.pledge_amount.premium_level{margin-top:3px}form.pledgeform{width:470px}#id_preapproval_amount{width:50%;line-height:30px;font-size:15px}ul.support li,ul.support li:hover{background-image:none}p{margin:7px auto}.jsmodule.pledge{margin:auto}.jsmodule.pledge .jsmod-content{float:right!important}.modify_notification{width:452px;margin-bottom:7px;border:solid 2px #d6dde0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;padding:7px}.modify_notification h4{margin:0 0 5px 0}.cancel_notice{width:470px;padding:5px;margin-top:10px}#fakepledgesubmit{background-color:#e35351;cursor:default;font-weight:bold;font-size:19px;display:none}span.menu-item-price{float:none!important}#mandatory_premiums{font-size:15px}#mandatory_premiums div{float:left}#mandatory_premiums div.ack_level{width:16%;margin-right:3%;height:100%;padding:1%}#mandatory_premiums div.ack_header{width:73%;padding:1%}#mandatory_premiums div.ack_active,#mandatory_premiums div.ack_inactive{width:100%;font-size:13px}#mandatory_premiums div.ack_active .ack_header,#mandatory_premiums div.ack_active .ack_level{border:solid #3d4e53;border-width:1%;background:white}#mandatory_premiums div.ack_inactive .ack_header,#mandatory_premiums div.ack_inactive .ack_level{border:solid #d6dde0;border-width:1%;background:#d6dde0}#mandatory_premiums div.ack_inactive input,#mandatory_premiums div.ack_inactive textarea{background:#d6dde0;border:dashed 1px #3d4e53}#mandatory_premiums>div{margin:7px 0}#mandatory_premiums input[type=text],#mandatory_premiums textarea{width:95%;font-size:15px;color:#3d4e53;margin:5px 0}#mandatory_premiums input[type=text]{height:19.5px;line-height:19.5px}#id_ack_link{border:0;cursor:default}.fund_options a.fakeinput{font-size:19px;margin:10px auto;float:left;line-height:normal}.fund_options input[type="submit"]{float:left}.fund_options div{width:50%;float:left}.fund_options div ul{background:#edf3f4}.fund_options div.highlight{color:#73a334}.fund_options div.highlight ul{border-color:#a7c1ca;background:white}.fund_options ul{padding:5px 10px 5px 15px;border:solid 1px #d6dde0;margin-right:15px;list-style-type:none}.fund_options ul li{margin:5px 0}.fund_options ul a{color:#6994a3}#authorize{border:3px solid #d6dde0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;margin-top:10px;padding:10px}#authorize.off{display:none}#authorize div.innards input[type="text"],#authorize div.innards input[type="password"]{font-size:15px;line-height:22.5px;border-width:2px;padding:1% 1%;margin:1% 0;color:#3d4e53}#authorize div.innards input[type="text"]:disabled,#authorize div.innards input[type="password"]:disabled{border-color:white}#authorize div.innards input[type="text"].address,#authorize div.innards input[type="password"].address,#authorize div.innards input[type="text"]#card_Number,#authorize div.innards input[type="password"]#card_Number{width:61%}#authorize div.innards label{width:31%;float:left;line-height:22.5px;font-size:15px;border:solid white;border-width:2px 0;padding:1% 2% 1% 0;margin:1% 0;text-align:right}#authorize div.innards .form-row span{float:left;line-height:22.5px;font-size:15px;margin:1%;padding:1% 0}#authorize .cvc{position:relative;z-index:0}#authorize #cvc_help{font-style:italic;float:none;font-size:13px;color:#6994a3;cursor:pointer}#authorize #cvc_answer{display:none;z-index:100;border:2px solid #d6dde0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;margin:1% 0;padding:1%;width:46%;position:absolute;top:90%;right:0;opacity:1;background-color:white}#authorize #cvc_answer img{float:right;margin-left:5px}.payment-errors{display:none;-moz-border-radius:16px 16px 0 0;-webkit-border-radius:16px 16px 0 0;border-radius:16px 16px 0 0;border:solid #e35351 3px;clear:both;width:90%;height:auto;line-height:16px;padding:7px 0;font-weight:bold;font-size:13px;text-align:center;-moz-border-radius:16px;-webkit-border-radius:16px;border-radius:16px;width:auto;margin:auto}.payment-errors li{list-style:none;border:0}span.level2.menu.answer{border-left:solid 7px #edf3f4}span.level2.menu.answer a{font-size:15px}#anonbox{margin-top:10px;background:#edf3f4;float:left;width:48%;padding:1%} \ No newline at end of file diff --git a/static/less/pledge.less b/static/less/pledge.less index ae92da90..8305bca1 100644 --- a/static/less/pledge.less +++ b/static/less/pledge.less @@ -201,7 +201,7 @@ span.menu-item-price { padding: 10px; div.innards { - input[type="text"] { + input[type="text"],input[type="password"] { font-size: @font-size-larger; line-height: @font-size-larger*1.5; border-width: 2px; From 22b17d08fafb0b554276adf7470f2bec7aa30298 Mon Sep 17 00:00:00 2001 From: eric Date: Sat, 9 Mar 2013 11:52:42 -0500 Subject: [PATCH 03/11] this was causing googlebot crawl errors --- core/feeds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/feeds.py b/core/feeds.py index 64abeb7b..6df720a1 100644 --- a/core/feeds.py +++ b/core/feeds.py @@ -15,7 +15,7 @@ class SupporterWishlistFeed(Feed): return "Latest wishbooks for %s on unglue.it" % obj.username def link(self, obj): - return "/%s/feed/" % obj.username + return "/supporter/%s/feed/" % obj.username def item_title(self, item): return "%s" % item.title From d3077c988bc819dbe4a28261e097af57ca31e8da Mon Sep 17 00:00:00 2001 From: eric Date: Sat, 9 Mar 2013 13:29:03 -0500 Subject: [PATCH 04/11] links should not point to http from https --- core/signals.py | 6 +++--- frontend/templates/about.html | 2 +- frontend/views.py | 6 +++--- payment/manager.py | 6 +++--- settings/common.py | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/signals.py b/core/signals.py index b1ddda8a..b109f500 100644 --- a/core/signals.py +++ b/core/signals.py @@ -257,7 +257,7 @@ def handle_wishlist_added(supporter, work, **kwargs): notification.queue([claim[0].user], "new_wisher", { 'supporter': supporter, 'work': work, - 'base_url': settings.BASE_URL, + 'base_url': settings.BASE_URL_SECURE, }, True) from regluit.core.tasks import emit_notifications @@ -277,13 +277,13 @@ def handle_wishlist_near_deadline(campaign, **kwargs): notification.queue(pledgers, "wishlist_near_deadline", { 'campaign': campaign, - 'domain': settings.BASE_URL, + 'domain': settings.BASE_URL_SECURE, 'pledged': True, }, True) notification.queue(nonpledgers, "wishlist_near_deadline", { 'campaign': campaign, - 'domain': settings.BASE_URL, + 'domain': settings.BASE_URL_SECURE, 'pledged': False, }, True) diff --git a/frontend/templates/about.html b/frontend/templates/about.html index 155e2e23..84bdcd85 100644 --- a/frontend/templates/about.html +++ b/frontend/templates/about.html @@ -2,7 +2,7 @@ {% block title %} Everything You Always Wanted to Know {% endblock %} {% block doccontent %}

About

-

Unglue.it is a service provided by Gluejar, Inc. It's a place for individuals and institutions to join together to liberate specific ebooks and other types of digital content by paying rights holders to relicense their works under Creative Commons licenses.

+

Unglue.it is a service provided by Gluejar, Inc. It's a place for individuals and institutions to join together to liberate specific ebooks and other types of digital content by paying rights holders to relicense their works under Creative Commons licenses.

What does this mean?

    diff --git a/frontend/views.py b/frontend/views.py index 7970cc7f..f6f6ba59 100755 --- a/frontend/views.py +++ b/frontend/views.py @@ -912,7 +912,7 @@ class NonprofitCampaign(FormView): forward['amount']= int(amount) forward['sent']= Sent.objects.create(user=username,amount=form.cleaned_data['preapproval_amount']).pk token=signing.dumps(forward) - return HttpResponseRedirect(settings.BASE_URL + reverse('donation_credit',kwargs={'token':token})) + return HttpResponseRedirect(settings.BASE_URL_SECURE + reverse('donation_credit',kwargs={'token':token})) class DonationCredit(TemplateView): template_name="donation_credit.html" @@ -2025,7 +2025,7 @@ def emailshare(request, action): next = form.cleaned_data['next'] except: # if we totally failed to have a next value, we should still redirect somewhere useful - next = 'http://unglue.it' + next = 'https://unglue.it' return HttpResponseRedirect(next) else: @@ -2180,7 +2180,7 @@ def download(request, work_id): 'unglued_ebooks': unglued_ebooks, 'other_ebooks': other_ebooks, 'readmill_epub_url': readmill_epub_url, - 'base_url': settings.BASE_URL + 'base_url': settings.BASE_URL_SECURE }) return render(request, "download.html", context) diff --git a/payment/manager.py b/payment/manager.py index c89c2057..478a66ed 100644 --- a/payment/manager.py +++ b/payment/manager.py @@ -565,7 +565,7 @@ class PaymentManager( object ): if return_url is None: return_path = "{0}?{1}".format(reverse('pledge_complete'), urllib.urlencode({'tid':transaction.id})) - return_url = urlparse.urljoin(settings.BASE_URL, return_path) + return_url = urlparse.urljoin(settings.BASE_URL_SECURE, return_path) p = transaction.get_payment_class().Preapproval(transaction, transaction.max_amount, expiry, return_url=return_url, paymentReason=paymentReason) @@ -657,7 +657,7 @@ class PaymentManager( object ): credit.pledge_transaction(t,user,amount) return_path = "{0}?{1}".format(reverse('pledge_complete'), urllib.urlencode({'tid':t.id})) - return_url = urlparse.urljoin(settings.BASE_URL, return_path) + return_url = urlparse.urljoin(settings.BASE_URL_SECURE, return_path) pledge_created.send(sender=self, transaction=t) return t, return_url else: @@ -762,7 +762,7 @@ class PaymentManager( object ): credit.pledge_transaction(transaction,transaction.user,amount) return_path = "{0}?{1}".format(reverse('pledge_complete'), urllib.urlencode({'tid':transaction.id})) - return_url = urlparse.urljoin(settings.BASE_URL, return_path) + return_url = urlparse.urljoin(settings.BASE_URL_SECURE, return_path) logger.info("Updated amount of transaction to %f" % amount) pledge_modified.send(sender=self, transaction=transaction,up_or_down=up_or_down) diff --git a/settings/common.py b/settings/common.py index 4b9d391f..6c20731f 100644 --- a/settings/common.py +++ b/settings/common.py @@ -216,7 +216,7 @@ LOGIN_URL = "/accounts/login/" LOGIN_REDIRECT_URL = "/" LOGOUT_URL = "/accounts/logout/" -USER_AGENT = "unglue.it.bot v0.0.1 " +USER_AGENT = "unglue.it.bot v0.0.1 " SOUTH_TESTS_MIGRATE = True From c037764289eca46b4efabdf12e36948291e4b94f Mon Sep 17 00:00:00 2001 From: eric Date: Sat, 9 Mar 2013 17:37:33 -0500 Subject: [PATCH 05/11] sitemaps! [#25581139] --- core/models.py | 5 +++++ core/sitemaps.py | 36 ++++++++++++++++++++++++++++++++++++ settings/common.py | 1 + urls.py | 11 +++++++++++ 4 files changed, 53 insertions(+) create mode 100644 core/sitemaps.py diff --git a/core/models.py b/core/models.py index d2fc1b56..1dab0bb9 100755 --- a/core/models.py +++ b/core/models.py @@ -13,9 +13,11 @@ from django.db import models from django.db.models import Q, get_model from django.contrib.auth.models import User from django.contrib.sites.models import Site +from django.core.urlresolvers import reverse from django.conf import settings from django.utils.translation import ugettext_lazy as _ + import regluit import regluit.core.isbn from regluit.core.signals import successful_campaign, unsuccessful_campaign, wishlist_added @@ -808,6 +810,9 @@ class Work(models.Model): except: return False + def get_absolute_url(self): + return reverse('work', args=[str(self.id)]) + class Author(models.Model): created = models.DateTimeField(auto_now_add=True) name = models.CharField(max_length=500) diff --git a/core/sitemaps.py b/core/sitemaps.py new file mode 100644 index 00000000..64606a76 --- /dev/null +++ b/core/sitemaps.py @@ -0,0 +1,36 @@ +from django.contrib.sitemaps import Sitemap +from django.core.urlresolvers import reverse +from regluit.core.models import Work, Edition + +class WorkSitemap(Sitemap): + protocol = 'https' + + def items(self): + return Work.objects.all() + + def priority(self,work): + if work.last_campaign(): + return '1.0' + if work.num_wishes>1000: + return '0.8' + if work.num_wishes>100: + return '0.6' + if work.num_wishes>10: + return '0.4' + if work.num_wishes>1: + return '0.3' + if work.num_wishes==1: + return '0.2' + if work.num_wishes==0: + return '0.1' + return '0.1' + +class PublisherSitemap(Sitemap): + priority = 0.2 + protocol = 'https' + + def items(self): + return Edition.objects.exclude(publisher__isnull=True).exclude(publisher="").order_by('publisher').values('publisher').distinct() + + def location(self, pub): + return reverse("bypub_list",args=[pub['publisher']]) diff --git a/settings/common.py b/settings/common.py index 6c20731f..efe35af3 100644 --- a/settings/common.py +++ b/settings/common.py @@ -119,6 +119,7 @@ INSTALLED_APPS = ( 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', + 'django.contrib.sitemaps', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.comments', diff --git a/urls.py b/urls.py index 39f96633..e9650444 100755 --- a/urls.py +++ b/urls.py @@ -3,6 +3,12 @@ from frontend.forms import ProfileForm from django.views.generic.simple import direct_to_template from regluit.admin import admin_site import notification.urls +from regluit.core.sitemaps import WorkSitemap, PublisherSitemap + +sitemaps = { + 'works': WorkSitemap, + 'publishers': PublisherSitemap, + } urlpatterns = patterns('', url(r'^accounts/activate/complete/$','django.contrib.auth.views.login', @@ -23,3 +29,8 @@ urlpatterns = patterns('', (r'^notification/', include(notification.urls)), (r'^ckeditor/', include('ckeditor.urls')), ) + +urlpatterns += patterns('django.contrib.sitemaps.views', + (r'^sitemap\.xml$', 'index', {'sitemaps': sitemaps}), + (r'^sitemap-(?P
    .+)\.xml$', 'sitemap', {'sitemaps': sitemaps}), +) From f3543bd91427c6bc0821ff47d659e6e4aa2006b0 Mon Sep 17 00:00:00 2001 From: eric Date: Sat, 9 Mar 2013 17:38:47 -0500 Subject: [PATCH 06/11] googlebot likes the wishlist feeds- give it more --- core/feeds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/feeds.py b/core/feeds.py index 6df720a1..002ba72b 100644 --- a/core/feeds.py +++ b/core/feeds.py @@ -24,4 +24,4 @@ class SupporterWishlistFeed(Feed): return "/work/%s" % item.id def items(self, obj): - return obj.wishlist.works.all().order_by('-id')[:5] \ No newline at end of file + return obj.wishlist.works.all().order_by('-id')[:100] \ No newline at end of file From 55b30f494ed0eb03259b9846412b64632254413f Mon Sep 17 00:00:00 2001 From: eric Date: Sat, 9 Mar 2013 20:25:47 -0500 Subject: [PATCH 07/11] schema.org metadata! --- frontend/templates/comments/list.html | 22 +++++++++++++--------- frontend/templates/supporter.html | 4 ++-- frontend/templates/work.html | 22 +++++++++++----------- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/frontend/templates/comments/list.html b/frontend/templates/comments/list.html index 879bca73..5fcd093e 100644 --- a/frontend/templates/comments/list.html +++ b/frontend/templates/comments/list.html @@ -1,16 +1,20 @@
    {% for comment in comment_list reversed %} -
    - -
    - {% if comment.user.profile.pic_url %} - Picture of {{ comment.user }} - {% else %} - Generic Ungluer Avatar + + {{comment.user.username }} + + + ({{ comment.submit_date }})
    {{ comment.comment|linebreaksbr }}
    {% endfor %}
    diff --git a/frontend/templates/supporter.html b/frontend/templates/supporter.html index 13f863f7..fcbe2ade 100644 --- a/frontend/templates/supporter.html +++ b/frontend/templates/supporter.html @@ -96,7 +96,7 @@ there's no tab for seeing ALL my books, only the filters! huh.
    -
    +
    {% if supporter.profile.pic_url %} @@ -105,7 +105,7 @@ there's no tab for seeing ALL my books, only the filters! huh. Generic Ungluer Avatar {% endif %} - {{ supporter.username }} + {{ supporter.username }}
    diff --git a/frontend/templates/work.html b/frontend/templates/work.html index 291e7d46..88bec9e5 100644 --- a/frontend/templates/work.html +++ b/frontend/templates/work.html @@ -139,7 +139,7 @@ $j(document).ready(function(){
    -
    +
    {% if work.googlebooks_id %} {% else %}
    - {{ work.title }} + {{ work.title }}
    {% endif %}
    -

    {{ work.title }}

    +

    {{ work.title }}

    -

    {{ work.author }}

    -

    {{ work.publication_date_year }}

    + +
    {% if status == 'ACTIVE' %} {% if pledged %} @@ -249,10 +249,10 @@ $j(document).ready(function(){
    {% if status == 'ACTIVE' or status == 'SUCCESSFUL' %} - {{ work.last_campaign.description|safe }} + {{ work.last_campaign.description|safe }} {% else %}

    {{work.title}}

    -

    {{ work.description|safe }} +

    {{ work.description|safe }} {% endif %}

    @@ -272,8 +272,8 @@ $j(document).ready(function(){
    {% for wish in work.wishes.all reversed %} {% with wish.wishlist.user as supporter %} -
    - +
    +