-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Gold Member marketing #4063
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,9 @@ Good questions for Stack Overflow would be: | |
Community Support | ||
----------------- | ||
|
||
Read the Docs is a community supported site, | ||
nobody is paid to handle readthedocs.org support. | ||
We are hoping to bring in enough money with our `Gold`_ program to change that, | ||
so please sign up if you are able. | ||
Read the Docs is a community- and ad-supported site. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Read the Docs is supported by community contributions and advertising. |
||
We hope to bring in enough money | ||
with our `Gold`_ and `Ethical Ads`_ programs to keep Read the Docs sustainable. | ||
|
||
**All people answering your questions are doing it with their own time, | ||
so please be kind and provide as much information as possible.** | ||
|
@@ -58,5 +57,5 @@ or read more at https://readthedocs.com/services/#open-source-support. | |
|
||
.. _Stack Overflow: http://stackoverflow.com/questions/tagged/read-the-docs | ||
.. _Github Issue Tracker: https://github.com/rtfd/readthedocs.org/issues | ||
.. _sign up: https://readthedocs.org/accounts/gold/ | ||
.. _Gold: https://readthedocs.org/accounts/gold/ | ||
.. _Ethical Ads: https://docs.readthedocs.io/en/latest/ethical-advertising.html |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,6 +59,9 @@ <h2>Read the Docs Gold</h2> | |
we suggest giving at least $20/month to help cover our support and operations costs. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like these other parts of the page are just blabbing in an awkward way also. I'm almost tempted to just remove them? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll give it a read and see if there's anything that should be removed. I tried to remove anything inaccurate already. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do think everything around domains can be deleted once we get Lets Encrypt support. I don't quite think I'll delete that yet. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why would LE support change our infra cost for domains? If anything, it would increase the overhead we have for each domain we serve, managing the certs, etc. |
||
{% endblocktrans %} | ||
</p> | ||
|
||
<p>{% trans 'Becoming a Gold Member also makes Read the Docs ad-free for as long as you are logged-in.' %}</p> | ||
|
||
<p> | ||
{% blocktrans %} | ||
You can also make one-time donations on our <a href="https://readthedocs.org/sustainability/">sustainability</a> page. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,8 +13,9 @@ | |
from django.http import Http404, HttpResponseRedirect | ||
from django.shortcuts import get_object_or_404, redirect, render | ||
from django.template.context import RequestContext | ||
from django.utils.translation import ugettext_lazy as _ | ||
|
||
from readthedocs.core.forms import UserDeleteForm | ||
from readthedocs.core.forms import UserDeleteForm, UserAdvertisingForm | ||
|
||
|
||
def create_profile( | ||
|
@@ -279,3 +280,34 @@ def profile_detail( | |
|
||
context.update({'profile': profile_obj}) | ||
return render(request, template_name, context=context) | ||
|
||
|
||
def account_advertising(request): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this need a login_requires decorator? Guessing it will blow up with a non-logged in user otherwise? |
||
success_url = reverse(account_advertising) | ||
|
||
try: | ||
profile_obj = request.user.profile | ||
except ObjectDoesNotExist: | ||
return HttpResponseRedirect(reverse('profiles_profile_create')) | ||
|
||
if request.method == 'POST': | ||
form = UserAdvertisingForm( | ||
data=request.POST, | ||
instance=profile_obj, | ||
) | ||
if form.is_valid(): | ||
form.save() | ||
messages.info(request, _('Updated your advertising preferences')) | ||
return HttpResponseRedirect(success_url) | ||
else: | ||
form = UserAdvertisingForm(instance=profile_obj) | ||
|
||
return render( | ||
request, | ||
'profiles/private/advertising_profile.html', | ||
context={ | ||
'form': form, | ||
'profile': profile_obj, | ||
'user': profile_obj.user, | ||
}, | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{% extends "profiles/base_profile_edit.html" %} | ||
|
||
{% load i18n %} | ||
|
||
{% block title %}{% trans "Set advertising preferences" %}{% endblock %} | ||
|
||
{% block profile-admin-advertising %}active{% endblock %} | ||
|
||
{% block edit_content_header %} {% trans "Set advertising preferences" %} {% endblock %} | ||
|
||
{% block edit_content %} | ||
<p> | ||
{% blocktrans %} | ||
Read the Docs is an open source project. | ||
In order to maintain service, we rely on both the | ||
support of our users, and from sponsor support. | ||
{% endblocktrans %} | ||
</p> | ||
|
||
<p> | ||
{% blocktrans %} | ||
For more details on advertising on Read the Docs | ||
including the privacy protections we have in place for users | ||
and community advertising we run on behalf of the open source community, | ||
see <a href="https://docs.readthedocs.io/en/latest/ethical-advertising.html">our documentation</a>. | ||
{% endblocktrans %} | ||
</p> | ||
|
||
{% if request.user.gold.exists or request.user.goldonce.exists %} | ||
<p> | ||
{% blocktrans %} | ||
<strong>Note:</strong> | ||
Since you are a Gold Member or donor, you <strong>will not</strong> see advertising as long as you are logged-in. | ||
Thank you for supporting Read the Docs. | ||
{% endblocktrans%} | ||
</p> | ||
{% else %} | ||
<p> | ||
{% url "gold_detail" as gold_detail %} | ||
{% blocktrans %} | ||
You may remove ads completely by becoming a <a href="{{ gold_detail }}">Gold member to Read the Docs</a>. | ||
{% endblocktrans %} | ||
</p> | ||
{% endif %} | ||
|
||
<form method="POST" action="."> | ||
{% csrf_token %} | ||
{{ form.as_p }} | ||
<input type="submit" name="submit" value="{% trans "Update advertisement preference" %}" id="submit"/> | ||
</form> | ||
{% endblock %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason the
to
feels weird here. I guess it implies a subscription? That makes sense, just reads weird to me and I'm not 100% sure why.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
of
is better thanto
.