Page MenuHomePhabricator

Suggestion to overcome local setup issue for contributors
Closed, ResolvedPublic

Description

I was working on T302882 a couple of weeks ago. After setting up the project locally and visiting the client-side, it shows the popup given below

Screenshot from 2022-04-24 17-20-07.png (855×1 px, 156 KB)

In order to meet the criteria, all the options other than 500+ edits can be configured from the admin side or manage.py shell. But the wp_enough_edits which is responsible for the 500+ edits is not editable from both the options (shell or admin), which is great for security in production. But for contributors who use TWlight on local, it can create problems since they cannot go ahead and create an application or see the partner detail page.

I went through the code and found that in users/models.py#L731 putting a number greater than in the editor_enough_edits function call (Eg: editor_enough_edits(600)) can solve the issue on local. Not sure if there is another way to overcome this.

If that is the only way, I think either we should put this method in the local setup guide, or we can make some changes to allow this configurable on local.

Event Timeline

lalit97 updated the task description. (Show Details)

@lalit97 Django superusers skip all bundle check requirements, so setting that flag on an account in your local environment should do the trick. When you set up a new local environment, you can create a single account and then generate example data
https://github.com/WikipediaLibrary/TWLight/wiki/Shell-scripts#example-data
which will promote the initial account to a superuser.

@lalit97 Django superusers skip all bundle check requirements, so setting that flag on an account in your local environment should do the trick. When you set up a new local environment, you can create a single account and then generate example data
https://github.com/WikipediaLibrary/TWLight/wiki/Shell-scripts#example-data
which will promote the initial account to a superuser.

Checked yes it is working fine thanks :) I think the normal user side should also work or we should put the instructions you shared somewhere on Github.