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

Remove unused views and their translations. #4632

Merged
merged 5 commits into from Oct 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions readthedocs/builds/admin.py
Expand Up @@ -2,7 +2,7 @@

from __future__ import absolute_import
from django.contrib import admin
from readthedocs.builds.models import Build, VersionAlias, Version, BuildCommandResult
from readthedocs.builds.models import Build, Version, BuildCommandResult
from guardian.admin import GuardedModelAdmin


Expand Down Expand Up @@ -32,5 +32,4 @@ class VersionAdmin(GuardedModelAdmin):


admin.site.register(Build, BuildAdmin)
admin.site.register(VersionAlias)
admin.site.register(Version, VersionAdmin)
21 changes: 1 addition & 20 deletions readthedocs/builds/forms.py
Expand Up @@ -11,27 +11,8 @@
from django import forms
from django.utils.translation import ugettext_lazy as _

from readthedocs.builds.models import Version, VersionAlias
from readthedocs.builds.models import Version
from readthedocs.core.utils import trigger_build
from readthedocs.projects.models import Project


class AliasForm(forms.ModelForm):

class Meta(object):
model = VersionAlias
fields = (
'project',
'from_slug',
'to_slug',
'largest',
)

def __init__(self, instance=None, *args, **kwargs): # noqa
super(AliasForm, self).__init__(instance=instance, *args, **kwargs)
if instance:
self.fields['project'].queryset = (Project.objects
.filter(pk=instance.project.pk))


class VersionForm(forms.ModelForm):
Expand Down
58 changes: 58 additions & 0 deletions readthedocs/builds/migrations/0005_remove-version-alias.py
@@ -0,0 +1,58 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2018-10-17 04:20
from __future__ import unicode_literals

from django.db import migrations, models
import readthedocs.builds.version_slug


class Migration(migrations.Migration):

dependencies = [
('builds', '0004_add-apiversion-proxy-model'),
]

operations = [
migrations.RemoveField(
model_name='versionalias',
name='project',
),
migrations.AlterField(
model_name='build',
name='error',
field=models.TextField(blank=True, default='', verbose_name='Error'),
),
migrations.AlterField(
model_name='build',
name='output',
field=models.TextField(blank=True, default='', verbose_name='Output'),
),
migrations.AlterField(
model_name='build',
name='state',
field=models.CharField(choices=[('triggered', 'Triggered'), ('cloning', 'Cloning'), ('installing', 'Installing'), ('building', 'Building'), ('finished', 'Finished')], default='finished', max_length=55, verbose_name='State'),
),
migrations.AlterField(
model_name='build',
name='type',
field=models.CharField(choices=[('html', 'HTML'), ('pdf', 'PDF'), ('epub', 'Epub'), ('man', 'Manpage'), ('dash', 'Dash')], default='html', max_length=55, verbose_name='Type'),
),
migrations.AlterField(
model_name='version',
name='privacy_level',
field=models.CharField(choices=[('public', 'Public'), ('protected', 'Protected'), ('private', 'Private')], default='public', help_text='Level of privacy for this Version.', max_length=20, verbose_name='Privacy Level'),
),
migrations.AlterField(
model_name='version',
name='slug',
field=readthedocs.builds.version_slug.VersionSlugField(db_index=True, max_length=255, populate_from='verbose_name', verbose_name='Slug'),
),
migrations.AlterField(
model_name='version',
name='type',
field=models.CharField(choices=[('branch', 'Branch'), ('tag', 'Tag'), ('unknown', 'Unknown')], default='unknown', max_length=20, verbose_name='Type'),
),
migrations.DeleteModel(
name='VersionAlias',
),
]
21 changes: 0 additions & 21 deletions readthedocs/builds/models.py
Expand Up @@ -404,27 +404,6 @@ def save(self, *args, **kwargs):
return 0


@python_2_unicode_compatible
class VersionAlias(models.Model):

"""Alias for a ``Version``."""

project = models.ForeignKey(
Project, verbose_name=_('Project'), related_name='aliases')
from_slug = models.CharField(_('From slug'), max_length=255, default='')
to_slug = models.CharField(
_('To slug'), max_length=255, default='', blank=True)
largest = models.BooleanField(_('Largest'), default=False)

def __str__(self):
return ugettext(
'Alias for {project}: {_from} -> {to}'.format(
project=self.project,
_from=self.from_slug,
to=self.to_slug,
))


@python_2_unicode_compatible
class Build(models.Model):

Expand Down
5 changes: 0 additions & 5 deletions readthedocs/locale/ar/LC_MESSAGES/django.po
Expand Up @@ -2400,11 +2400,6 @@ msgstr "أضف كنية لإصدار المشروع"
msgid "Create"
msgstr "إنشاء"

#: templates/projects/alias_list.html:6 templates/projects/alias_list.html:11
msgid "Aliases"
msgstr "أسماء كنية"

#: templates/projects/alias_list.html:20
#: templates/projects/project_list.html:48
msgid "Browse projects"
msgstr "تصفّح المشاريع"
Expand Down
12 changes: 0 additions & 12 deletions readthedocs/locale/ca/LC_MESSAGES/django.po
Expand Up @@ -2415,24 +2415,12 @@ msgstr "D'acord, desa'l"
msgid "%(user)s's profile"
msgstr "Perfil de %(user)s"

#: templates/projects/alias_edit.html:4 templates/projects/alias_edit.html:7
msgid "Project Alias"
msgstr "Àlies del projecte"

#: templates/projects/alias_edit.html:12
msgid "Add an alias for a project version."
msgstr "Afegiu un àlies a la versió del projecte."

#: templates/projects/alias_edit.html:16
#: templates/projects/project_create.html:19
msgid "Create"
msgstr "Crea"

#: templates/projects/alias_list.html:6 templates/projects/alias_list.html:11
msgid "Aliases"
msgstr "Àlies"

#: templates/projects/alias_list.html:20
#: templates/projects/project_list.html:48
msgid "Browse projects"
msgstr "Navega pels projectes"
Expand Down
4 changes: 0 additions & 4 deletions readthedocs/locale/de/LC_MESSAGES/django.po
Expand Up @@ -2430,11 +2430,7 @@ msgstr "Alternativer Name für eine Projektversion hinzufügen"
msgid "Create"
msgstr "Erstellen"

#: templates/projects/alias_list.html:6 templates/projects/alias_list.html:11
msgid "Aliases"
msgstr "Alternativer Name"

#: templates/projects/alias_list.html:20
#: templates/projects/project_list.html:48
msgid "Browse projects"
msgstr "Projekte durchsuchen"
Expand Down
14 changes: 0 additions & 14 deletions readthedocs/locale/en/LC_MESSAGES/django.po
Expand Up @@ -2375,24 +2375,10 @@ msgstr ""
msgid "%(user)s's profile"
msgstr ""

#: templates/projects/alias_edit.html:4 templates/projects/alias_edit.html:7
msgid "Project Alias"
msgstr ""

#: templates/projects/alias_edit.html:12
msgid "Add an alias for a project version."
msgstr ""

#: templates/projects/alias_edit.html:16
#: templates/projects/project_create.html:19
msgid "Create"
msgstr ""

#: templates/projects/alias_list.html:6 templates/projects/alias_list.html:11
msgid "Aliases"
msgstr ""

#: templates/projects/alias_list.html:20
#: templates/projects/project_list.html:48
msgid "Browse projects"
msgstr ""
Expand Down
5 changes: 0 additions & 5 deletions readthedocs/locale/eu/LC_MESSAGES/django.po
Expand Up @@ -2390,11 +2390,6 @@ msgstr ""
msgid "Create"
msgstr ""

#: templates/projects/alias_list.html:6 templates/projects/alias_list.html:11
msgid "Aliases"
msgstr ""

#: templates/projects/alias_list.html:20
#: templates/projects/project_list.html:48
msgid "Browse projects"
msgstr "Arakatu proiektuak"
Expand Down
5 changes: 0 additions & 5 deletions readthedocs/locale/fr/LC_MESSAGES/django.po
Expand Up @@ -2843,11 +2843,6 @@ msgstr "Ajouter un alias pour une version de projet."
msgid "Create"
msgstr "Créer"

#: templates/projects/alias_list.html:6 templates/projects/alias_list.html:11
msgid "Aliases"
msgstr "Alias"

#: templates/projects/alias_list.html:20
#: templates/projects/project_list.html:48
msgid "Browse projects"
msgstr "Parcourir les projets"
Expand Down
5 changes: 0 additions & 5 deletions readthedocs/locale/gl/LC_MESSAGES/django.po
Expand Up @@ -2393,11 +2393,6 @@ msgstr "Engadir un alias para unha versión de proxecto."
msgid "Create"
msgstr "Crear"

#: templates/projects/alias_list.html:6 templates/projects/alias_list.html:11
msgid "Aliases"
msgstr "Alias"

#: templates/projects/alias_list.html:20
#: templates/projects/project_list.html:48
msgid "Browse projects"
msgstr ""
Expand Down
14 changes: 0 additions & 14 deletions readthedocs/locale/it/LC_MESSAGES/django.po
Expand Up @@ -2666,24 +2666,10 @@ msgstr "OK, salvalo!"
msgid "%(user)s's profile"
msgstr "profilo di %(user)s"

#: templates/projects/alias_edit.html:4 templates/projects/alias_edit.html:7
msgid "Project Alias"
msgstr "Alias per Progetto"

#: templates/projects/alias_edit.html:12
msgid "Add an alias for a project version."
msgstr "Aggiungi un alias per una versione di progetto"

#: templates/projects/alias_edit.html:16
#: templates/projects/project_create.html:19
msgid "Create"
msgstr "Crea"

#: templates/projects/alias_list.html:6 templates/projects/alias_list.html:11
msgid "Aliases"
msgstr "Alias"

#: templates/projects/alias_list.html:20
#: templates/projects/project_list.html:48
msgid "Browse projects"
msgstr "Sfoglia progetti"
Expand Down
5 changes: 0 additions & 5 deletions readthedocs/locale/ja/LC_MESSAGES/django.po
Expand Up @@ -2481,11 +2481,6 @@ msgstr "プロジェクトのバージョンに対する別名を追加"
msgid "Create"
msgstr "作成"

#: templates/projects/alias_list.html:6 templates/projects/alias_list.html:11
msgid "Aliases"
msgstr "別名"

#: templates/projects/alias_list.html:20
#: templates/projects/project_list.html:48
msgid "Browse projects"
msgstr "プロジェクトを見る"
Expand Down
5 changes: 0 additions & 5 deletions readthedocs/locale/nb/LC_MESSAGES/django.po
Expand Up @@ -2425,11 +2425,6 @@ msgstr "Legg til et alias for en prosjektversjon."
msgid "Create"
msgstr "Opprett"

#: templates/projects/alias_list.html:6 templates/projects/alias_list.html:11
msgid "Aliases"
msgstr "Alias"

#: templates/projects/alias_list.html:20
#: templates/projects/project_list.html:48
msgid "Browse projects"
msgstr "Finn prosjekter"
Expand Down
5 changes: 0 additions & 5 deletions readthedocs/locale/pl/LC_MESSAGES/django.po
Expand Up @@ -2400,11 +2400,6 @@ msgstr "Dodaj inną nazwę dla wersji projektu."
msgid "Create"
msgstr "Utwórz"

#: templates/projects/alias_list.html:6 templates/projects/alias_list.html:11
msgid "Aliases"
msgstr "Inne nazwy"

#: templates/projects/alias_list.html:20
#: templates/projects/project_list.html:48
msgid "Browse projects"
msgstr "Przeglądaj projekty"
Expand Down
5 changes: 0 additions & 5 deletions readthedocs/locale/pt_BR/LC_MESSAGES/django.po
Expand Up @@ -2504,11 +2504,6 @@ msgstr "Adic alias para versão projeto"
msgid "Create"
msgstr "Criar"

#: templates/projects/alias_list.html:6 templates/projects/alias_list.html:11
msgid "Aliases"
msgstr "Apelidos"

#: templates/projects/alias_list.html:20
#: templates/projects/project_list.html:48
msgid "Browse projects"
msgstr "Navegar em projetos"
Expand Down
5 changes: 0 additions & 5 deletions readthedocs/locale/ru/LC_MESSAGES/django.po
Expand Up @@ -2454,11 +2454,6 @@ msgstr "Добавить для версии проекта другое наз
msgid "Create"
msgstr "Создать"

#: templates/projects/alias_list.html:6 templates/projects/alias_list.html:11
msgid "Aliases"
msgstr "Другие названия"

#: templates/projects/alias_list.html:20
#: templates/projects/project_list.html:48
msgid "Browse projects"
msgstr "Просмотреть пректы"
Expand Down
5 changes: 0 additions & 5 deletions readthedocs/locale/sk/LC_MESSAGES/django.po
Expand Up @@ -2400,11 +2400,6 @@ msgstr ""
msgid "Create"
msgstr "Vytvoriť"

#: templates/projects/alias_list.html:6 templates/projects/alias_list.html:11
msgid "Aliases"
msgstr ""

#: templates/projects/alias_list.html:20
#: templates/projects/project_list.html:48
msgid "Browse projects"
msgstr ""
Expand Down
5 changes: 0 additions & 5 deletions readthedocs/locale/uk/LC_MESSAGES/django.po
Expand Up @@ -2414,11 +2414,6 @@ msgstr "Додайте псевдонім для версії проекту."
msgid "Create"
msgstr "Створити"

#: templates/projects/alias_list.html:6 templates/projects/alias_list.html:11
msgid "Aliases"
msgstr "Псевдоніми"

#: templates/projects/alias_list.html:20
#: templates/projects/project_list.html:48
msgid "Browse projects"
msgstr "Перегляд проектів"
Expand Down
5 changes: 0 additions & 5 deletions readthedocs/locale/vi_VN/LC_MESSAGES/django.po
Expand Up @@ -2409,11 +2409,6 @@ msgstr "Thêm tên khác cho một phiên bản của dự án."
msgid "Create"
msgstr ""

#: templates/projects/alias_list.html:6 templates/projects/alias_list.html:11
msgid "Aliases"
msgstr "Các tên phụ"

#: templates/projects/alias_list.html:20
#: templates/projects/project_list.html:48
msgid "Browse projects"
msgstr "Xem qua các dự án"
Expand Down
5 changes: 0 additions & 5 deletions readthedocs/locale/zh_CN/LC_MESSAGES/django.po
Expand Up @@ -2589,11 +2589,6 @@ msgstr "给项目版本添加别名"
msgid "Create"
msgstr "创建"

#: templates/projects/alias_list.html:6 templates/projects/alias_list.html:11
msgid "Aliases"
msgstr "别名"

#: templates/projects/alias_list.html:20
#: templates/projects/project_list.html:48
msgid "Browse projects"
msgstr "浏览项目"
Expand Down
5 changes: 0 additions & 5 deletions readthedocs/locale/zh_TW/LC_MESSAGES/django.po
Expand Up @@ -2523,11 +2523,6 @@ msgstr "新增專案版本別名"
msgid "Create"
msgstr "建立"

#: templates/projects/alias_list.html:6 templates/projects/alias_list.html:11
msgid "Aliases"
msgstr "別名"

#: templates/projects/alias_list.html:20
#: templates/projects/project_list.html:48
msgid "Browse projects"
msgstr "瀏覽專案"
Expand Down