Skip to content

Conversation

@Giebisch
Copy link
Contributor

Added translation for verbose name of TokenProxy

Fixes Issue #8537

proxy = 'rest_framework.authtoken' in settings.INSTALLED_APPS
abstract = 'rest_framework.authtoken' not in settings.INSTALLED_APPS
verbose_name = "token"
verbose_name = _("Token")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to make sure, adding this two lines with modified values, is there any possible missing migrations?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I understand it, no. Migrations only accept hard coded values, but since this is not one, a migration would not make sense. It must be created when the language is set.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the TokenProxy model is inheriting from https://github.com/encode/django-rest-framework/blob/master/rest_framework/authtoken/models.py#L27 but still not showing it properly, right?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the migrations history https://github.com/encode/django-rest-framework/tree/master/rest_framework/authtoken/migrations it would be safer to check locally if new migrations are generated with this two attribute changes in meta. if not it is OK. but if so, we must have to ship it with the package :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for adding the missing auto migration

proxy = 'rest_framework.authtoken' in settings.INSTALLED_APPS
abstract = 'rest_framework.authtoken' not in settings.INSTALLED_APPS
verbose_name = "token"
verbose_name = _("Token")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the migrations history https://github.com/encode/django-rest-framework/tree/master/rest_framework/authtoken/migrations it would be safer to check locally if new migrations are generated with this two attribute changes in meta. if not it is OK. but if so, we must have to ship it with the package :)

@Giebisch Giebisch force-pushed the TranslationTokenProxy branch from 90e276b to be94cd6 Compare November 24, 2022 21:11
@Giebisch
Copy link
Contributor Author

@auvipy Can you help me out there for a second ? Do you know what went wrong with the Python 3.9 CI check? Can't quite figure it out

@auvipy
Copy link
Collaborator

auvipy commented Nov 27, 2022

that is not related to this PR from what I have seen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants