diff --git a/api/resources.py b/api/resources.py index 9b8a59fb..bab1fc0d 100755 --- a/api/resources.py +++ b/api/resources.py @@ -86,7 +86,7 @@ class CampaignResource(ModelResource): wishlist_work_ids = [] for o in data['objects']: - o.data['in_wishlist'] = o.obj.work.id in wishlist_work_ids + o.data['in_wishlist'] = o.obj.work_id in wishlist_work_ids # there's probably a better place up the chain (where the Campaign objects are directly available) to grab the status c = models.Campaign.objects.get(id=o.data["id"]) o.data['status'] = c.status diff --git a/api/tests.py b/api/tests.py index 818ff78f..88581979 100755 --- a/api/tests.py +++ b/api/tests.py @@ -26,7 +26,7 @@ class ApiTests(TestCase): def setUp(self): edition = models.Edition.objects.get(pk=1) - self.work_id=edition.work.id + self.work_id=edition.work_id campaign = models.Campaign.objects.create( name=edition.work.title, work=edition.work, @@ -155,7 +155,7 @@ class FeedTests(TestCase): def setUp(self): edition = models.Edition.objects.get(pk=1) ebook = models.Ebook.objects.create(edition=edition, url='http://example.org/', format='epub', rights='CC BY') - self.test_work_id = edition.work.id + self.test_work_id = edition.work_id def test_opds(self): r = self.client.get('/api/opds/creative_commons/') diff --git a/core/admin.py b/core/admin.py index cc87246f..f95d1612 100644 --- a/core/admin.py +++ b/core/admin.py @@ -179,13 +179,13 @@ class EbookFileAdmin(ModelAdmin): readonly_fields = ('file', 'edition_link', 'ebook_link', 'ebook') def edition_link(self, obj): if obj.edition: - link = reverse("admin:core_edition_change", args=[obj.edition.id]) + link = reverse("admin:core_edition_change", args=[obj.edition_id]) return u'%s' % (link,obj.edition) else: return u'' def ebook_link(self, obj): if obj.ebook: - link = reverse("admin:core_ebook_change", args=[obj.ebook.id]) + link = reverse("admin:core_ebook_change", args=[obj.ebook_id]) return u'%s' % (link,obj.ebook) else: return u'' @@ -206,7 +206,7 @@ class GiftAdmin(ModelAdmin): search_fields = ('giver__username', 'to') readonly_fields = ('giver', 'acq',) def acq_admin_link(self, gift): - return "%s" % (gift.acq.id, gift.acq) + return "%s" % (gift.acq_id, gift.acq) acq_admin_link.allow_tags = True class CeleryTaskAdmin(ModelAdmin): diff --git a/core/bookloader.py b/core/bookloader.py index 8eaa6bd8..5623d381 100755 --- a/core/bookloader.py +++ b/core/bookloader.py @@ -410,8 +410,8 @@ def relate_isbn(isbn, cluster_size=1): if related_edition.work is None: related_edition.work = edition.work related_edition.save() - elif related_edition.work.id != edition.work.id: - logger.debug("merge_works path 1 %s %s", edition.work.id, related_edition.work.id ) + elif related_edition.work_id != edition.work_id: + logger.debug("merge_works path 1 %s %s", edition.work_id, related_edition.work_id ) merge_works(related_edition.work, edition.work) if related_edition.work.editions.count()>cluster_size: return related_edition.work @@ -449,8 +449,8 @@ def add_related(isbn): if related_edition.work is None: related_edition.work = work related_edition.save() - elif related_edition.work.id != work.id: - logger.debug("merge_works path 1 %s %s", work.id, related_edition.work.id ) + elif related_edition.work_id != work.id: + logger.debug("merge_works path 1 %s %s", work.id, related_edition.work_id ) work = merge_works(work, related_edition.work) else: if other_editions.has_key(related_language): @@ -460,14 +460,14 @@ def add_related(isbn): # group the other language editions together for lang_group in other_editions.itervalues(): - logger.debug("lang_group (ed, work): %s", [(ed.id, ed.work.id) for ed in lang_group]) + logger.debug("lang_group (ed, work): %s", [(ed.id, ed.work_id) for ed in lang_group]) if len(lang_group)>1: lang_edition = lang_group[0] logger.debug("lang_edition.id: %s", lang_edition.id) # compute the distinct set of works to merge into lang_edition.work works_to_merge = set([ed.work for ed in lang_group[1:]]) - set([lang_edition.work]) for w in works_to_merge: - logger.debug("merge_works path 2 %s %s", lang_edition.work.id, w.id ) + logger.debug("merge_works path 2 %s %s", lang_edition.work_id, w.id ) merged_work = merge_works(lang_edition.work, w) models.WorkRelation.objects.get_or_create( to_work=lang_group[0].work, @@ -749,7 +749,7 @@ def load_from_yaml(yaml_url, test_mode=False): for metadata in all_metadata.get_edition_list(): edition = loader.load_from_pandata(metadata) loader.load_ebooks(metadata, edition, test_mode) - return edition.work.id if edition else None + return edition.work_id if edition else None def edition_for_ident(id_type, id_value): #print 'returning edition for {}: {}'.format(id_type, id_value) @@ -820,9 +820,9 @@ class BasePandataLoader(object): value = value[0] if isinstance(value, list) else value try: id = models.Identifier.objects.get(type=id_code, value=value) - if work and id.work and id.work.id is not work.id: + if work and id.work and id.work_id is not work.id: # dangerous! merge newer into older - if work.id < id.work.id: + if work.id < id.work_id: merge_works(work, id.work) else: merge_works(id.work, work) diff --git a/core/loaders/doab.py b/core/loaders/doab.py index b6e887e1..8b863026 100644 --- a/core/loaders/doab.py +++ b/core/loaders/doab.py @@ -129,7 +129,7 @@ def add_all_isbns(isbns, work, language=None, title=None): edition = bookloader.add_by_isbn(isbn, work, language=language, title=title) if edition: first_edition = first_edition if first_edition else edition - if work and (edition.work.id != work.id): + if work and (edition.work_id != work.id): if work.created < edition.work.created: work = merge_works(work, edition.work) else: diff --git a/core/management/commands/dedupe_ebooks_with_same_urls.py b/core/management/commands/dedupe_ebooks_with_same_urls.py index 0a255616..e2d53ede 100644 --- a/core/management/commands/dedupe_ebooks_with_same_urls.py +++ b/core/management/commands/dedupe_ebooks_with_same_urls.py @@ -8,15 +8,15 @@ def delete_newest_ebooks(ebooks): """ for ebook in sorted(ebooks, key=lambda ebook: ebook.created)[1:]: print "deleting ebook.id {}, edition.id {} work.id {}".format(ebook.id, - ebook.edition.id, - ebook.edition.work.id) + ebook.edition_id, + ebook.edition.work_id) ebook.delete() intact = ebooks[0] print "leaving undeleted: ebook.id {}, edition.id {} work.id {}".format( intact.id, - intact.edition.id, - intact.edition.work.id + intact.edition_id, + intact.edition.work_id ) diff --git a/core/models/__init__.py b/core/models/__init__.py index 744e417f..54d6596d 100755 --- a/core/models/__init__.py +++ b/core/models/__init__.py @@ -344,7 +344,7 @@ class Acq(models.Model): 'exlibris':0, 'chapterfooter': 0, 'disclaimer':0, - 'referenceid': '%s:%s:%s' % (self.work.id, self.user.id, self.id) if do_watermark else 'N/A', + 'referenceid': '%s:%s:%s' % (self.work_id, self.user_id, self.id) if do_watermark else 'N/A', 'kf8mobi': True, 'epub': True, } @@ -355,7 +355,7 @@ class Acq(models.Model): return self.watermarked def _hash(self): - return hashlib.md5('%s:%s:%s:%s'%(settings.SOCIAL_AUTH_TWITTER_SECRET, self.user.id, self.work.id, self.created)).hexdigest() + return hashlib.md5('%s:%s:%s:%s'%(settings.SOCIAL_AUTH_TWITTER_SECRET, self.user_id, self.work_id, self.created)).hexdigest() def expire_in(self, delta): self.expires = (now() + delta) if delta else now() @@ -1080,7 +1080,7 @@ class Campaign(models.Model): format=format, rights=self.license, provider="Unglue.it", - url=settings.BASE_URL_SECURE + reverse('download_campaign', args=[self.work.id, format]), + url=settings.BASE_URL_SECURE + reverse('download_campaign', args=[self.work_id, format]), version='unglued', ) old_ebooks = Ebook.objects.exclude(pk=ebook.pk).filter( @@ -1105,7 +1105,7 @@ class Campaign(models.Model): 'exlibris':0, 'chapterfooter':0, 'disclaimer':0, - 'referenceid': '%s:%s:%s' % (self.work.id, self.id, self.license), + 'referenceid': '%s:%s:%s' % (self.work_id, self.id, self.license), 'kf8mobi': True, 'epub': True, } diff --git a/core/models/bibmodels.py b/core/models/bibmodels.py index 0ce8dc41..08cfb3b8 100644 --- a/core/models/bibmodels.py +++ b/core/models/bibmodels.py @@ -82,11 +82,11 @@ class Identifier(models.Model): identifier = Identifier.objects.create(type=type, value=value, work=work) else: identifier = Identifier.objects.create(type=type, value=value, work=work, edition=edition) - if identifier.work.id != work.id: + if identifier.work_id != work.id: identifier.work = work identifier.save() if identifier.edition and edition: - if identifier.edition.id != edition.id: + if identifier.edition_id != edition.id: identifier.edition = edition identifier.save() others = Identifier.objects.filter(type=type, work=work, edition=edition).exclude(value=value) @@ -961,7 +961,7 @@ class Edition(models.Model): return self.ebooks.filter(active=True) def download_via_url(self): - return settings.BASE_URL_SECURE + reverse('download', args=[self.work.id]) + return settings.BASE_URL_SECURE + reverse('download', args=[self.work_id]) def authnames(self): return [auth.last_name_first for auth in self.authors.all()] diff --git a/core/signals.py b/core/signals.py index debc118d..7134c1ba 100644 --- a/core/signals.py +++ b/core/signals.py @@ -107,8 +107,8 @@ from django_comments.signals import comment_was_posted def notify_comment(comment, request, **kwargs): logger.info('comment %s notifying' % comment.pk) - other_commenters = User.objects.filter(comment_comments__content_type=comment.content_type, comment_comments__object_pk=comment.object_pk).distinct().exclude(id=comment.user.id) - all_wishers = comment.content_object.wished_by().exclude(id=comment.user.id) + other_commenters = User.objects.filter(comment_comments__content_type=comment.content_type, comment_comments__object_pk=comment.object_pk).distinct().exclude(id=comment.user_id) + all_wishers = comment.content_object.wished_by().exclude(id=comment.user_id) other_wishers = all_wishers.exclude(id__in=other_commenters) domain = Site.objects.get_current().domain if comment.content_object.last_campaign() and comment.user in comment.content_object.last_campaign().managers.all(): @@ -177,7 +177,7 @@ def handle_transaction_charged(sender,transaction=None, **kwargs): if transaction.offer.license == LIBRARY: library = Library.objects.get(id=transaction.extra['library_id']) new_acq = Acq.objects.create(user=library.user,work=transaction.campaign.work,license= LIBRARY) - if transaction.user.id != library.user.id: # don't put it on reserve if purchased by the library + if transaction.user_id != library.user_id: # don't put it on reserve if purchased by the library reserve_acq = Acq.objects.create(user=transaction.user,work=transaction.campaign.work,license= RESERVE, lib_acq = new_acq) reserve_acq.expire_in(datetime.timedelta(hours=2)) copies = int(transaction.extra.get('copies',1)) diff --git a/core/tests.py b/core/tests.py index 2578d502..29e01483 100755 --- a/core/tests.py +++ b/core/tests.py @@ -230,7 +230,7 @@ class BookLoaderTests(TestCase): back_point = True to_works = [wr.to_work for wr in edition.work.works_related_from.all()] for to_work in to_works: - if edition.work.id not in [wr1.from_work.id for wr1 in to_work.works_related_to.all()]: + if edition.work_id not in [wr1.from_work.id for wr1 in to_work.works_related_to.all()]: back_point = False break self.assertTrue(back_point) diff --git a/frontend/forms/bibforms.py b/frontend/forms/bibforms.py index bb5fa70c..a5b43ee0 100644 --- a/frontend/forms/bibforms.py +++ b/frontend/forms/bibforms.py @@ -154,7 +154,7 @@ class EditionForm(forms.ModelForm): if id_value: identifier = Identifier.objects.filter(type=id_type, value=id_value) if identifier: - err_msg = "{} is a duplicate for work #{}.".format(identifier[0], identifier[0].work.id) + err_msg = "{} is a duplicate for work #{}.".format(identifier[0], identifier[0].work_id) self.add_error('id_value', forms.ValidationError(err_msg)) try: self.cleaned_data['value'] = identifier_cleaner(id_type)(id_value) diff --git a/frontend/templates/ebook_list.html b/frontend/templates/ebook_list.html index 4efa230b..aea67882 100644 --- a/frontend/templates/ebook_list.html +++ b/frontend/templates/ebook_list.html @@ -4,7 +4,7 @@ {% for ebook in work.ebooks_all %}
© {{ campaign.work.preferred_edition.publication_date }} by {{ campaign.work.authors_short }}
ISBN: {{ campaign.work.preferred_edition.isbn_13 }} .
-URI: https://unglue.it/work/{{ campaign.work.id }}/ (this work).
+URI: https://unglue.it/work/{{ campaign.work_id }}/ (this work).
This unglued edition is distributed under the terms of the Creative Commons {{ campaign.license }} license. To view a copy of this license, visit {{ campaign.license_url }}. @@ -97,7 +97,7 @@
If you're reading this book on an internet-connected device, you can also share it with your friends:
Edition {{ edition.id }}:
{% if ebf.active %}ACTIVE {% elif ebf.ebook.active %} MIRROR {% endif %}EPUB file: {{ebf.file}}
created {{ebf.created}} for edition {{ebf.edition.id}} {% if ebf.asking %}(This file has had the campaign 'ask' added.){% endif %}
{% if ebf.active %}{% ifequal action 'mademobi' %}A MOBI file is being generated. (Takes a minute or two.) {% else %}You can generate a MOBI file. {% endifequal %}{% endif %}
{% if ebf.active %}ACTIVE {% elif ebf.ebook.active %} MIRROR {% endif %}EPUB file: {{ebf.file}}
created {{ebf.created}} for edition {{ebf.edition_id}} {% if ebf.asking %}(This file has had the campaign 'ask' added.){% endif %}
{% if ebf.active %}{% ifequal action 'mademobi' %}A MOBI file is being generated. (Takes a minute or two.) {% else %}You can generate a MOBI file. {% endifequal %}{% endif %}
{% if ebf.active %}ACTIVE {% endif %}MOBI file: {{ebf.file}}
created {{ebf.created}} for edition {{ebf.edition.id}} {% if ebf.asking %}(This file has had the campaign 'ask' added.){% endif %}
{% if ebf.active %}ACTIVE {% endif %}MOBI file: {{ebf.file}}
created {{ebf.created}} for edition {{ebf.edition_id}} {% if ebf.asking %}(This file has had the campaign 'ask' added.){% endif %}
{% if ebf.active %}ACTIVE {% endif %}PDF file: {{ebf.file}}
created {{ebf.created}} for edition {{ebf.edition.id}} {% if ebf.asking %}(This file has had the campaign 'ask' added.){% endif %}
{% if ebf.active %}ACTIVE {% endif %}PDF file: {{ebf.file}}
created {{ebf.created}} for edition {{ebf.edition_id}} {% if ebf.asking %}(This file has had the campaign 'ask' added.){% endif %}
A strong ask/motivation combination:
{% else %}This will be displayed in the Campaign tab for your work. It's your main pitch to supporters/purchasers, and your chance to share your passion for this work, and to inspire readers..
@@ -485,7 +485,7 @@ Please fix the following before launching your campaign:Before you hit launch:
If it doesn't look exactly the way you like, or you're having any trouble with your description, we're happy to help; please contact us.
@@ -529,7 +529,7 @@ Please fix the following before launching your campaign: {% endif %} {% ifequal campaign.type 1 %}When you're logged in, the "Ungluers" tab on the campaign page will tell you a bit about each ungluer- when they last pledged, for example, and you can send individual messages to each ungluer. Use this tool with care! You can see who your biggest supporters are by looking at the sample acknowledgement page. +
When you're logged in, the "Ungluers" tab on the campaign page will tell you a bit about each ungluer- when they last pledged, for example, and you can send individual messages to each ungluer. Use this tool with care! You can see who your biggest supporters are by looking at the sample acknowledgement page. After your campaign succeeds, you can used this page to generate epub code for the acknowledgements section of your unglued ebook.
{% else %} diff --git a/frontend/templates/manage_ebooks.html b/frontend/templates/manage_ebooks.html index 715c69dd..157cf690 100644 --- a/frontend/templates/manage_ebooks.html +++ b/frontend/templates/manage_ebooks.html @@ -31,7 +31,7 @@ onload = function(){ {% block doccontent %} -This ebook is made available to you by {{ acq.lib_acq.user.username }} for your personal use only, and a personal license has been embedded in the ebook file. You may download as many times as you need to until {{ acq.expires }}. If you want to use the ebook after that, please consider buying a copy for yourself. Doing so will bring closer the day when this ebook is free for everyone to read.
-For more information about the book, visit the book's unglue.it page. +
For more information about the book, visit the book's unglue.it page.
{{ acq.lib_acq.user.username }} and the Unglue.it team
diff --git a/frontend/templates/notification/library_reserve/full.txt b/frontend/templates/notification/library_reserve/full.txt index 39a8c3b6..1ec3c414 100644 --- a/frontend/templates/notification/library_reserve/full.txt +++ b/frontend/templates/notification/library_reserve/full.txt @@ -1,11 +1,11 @@ {{ acq.work.title }} is reserved for you from {{ acq.lib_acq.user.username }} until {{ acq.expires }}. You can borrow the ebook by downloading it from the book's download page: -https://{{ current_site.domain }}{% url 'download' acq.work.id %} +https://{{ current_site.domain }}{% url 'download' acq.work_id %} If you don't download the book before {{ acq.expires }}, other members of {{ acq.lib_acq.user.username }} will be able to use it instead. This ebook is made available to you by {{ acq.lib_acq.user.username }} for your personal use only, and a personal license will be embedded in the ebook file. If you do not download the ebook before then, the ebook may be borrowed by another {{ acq.lib_acq.user.username }} member. For more information about the book, visit the book's unglue.it page at -https://{{ current_site.domain }}{% url 'work' acq.work.id %} +https://{{ current_site.domain }}{% url 'work' acq.work_id %} {{ acq.lib_acq.user.username }} and the Unglue.it team \ No newline at end of file diff --git a/frontend/templates/notification/library_reserve/notice.html b/frontend/templates/notification/library_reserve/notice.html index 9074abc9..f5b2ac21 100644 --- a/frontend/templates/notification/library_reserve/notice.html +++ b/frontend/templates/notification/library_reserve/notice.html @@ -2,18 +2,18 @@ {% block comments_book %} - + {% endblock %} {% block comments_graphical %} - {{ acq.work.title }} is reserved for you from {{ acq.lib_acq.user.username }} until {{ acq.expires }}. Until then, you can borrow the ebook at the book's download page. + {{ acq.work.title }} is reserved for you from {{ acq.lib_acq.user.username }} until {{ acq.expires }}. Until then, you can borrow the ebook at the book's download page. {% endblock %} {% block comments_textual %}This ebook is made available to you by {{ acq.lib_acq.user.username }} for your personal use only, and a personal license will be embedded in the ebook file. If you do not download the ebook before then, the ebook may be borrowed by another {{ acq.lib_acq.user.username }} member.
-For more information about the book, visit the book's unglue.it page. +
For more information about the book, visit the book's unglue.it page.
{{ acq.lib_acq.user.username }} and the Unglue.it team
diff --git a/frontend/templates/notification/pledge_charged/full.txt b/frontend/templates/notification/pledge_charged/full.txt index f4427ebc..5d4ce7fd 100644 --- a/frontend/templates/notification/pledge_charged/full.txt +++ b/frontend/templates/notification/pledge_charged/full.txt @@ -8,7 +8,7 @@ Pledge summary We will notify you when the unglued ebook is available for you to read. If you've requested special premiums, the campaign manager, {{ transaction.campaign.rightsholder }}, will be in touch with you via email to request any information needed to deliver your premium. If you'd like to visit the campaign page, click here: -https://{{ current_site.domain }}{% url 'work' transaction.campaign.work.id %} +https://{{ current_site.domain }}{% url 'work' transaction.campaign.work_id %} Thank you again for your support. diff --git a/frontend/templates/notification/pledge_charged/notice.html b/frontend/templates/notification/pledge_charged/notice.html index fcb23ff8..7f623b8e 100644 --- a/frontend/templates/notification/pledge_charged/notice.html +++ b/frontend/templates/notification/pledge_charged/notice.html @@ -3,11 +3,11 @@ {% load humanize %} {% block comments_book %} - + {% endblock %} {% block comments_graphical %} - Hooray! The campaign for {{ transaction.campaign.work.title }} has succeeded. Your credit card has been charged ${{ transaction.amount|floatformat:2|intcomma }}. Thank you again for your help. + Hooray! The campaign for {{ transaction.campaign.work.title }} has succeeded. Your credit card has been charged ${{ transaction.amount|floatformat:2|intcomma }}. Thank you again for your help. {% endblock %} {% block comments_textual %} @@ -21,7 +21,7 @@We will notify you when the unglued ebook is available for you to read. If you've requested special premiums, the campaign manager, {{ transaction.campaign.rightsholder }}, will be in touch with you via email to request any information needed to deliver your premium.
-For more information, visit the campaign page. +
For more information, visit the campaign page.
Thank you again for your support.
diff --git a/frontend/templates/notification/pledge_failed/full.txt b/frontend/templates/notification/pledge_failed/full.txt
index f5da3f23..0ef88f7d 100644
--- a/frontend/templates/notification/pledge_failed/full.txt
+++ b/frontend/templates/notification/pledge_failed/full.txt
@@ -11,7 +11,7 @@ Transaction summary {% endifequal %}
{% include "notification/pledge_summary.txt" %}
If you'd like to visit the campaign page, click here:
-https://{{ current_site.domain }}{% url 'work' transaction.campaign.work.id %}
+https://{{ current_site.domain }}{% url 'work' transaction.campaign.work_id %}
Thank you again for your support.
diff --git a/frontend/templates/notification/pledge_failed/notice.html b/frontend/templates/notification/pledge_failed/notice.html
index a5d3b7b6..95f8f9bb 100644
--- a/frontend/templates/notification/pledge_failed/notice.html
+++ b/frontend/templates/notification/pledge_failed/notice.html
@@ -3,11 +3,11 @@
{% load humanize %}
{% block comments_book %}
-
+
{% endblock %}
{% block comments_graphical %}
- {% ifequal transaction.campaign.type 1 %}The campaign for {{ transaction.campaign.work.title }} has succeeded. However, our attempt to charge your pledge for ${{ transaction.amount|floatformat:2|intcomma }} to your credit card failed ({{transaction.error}}). Will you help us fix that?{% else %}Our attempt to charge a purchase of ${{ transaction.amount|floatformat:2|intcomma }} to your credit card failed ({{transaction.error}}).{% endifequal %}
+ {% ifequal transaction.campaign.type 1 %}The campaign for {{ transaction.campaign.work.title }} has succeeded. However, our attempt to charge your pledge for ${{ transaction.amount|floatformat:2|intcomma }} to your credit card failed ({{transaction.error}}). Will you help us fix that?{% else %}Our attempt to charge a purchase of ${{ transaction.amount|floatformat:2|intcomma }} to your credit card failed ({{transaction.error}}).{% endifequal %}
{% endblock %}
{% block comments_textual %}
@@ -33,7 +33,7 @@
Amount of purchase: {{ transaction.amount|floatformat:2|intcomma }}
For more information, visit the campaign page. +
For more information, visit the campaign page.
Thank you again for your support. diff --git a/frontend/templates/notification/pledge_status_change/full.txt b/frontend/templates/notification/pledge_status_change/full.txt index bef4c585..446e48e2 100644 --- a/frontend/templates/notification/pledge_status_change/full.txt +++ b/frontend/templates/notification/pledge_status_change/full.txt @@ -11,7 +11,7 @@ Your new pledge summary {% endif %} If you'd like to visit the campaign page or make changes, click here: -https://{{current_site.domain}}{% url 'work' transaction.campaign.work.id %} +https://{{current_site.domain}}{% url 'work' transaction.campaign.work_id %} Thank you again for your support. diff --git a/frontend/templates/notification/pledge_status_change/notice.html b/frontend/templates/notification/pledge_status_change/notice.html index d32791cc..366b12ea 100644 --- a/frontend/templates/notification/pledge_status_change/notice.html +++ b/frontend/templates/notification/pledge_status_change/notice.html @@ -3,7 +3,7 @@ {% load humanize %} {% block comments_book %} - + {% endblock %} {% block comments_graphical %} diff --git a/frontend/templates/notification/pledge_summary.txt b/frontend/templates/notification/pledge_summary.txt index d7e87375..f94994fe 100644 --- a/frontend/templates/notification/pledge_summary.txt +++ b/frontend/templates/notification/pledge_summary.txt @@ -10,7 +10,7 @@ You will also be acknowledged as follows: - You will be listed in the ebook as a Bibliophile using the name "{{ transaction.extra.ack_name }}" with a link to your Unglue.it supporter page.{% endifequal %}{% endif %}{% ifequal transaction.tier 3 %}{% if transaction.extra.ack_dedication %} - The following dedication will be included in the ebook: {{ transaction.extra.ack_dedication }}{% else %} -- You were eligible to include a dedication in the unglued ebook, but did not choose to do so. If you like, you can change this at https://{{ current_site.domain }}{% url 'pledge_modify' work_id=transaction.campaign.work.id %}. +- You were eligible to include a dedication in the unglued ebook, but did not choose to do so. If you like, you can change this at https://{{ current_site.domain }}{% url 'pledge_modify' work_id=transaction.campaign.work_id %}. {% endif %}{% endifequal %}{% else %} Amount charged: ${{ transaction.amount|floatformat:2|intcomma }} diff --git a/frontend/templates/notification/pledge_you_have_pledged/full.txt b/frontend/templates/notification/pledge_you_have_pledged/full.txt index 10447942..b5be79bc 100644 --- a/frontend/templates/notification/pledge_you_have_pledged/full.txt +++ b/frontend/templates/notification/pledge_you_have_pledged/full.txt @@ -6,16 +6,16 @@ Pledge summary You can help even more by sharing this campaign with your friends. -Facebook: https://www.facebook.com/sharer.php?u=https://{{ current_site.domain }}{% url 'work' transaction.campaign.work.id %} +Facebook: https://www.facebook.com/sharer.php?u=https://{{ current_site.domain }}{% url 'work' transaction.campaign.work_id %} -Twitter: https://twitter.com/intent/tweet?url=https://{{ current_site.domain }}{% url 'work' transaction.campaign.work.id %}&text=I%27m%20ungluing%20{{ title|urlencode }}%20at%20%40unglueit.%20Join%20me%21" +Twitter: https://twitter.com/intent/tweet?url=https://{{ current_site.domain }}{% url 'work' transaction.campaign.work_id %}&text=I%27m%20ungluing%20{{ title|urlencode }}%20at%20%40unglueit.%20Join%20me%21" You can also embed a widget for {{ transaction.campaign.work.title }} in your web site by copy/pasting the following: Or the best idea: talk about it with those you love. We'll need lots of help from lots of people to make this a success. -If you want to change your pledge, just use the button at https://{{ current_site.domain }}{% url 'work' transaction.campaign.work.id %} +If you want to change your pledge, just use the button at https://{{ current_site.domain }}{% url 'work' transaction.campaign.work_id %} If you have any problems with your pledge, don't hesitate to contact us at support@gluejar.com diff --git a/frontend/templates/notification/pledge_you_have_pledged/notice.html b/frontend/templates/notification/pledge_you_have_pledged/notice.html index 9461a31d..c4601afb 100644 --- a/frontend/templates/notification/pledge_you_have_pledged/notice.html +++ b/frontend/templates/notification/pledge_you_have_pledged/notice.html @@ -3,19 +3,19 @@ {% load humanize %} {% block comments_book %} - + {% endblock %} {% block comments_graphical %} - You've just pledged ${{ transaction.amount|floatformat:2|intcomma }} to {{ transaction.campaign.work.title }}. + You've just pledged ${{ transaction.amount|floatformat:2|intcomma }} to {{ transaction.campaign.work.title }}. {% endblock %} {% block comments_textual %}
Thank you, {{ transaction.user.username }}!
-You've just pledged ${{ transaction.amount|floatformat:2|intcomma }} to {{ transaction.campaign.work.title }}. If it reaches its goal of ${{ transaction.campaign.target|intcomma }} by {{ transaction.campaign.deadline|date:"M d Y"}}, it will be unglued for all to enjoy.
+You've just pledged ${{ transaction.amount|floatformat:2|intcomma }} to {{ transaction.campaign.work.title }}. If it reaches its goal of ${{ transaction.campaign.target|intcomma }} by {{ transaction.campaign.deadline|date:"M d Y"}}, it will be unglued for all to enjoy.
You can help even more by sharing this campaign with your friends!
- {% url 'work' transaction.campaign.work.id as work_url %} + {% url 'work' transaction.campaign.work_id as work_url %} {% include "notification/sharing_block.html" %}Thanks for being part of Unglue.it.
diff --git a/frontend/templates/notification/purchase_complete/full.txt b/frontend/templates/notification/purchase_complete/full.txt index 9d3dafa5..9f177f99 100644 --- a/frontend/templates/notification/purchase_complete/full.txt +++ b/frontend/templates/notification/purchase_complete/full.txt @@ -10,19 +10,19 @@ https://{{ current_site.domain }}{% url 'receive_gift' gift.acq.nonce %} You can send the url yourself if there's been any problem with the email. {% else %}If you have not already done so, download your ebook at -https://{{ current_site.domain }}{% url 'download' transaction.campaign.work.id %} +https://{{ current_site.domain }}{% url 'download' transaction.campaign.work_id %} {% endif %}{% endifequal %}{% ifequal transaction.campaign.type 2 %}Thanks to you and other ungluers, {{ transaction.campaign.work.title }} will be eventually be released to the world in an unglued ebook edition. Thanks to your purchase, the ungluing date advanced {{ transaction.offer.days_per_copy|floatformat }}{% ifnotequal transaction.extra.copies 1 %} x {{ transaction.extra.copies }}{% endifnotequal %} days to {{ transaction.campaign.cc_date }}. {% ifequal transaction.offer.license 1 %}{% if not gift %} This ebook is licensed to you personally, and your personal license has been embedded in the ebook file. You may download as many times as you need to, but you can't make copies for the use of others until the ungluing date. You can make that date come sooner by encouraging your friends to buy a copy. {% endif %}{% else %} This ebook {% ifnotequal transaction.extra.copies 1 %}({{ transaction.extra.copies }} copies){% endifnotequal %} is licensed to your library and its license has been embedded in the ebook file. If you'd like to be the first to use it, please get your copy now at -https://{{ current_site.domain }}{% url 'borrow' transaction.campaign.work.id %} +https://{{ current_site.domain }}{% url 'borrow' transaction.campaign.work_id %} After an hour, the ebook will be available to all of your library's users on a one-user-per two weeks basis until the ungluing date, when it will be free to all. You can make that date come sooner by encouraging your friends to buy a copy.{% endifequal %}{% endifequal %}{% ifequal transaction.campaign.type 3 %}The creators of {{ transaction.campaign.work.title }} would like to thank you for showing your appreciation for making it free.{% endifequal %} For more information about the book, visit the book's unglue.it page at -https://{{ current_site.domain }}{% url 'work' transaction.campaign.work.id %} +https://{{ current_site.domain }}{% url 'work' transaction.campaign.work_id %} Thank you again for your support. diff --git a/frontend/templates/notification/purchase_complete/notice.html b/frontend/templates/notification/purchase_complete/notice.html index 5abb2b7f..36e4f3eb 100644 --- a/frontend/templates/notification/purchase_complete/notice.html +++ b/frontend/templates/notification/purchase_complete/notice.html @@ -3,7 +3,7 @@ {% load humanize %} {% block comments_book %} - + {% endblock %} {% block comments_graphical %} @@ -31,7 +31,7 @@ https://{{ current_site.domain }}{% url 'receive_gift' gift.acq.nonce %} You can send the url yourself if there's been any problem with the email. {% else %} -If you have not already done so, download your ebook at the book's download page. +If you have not already done so, download your ebook at the book's download page. {% endif %}{% endifequal %} {% endblock %} @@ -43,14 +43,14 @@ If you have not already done so, download your ebook at get your copy now. After an hour, the ebook will be available to all of your library's users on a one-user-per two weeks basis until the ungluing date, when it will be free to all. You can make that date come sooner by encouraging your friends to buy a copy. +This ebook {% ifnotequal transaction.extra.copies 1 %}({{ transaction.extra.copies }} copies){% endifnotequal %} is licensed to your library and its license has been embedded in the ebook file. If you'd like to be the first to use it, please get your copy now. After an hour, the ebook will be available to all of your library's users on a one-user-per two weeks basis until the ungluing date, when it will be free to all. You can make that date come sooner by encouraging your friends to buy a copy.
{% endifequal %} {% endifequal %} {% ifequal transaction.campaign.type 3 %}The creators of {{ transaction.campaign.work.title }} would like to thank you for showing your appreciation for making it free.
{% endifequal %} -For more information about the book, visit the book's unglue.it page. +
For more information about the book, visit the book's unglue.it page.
Thank you again for your support.
diff --git a/frontend/templates/notification/purchase_gift/full.txt b/frontend/templates/notification/purchase_gift/full.txt index e92266cb..7a9e9a2b 100644 --- a/frontend/templates/notification/purchase_gift/full.txt +++ b/frontend/templates/notification/purchase_gift/full.txt @@ -16,7 +16,7 @@ Unglue.it is a website whose purpose is to help ebooks become free. Thanks to "{ For more information about the book, visit the book's unglue.it page at -https://{{ current_site.domain }}{% url 'work' gift.acq.work.id %} +https://{{ current_site.domain }}{% url 'work' gift.acq.work_id %} We hope enjoy your new ebook, and we hope you like Unglue.it! diff --git a/frontend/templates/notification/purchase_gift/notice.html b/frontend/templates/notification/purchase_gift/notice.html index e5d8fbae..ba68081b 100644 --- a/frontend/templates/notification/purchase_gift/notice.html +++ b/frontend/templates/notification/purchase_gift/notice.html @@ -3,7 +3,7 @@ {% load humanize %} {% block comments_book %} - + {% endblock %} {% block comments_graphical %} @@ -22,10 +22,10 @@ To pick up {{ gift.acq.work.title }}, the ebook that {{ gift.giver }} and other ungluers, {{ gift.acq.work.title }} will be eventually be released to the world in an unglued ebook edition. +Thanks to {{ gift.giver }} and other ungluers, {{ gift.acq.work.title }} will be eventually be released to the world in an unglued ebook edition.-For more information about the book, visit the book's unglue.it page +For more information about the book, visit the book's unglue.it page
diff --git a/frontend/templates/notification/purchase_gift_waiting/full.txt b/frontend/templates/notification/purchase_gift_waiting/full.txt index e0a0f981..74c17a0c 100644 --- a/frontend/templates/notification/purchase_gift_waiting/full.txt +++ b/frontend/templates/notification/purchase_gift_waiting/full.txt @@ -16,7 +16,7 @@ The ebook will be licensed to you personally, and the license will be embedded i Unglue.it is a website whose purpose is to help ebooks become free. Thanks to "{{ gift.giver }}" and other "ungluers", "{{ gift.acq.work.title }}" will be eventually be released in an "unglued" ebook edition, i.e. free to everyone. Purchases of "{{ gift.acq.work.title }}" are helping to make that free edition financially possible. For more information about the book, visit the book's unglue.it page at -https://{{ current_site.domain }}{% url 'work' gift.acq.work.id %} +https://{{ current_site.domain }}{% url 'work' gift.acq.work_id %} We hope enjoy your new ebook, and we hope you like Unglue.it! diff --git a/frontend/templates/notification/purchase_gift_waiting/notice.html b/frontend/templates/notification/purchase_gift_waiting/notice.html index e5d8fbae..ba68081b 100644 --- a/frontend/templates/notification/purchase_gift_waiting/notice.html +++ b/frontend/templates/notification/purchase_gift_waiting/notice.html @@ -3,7 +3,7 @@ {% load humanize %} {% block comments_book %} - + {% endblock %} {% block comments_graphical %} @@ -22,10 +22,10 @@ To pick up {{ gift.acq.work.title }}, the ebook that {{ gift.giver }} and other ungluers, {{ gift.acq.work.title }} will be eventually be released to the world in an unglued ebook edition. +Thanks to {{ gift.giver }} and other ungluers, {{ gift.acq.work.title }} will be eventually be released to the world in an unglued ebook edition.
-For more information about the book, visit the book's unglue.it page +For more information about the book, visit the book's unglue.it page
diff --git a/frontend/templates/notification/purchase_got_gift/notice.html b/frontend/templates/notification/purchase_got_gift/notice.html
index e86d0149..e0d734d1 100644
--- a/frontend/templates/notification/purchase_got_gift/notice.html
+++ b/frontend/templates/notification/purchase_got_gift/notice.html
@@ -3,7 +3,7 @@
{% load humanize %}
{% block comments_book %}
-
+
{% endblock %}
{% block comments_graphical %}
diff --git a/frontend/templates/notification/purchase_notgot_gift/notice.html b/frontend/templates/notification/purchase_notgot_gift/notice.html
index a7d67c35..b58f25b3 100644
--- a/frontend/templates/notification/purchase_notgot_gift/notice.html
+++ b/frontend/templates/notification/purchase_notgot_gift/notice.html
@@ -3,7 +3,7 @@
{% load humanize %}
{% block comments_book %}
-
+
{% endblock %}
{% block comments_graphical %}
diff --git a/frontend/templates/notification/rights_holder_claim/full.txt b/frontend/templates/notification/rights_holder_claim/full.txt
index b9d4bcc0..507b12bd 100644
--- a/frontend/templates/notification/rights_holder_claim/full.txt
+++ b/frontend/templates/notification/rights_holder_claim/full.txt
@@ -3,7 +3,7 @@
You are now free to start a campaign to sell or unglue your work. If you're logged in, you will see the option to open a campaign at https://{{ current_site.domain }}/rightsholders . (You can also find this page by clicking on "Rights Holder Tools" at the bottom of any Unglue.it page.)
-To run a campaign, you'll need to set up campaign parameters. You'll also need to write a pitch. For Pledge-to-Unglue and Buy-to-Unglue campaigns, this will appear in the Description tab on your book's page (https://{{ current_site.domain }}{% url 'work' claim.work.id %}). Think about who your book's audience is, and remind them why they'll love this book -- your pitch is not a catalog page! We encourage video, audio, and links to make your pitch come alive. For Thanks-for-Ungluing, your pitch will occur when the user clicks a Download button. You should emphasize how the ungluer's support enables you to keep doing what you do. Feel free to email us (rights@gluejar.com) if you need any help with this.
+To run a campaign, you'll need to set up campaign parameters. You'll also need to write a pitch. For Pledge-to-Unglue and Buy-to-Unglue campaigns, this will appear in the Description tab on your book's page (https://{{ current_site.domain }}{% url 'work' claim.work_id %}). Think about who your book's audience is, and remind them why they'll love this book -- your pitch is not a catalog page! We encourage video, audio, and links to make your pitch come alive. For Thanks-for-Ungluing, your pitch will occur when the user clicks a Download button. You should emphasize how the ungluer's support enables you to keep doing what you do. Feel free to email us (rights@gluejar.com) if you need any help with this.
If you're running a Buy-to-Unglue or Thanks-for-Ungluing Campaign, now is the time to upload your digital files. For Buy-to-Unglue, you need to decide on revenue targets and pricing for individual and library licenses.
@@ -14,10 +14,10 @@ Finally, think about how you're going to publicize your campaign: social media,
We're thrilled to be working with you.
{% endifequal %}
{% ifequal claim.status 'pending' %}
-{{ claim.rights_holder }}'s claim to {{ claim.work.title }} (https://{{ current_site.domain }}{% url 'work' claim.work.id %}) on Unglue.it has been entered. Our team will examine the claim and get back to you soon.
+{{ claim.rights_holder }}'s claim to {{ claim.work.title }} (https://{{ current_site.domain }}{% url 'work' claim.work_id %}) on Unglue.it has been entered. Our team will examine the claim and get back to you soon.
{% endifequal %}
{% ifequal claim.status 'release' %}
-{{ claim.rights_holder }}'s claim to {{ claim.work.title }} (https://{{ current_site.domain }}{% url 'work' claim.work.id %}) on Unglue.it has been released. email us (rights@gluejar.com) if you have any questions about this.
+{{ claim.rights_holder }}'s claim to {{ claim.work.title }} (https://{{ current_site.domain }}{% url 'work' claim.work_id %}) on Unglue.it has been released. email us (rights@gluejar.com) if you have any questions about this.
{% endifequal %}
The Unglue.it team
\ No newline at end of file
diff --git a/frontend/templates/notification/rights_holder_claim/notice.html b/frontend/templates/notification/rights_holder_claim/notice.html
index 63a14197..340844ee 100644
--- a/frontend/templates/notification/rights_holder_claim/notice.html
+++ b/frontend/templates/notification/rights_holder_claim/notice.html
@@ -2,7 +2,7 @@
{% block comments_book %}
-
+
{% endblock %}
{% block comments_graphical %}
@@ -17,7 +17,7 @@
You are now free to start a campaign to sell or unglue your work. If you're logged in, you can open a campaign. (You can also find this page by clicking on "Rights Holder Tools" at the bottom of any Unglue.it page.)
-To run a campaign, you'll need to set up campaign parameters. You'll also need to write a pitch. For Pledge-to-Unglue and Buy-to-Unglue campaigns, this will appear in the Description tab on your book's work page. Think about who your book's audience is, and remind them why they'll love this book -- your pitch is not a catalog page! We encourage video, audio, and links to make your pitch come alive. For Thanks-for-Ungluing, your pitch will occur when the user clicks a Download button. You should emphasize how the ungluer's support enables you to keep doing what you do. Feel free to email us (rights@gluejar.com) if you need any help with this.
+To run a campaign, you'll need to set up campaign parameters. You'll also need to write a pitch. For Pledge-to-Unglue and Buy-to-Unglue campaigns, this will appear in the Description tab on your book's work page. Think about who your book's audience is, and remind them why they'll love this book -- your pitch is not a catalog page! We encourage video, audio, and links to make your pitch come alive. For Thanks-for-Ungluing, your pitch will occur when the user clicks a Download button. You should emphasize how the ungluer's support enables you to keep doing what you do. Feel free to email us (rights@gluejar.com) if you need any help with this.
If you're running a Buy-to-Unglue or Thanks-for-Ungluing Campaign, now is the time to upload your digital files. For Buy-to-Unglue, you need to decide on revenue targets and pricing for individual and library licenses.
@@ -28,9 +28,9 @@ Finally, think about how you're going to publicize your campaign: social media,
We're thrilled to be working with you.
{% endifequal %}
{% ifequal claim.status 'pending' %}
- The claim for {{ claim.work.title }} will be examined, and we'll email you. Contact us if you need any help.
+ The claim for {{ claim.work.title }} will be examined, and we'll email you. Contact us if you need any help.
{% endifequal %}
{% ifequal claim.status 'release' %}
- The claim for {{ claim.work.title }} has been released. Contact us at rights@gluejar.com if you have questions.
+ The claim for {{ claim.work.title }} has been released. Contact us at rights@gluejar.com if you have questions.
{% endifequal %}
{% endblock %}
diff --git a/frontend/templates/notification/wishlist_active/full.txt b/frontend/templates/notification/wishlist_active/full.txt
index 68cd3243..f5635255 100644
--- a/frontend/templates/notification/wishlist_active/full.txt
+++ b/frontend/templates/notification/wishlist_active/full.txt
@@ -2,22 +2,22 @@
You can help!
-Pledge toward ungluing. https://{{ current_site.domain }}{% url 'pledge' work_id=campaign.work.id %}
+Pledge toward ungluing. https://{{ current_site.domain }}{% url 'pledge' work_id=campaign.work_id %}
{% endifequal %}{% ifequal campaign.type 2 %}Great, you wished for it, and now there is a campaign for {{ campaign.work.title }} to be unglued. Someday, the book will be released under a Creative Commons license for everyone to enjoy. Every copy purchased until then brings that day {{ campaign.day_per_copy|floatformat }} days sooner.
You can help!
-Buy a copy to help unglue the book. https://{{ current_site.domain }}{% url 'purchase' work_id=campaign.work.id %}
+Buy a copy to help unglue the book. https://{{ current_site.domain }}{% url 'purchase' work_id=campaign.work_id %}
{% endifequal %}{% ifequal campaign.type 3 %}There is a new "Thanks for Ungluing" campaign for {{ campaign.work.title }} one of your Creative Commons license favorites.
-Join us in thanking the creators! Download a copy and leave a contribution. https://{{ current_site.domain }}{% url 'download' work_id=campaign.work.id %}
+Join us in thanking the creators! Download a copy and leave a contribution. https://{{ current_site.domain }}{% url 'download' work_id=campaign.work_id %}
{% endifequal %}
-Tell your friends -- there are handy share options on the campaign page. There's even a widget you can put on your blog or home page. https://{{ current_site.domain }}{% url 'work' campaign.work.id %}
+Tell your friends -- there are handy share options on the campaign page. There's even a widget you can put on your blog or home page. https://{{ current_site.domain }}{% url 'work' campaign.work_id %}
-Join the discussion: share why you love {{ campaign.work.title }} and the world will too. https://{{ current_site.domain }}{% url 'work' campaign.work.id %}?tab=2
+Join the discussion: share why you love {{ campaign.work.title }} and the world will too. https://{{ current_site.domain }}{% url 'work' campaign.work_id %}?tab=2
Thank you!
diff --git a/frontend/templates/notification/wishlist_active/notice.html b/frontend/templates/notification/wishlist_active/notice.html
index cf6ae3d4..14bed6b9 100644
--- a/frontend/templates/notification/wishlist_active/notice.html
+++ b/frontend/templates/notification/wishlist_active/notice.html
@@ -3,24 +3,24 @@
{% load humanize %}
{% block comments_book %}
-
+
{% endblock %}
{% block comments_graphical %}
- The rights holder, {{ campaign.rightsholder }}, has launched a campaign for {{ campaign.work.title }}!
+ The rights holder, {{ campaign.rightsholder }}, has launched a campaign for {{ campaign.work.title }}!
{% endblock %}
{% block comments_textual %}
{% ifequal campaign.type 1 %}