Skip to content
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

Better help text for privacy level #3444

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 125 additions & 0 deletions readthedocs/projects/migrations/0024_auto_20171222_1938.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.12 on 2017-12-22 19:38
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('projects', '0023_migrate-alias-slug'),
]

operations = [
migrations.AlterField(
model_name='domain',
name='canonical',
field=models.BooleanField(default=False, help_text='This Domain is the primary one where the documentation is served from'),
),
migrations.AlterField(
model_name='domain',
name='count',
field=models.IntegerField(default=0, help_text='Number of times this domain has been hit'),
),
migrations.AlterField(
model_name='project',
name='allow_promos',
field=models.BooleanField(default=True, help_text='If unchecked, users will still see community ads.', verbose_name='Allow paid advertising'),
),
migrations.AlterField(
model_name='project',
name='canonical_url',
field=models.URLField(blank=True, help_text='URL that documentation is expected to serve from.', verbose_name='Canonical URL'),
),
migrations.AlterField(
model_name='project',
name='comment_moderation',
field=models.BooleanField(default=False, verbose_name='Comment Moderation'),
),
migrations.AlterField(
model_name='project',
name='conf_py_file',
field=models.CharField(blank=True, default='', help_text='Path from project root to <code>conf.py</code> file (ex. <code>docs/conf.py</code>). Leave blank if you want us to find it for you.', max_length=255, verbose_name='Python configuration file'),
),
migrations.AlterField(
model_name='project',
name='container_mem_limit',
field=models.CharField(blank=True, help_text='Memory limit in Docker format -- example: <code>512m</code> or <code>1g</code>.', max_length=10, null=True, verbose_name='Container memory limit'),
),
migrations.AlterField(
model_name='project',
name='copyright',
field=models.CharField(blank=True, help_text='Project copyright information.', max_length=255, verbose_name='Copyright'),
),
migrations.AlterField(
model_name='project',
name='default_version',
field=models.CharField(default=b'latest', help_text='The version of your project that / redirects to.', max_length=255, verbose_name='Default version'),
),
migrations.AlterField(
model_name='project',
name='description',
field=models.TextField(blank=True, help_text='The reStructuredText description of the project.', verbose_name='Description'),
),
migrations.AlterField(
model_name='project',
name='has_valid_clone',
field=models.BooleanField(default=False, help_text='This project has been successfully cloned.'),
),
migrations.AlterField(
model_name='project',
name='has_valid_webhook',
field=models.BooleanField(default=False, help_text='This project has been built with a webhook.'),
),
migrations.AlterField(
model_name='project',
name='install_project',
field=models.BooleanField(default=False, help_text='Install your project inside a virtualenv using <code>setup.py install</code>.', verbose_name='Install Project'),
),
migrations.AlterField(
model_name='project',
name='num_major',
field=models.IntegerField(blank=True, default=2, help_text='2 means supporting 3.X.X and 2.X.X, but not 1.X.X.', null=True, verbose_name='Number of Major versions'),
),
migrations.AlterField(
model_name='project',
name='num_minor',
field=models.IntegerField(blank=True, default=2, help_text='2 means supporting 2.2.X and 2.1.X, but not 2.0.X.', null=True, verbose_name='Number of Minor versions'),
),
migrations.AlterField(
model_name='project',
name='num_point',
field=models.IntegerField(blank=True, default=2, help_text='2 means supporting 2.2.2 and 2.2.1, but not 2.2.0.', null=True, verbose_name='Number of Point versions'),
),
migrations.AlterField(
model_name='project',
name='path',
field=models.CharField(editable=False, help_text='The directory where <code>conf.py</code> lives.', max_length=255, verbose_name='Path'),
),
migrations.AlterField(
model_name='project',
name='privacy_level',
field=models.CharField(choices=[('public', 'Public'), ('protected', 'Protected'), ('private', 'Private')], default='public', help_text='Level of privacy that you want on the project. Protected means public but not in listings. Note that the project documentation is still seen by everyone, <a href="http://docs.readthedocs.io/en/latest/privacy.html" target="_blank">more info</a>.', max_length=20, verbose_name='Privacy Level'),
),
migrations.AlterField(
model_name='project',
name='programming_language',
field=models.CharField(blank=True, choices=[('words', 'Only Words'), ('py', 'Python'), ('js', 'JavaScript'), ('php', 'PHP'), ('ruby', 'Ruby'), ('perl', 'Perl'), ('java', 'Java'), ('go', 'Go'), ('julia', 'Julia'), ('c', 'C'), ('csharp', 'C#'), ('cpp', 'C++'), ('objc', 'Objective-C'), ('other', 'Other')], default='words', help_text='The primary programming language the project is written in.', max_length=20, verbose_name='Programming Language'),
),
migrations.AlterField(
model_name='project',
name='project_url',
field=models.URLField(blank=True, help_text="The project's homepage.", verbose_name='Project homepage'),
),
migrations.AlterField(
model_name='project',
name='repo',
field=models.CharField(help_text='Hosted documentation repository URL.', max_length=255, verbose_name='Repository URL'),
),
migrations.AlterField(
model_name='project',
name='version',
field=models.CharField(blank=True, help_text='Project version these docs apply to, i.e. 1.0a.', max_length=100, verbose_name='Version'),
),
]
43 changes: 24 additions & 19 deletions readthedocs/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,21 @@ class Project(models.Model):
slug = models.SlugField(_('Slug'), max_length=255, unique=True)
description = models.TextField(_('Description'), blank=True,
help_text=_('The reStructuredText '
'description of the project'))
'description of the project.'))
repo = models.CharField(_('Repository URL'), max_length=255,
help_text=_('Hosted documentation repository URL'))
help_text=_('Hosted documentation repository URL.'))
repo_type = models.CharField(_('Repository type'), max_length=10,
choices=constants.REPO_CHOICES, default='git')
project_url = models.URLField(_('Project homepage'), blank=True,
help_text=_('The project\'s homepage'))
canonical_url = models.URLField(_('Canonical URL'), blank=True,
help_text=_('URL that documentation is expected to serve from'))
help_text=_('The project\'s homepage.'))
canonical_url = models.URLField(
_('Canonical URL'), blank=True,
help_text=_('URL that documentation is expected to serve from.'))
version = models.CharField(_('Version'), max_length=100, blank=True,
help_text=_('Project version these docs apply '
'to, i.e. 1.0a'))
'to, i.e. 1.0a.'))
copyright = models.CharField(_('Copyright'), max_length=255, blank=True,
help_text=_('Project copyright information'))
help_text=_('Project copyright information.'))
theme = models.CharField(
_('Theme'), max_length=20, choices=constants.DEFAULT_THEME_CHOICES,
default=constants.THEME_DEFAULT,
Expand All @@ -114,7 +115,7 @@ class Project(models.Model):
'have multiple versions of your docs.'))
default_version = models.CharField(
_('Default version'), max_length=255, default=LATEST,
help_text=_('The version of your project that / redirects to'))
help_text=_('The version of your project that / redirects to.'))
# In default_branch, None means the backend should choose the
# appropriate branch. Eg 'master' for git
default_branch = models.CharField(
Expand Down Expand Up @@ -151,7 +152,7 @@ class Project(models.Model):
container_mem_limit = models.CharField(
_('Container memory limit'), max_length=10, null=True, blank=True,
help_text=_('Memory limit in Docker format '
'-- example: <code>512m</code> or <code>1g</code>'))
'-- example: <code>512m</code> or <code>1g</code>.'))
container_time_limit = models.CharField(
_('Container time limit'), max_length=10, null=True, blank=True)
build_queue = models.CharField(
Expand All @@ -173,7 +174,7 @@ class Project(models.Model):
# Other model data.
path = models.CharField(_('Path'), max_length=255, editable=False,
help_text=_('The directory where '
'<code>conf.py</code> lives'))
'<code>conf.py</code> lives.'))
conf_py_file = models.CharField(
_('Python configuration file'), max_length=255, default='', blank=True,
help_text=_('Path from project root to <code>conf.py</code> file '
Expand All @@ -185,8 +186,8 @@ class Project(models.Model):
mirror = models.BooleanField(_('Mirror'), default=False)
install_project = models.BooleanField(
_('Install Project'),
help_text=_('Install your project inside a virtualenv using <code>setup.py '
'install</code>'),
help_text=_('Install your project inside a virtualenv using '
'<code>setup.py install</code>.'),
default=False
)

Expand All @@ -211,8 +212,11 @@ class Project(models.Model):
privacy_level = models.CharField(
_('Privacy Level'), max_length=20, choices=constants.PRIVACY_CHOICES,
default=getattr(settings, 'DEFAULT_PRIVACY_LEVEL', 'public'),
help_text=_('(Beta) Level of privacy that you want on the repository. '
'Protected means public but not in listings.'))
help_text=_('Level of privacy that you want on the project. '
'Protected means public but not in listings. Note that '
'the project documentation is still seen by everyone, <a '
'href="http://docs.readthedocs.io/en/latest/privacy.html" '
'target="_blank">more info</a>.'))
version_privacy_level = models.CharField(
_('Version Privacy Level'), max_length=20,
choices=constants.PRIVACY_CHOICES, default=getattr(
Expand Down Expand Up @@ -251,28 +255,29 @@ class Project(models.Model):
default=2,
null=True,
blank=True,
help_text=_('2 means supporting 3.X.X and 2.X.X, but not 1.X.X')
help_text=_('2 means supporting 3.X.X and 2.X.X, but not 1.X.X.')
)
num_minor = models.IntegerField(
_('Number of Minor versions'),
default=2,
null=True,
blank=True,
help_text=_('2 means supporting 2.2.X and 2.1.X, but not 2.0.X')
help_text=_('2 means supporting 2.2.X and 2.1.X, but not 2.0.X.')
)
num_point = models.IntegerField(
_('Number of Point versions'),
default=2,
null=True,
blank=True,
help_text=_('2 means supporting 2.2.2 and 2.2.1, but not 2.2.0')
help_text=_('2 means supporting 2.2.2 and 2.2.1, but not 2.2.0.')
)

has_valid_webhook = models.BooleanField(
default=False, help_text=_('This project has been built with a webhook')
default=False,
help_text=_('This project has been built with a webhook.')
)
has_valid_clone = models.BooleanField(
default=False, help_text=_('This project has been successfully cloned')
default=False, help_text=_('This project has been successfully cloned.')
)

tags = TaggableManager(blank=True)
Expand Down