Add an API token to the user profile that is automatically generated and regeneratable
Review Request #4156 — Created May 20, 2013 and discarded
This (the API token) will not yet do anything except for exist. The patch to use this will come soon.
Description | From | Last Updated |
---|---|---|
Here, and other places, can you use "api_token" instead of "apitoken"? |
chipx86 | |
Blank line on both sides of this. |
chipx86 | |
This will create a random password once per thread (expensive!) and then make that the default for any users created … |
chipx86 | |
Does a @staticmethod work instead of a @classmethod? If not, just make this a function outside the class. In fact, … |
chipx86 | |
This would then go away. |
chipx86 |
-
-
-
-
This will create a random password once per thread (expensive!) and then make that the default for any users created on that thread. Instead, you want to have this take a function that will be called, which will then call make_random_password(32). I suggest making this a @classmethod on Profile called generate_api_token(). You can then use this function in the form instead of duplicating the make_random_password call, so that we don't repeat the logic.
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/accounts/views.py reviewboard/accounts/models.py reviewboard/accounts/forms.py Ignored Files: reviewboard/templates/accounts/prefs.html