Skip to content

Instantly share code, notes, and snippets.

@schalkneethling
Last active October 17, 2019 13:14
Show Gist options
  • Save schalkneethling/3000735e0a2b554336c25d4086ab1807 to your computer and use it in GitHub Desktop.
Save schalkneethling/3000735e0a2b554336c25d4086ab1807 to your computer and use it in GitHub Desktop.
Useful things for Kuma development
Add DEBUG=False to your .env file

docker-compose down
make clean
docker-compose pull
docker-compose up -d
docker-compose exec -T web make localecompile webpack compilejsi18n compile-react-i18n
docker-compose exec -T web ./manage.py collectstatic

@import.*whatever // find imports of specific partials in Sass

New user signup

Before you start ensure you are in a new private window or user profile where you are not logged into either your local instance of Kuma or Github

  1. Load up the landing page of MDN Web Docs
  2. Click on the Sign in link at the top right of the page
  3. You will be directed to Github and asked to sign in to authorize

...

  1. For this you can use the mdnwebdocs-tester account (Ask me if you do not have the details. Not sure if we have a way of sharing this info securely. Perhaps with keybase.io?)
  2. After authorizing with Github and the needed verification via GMail you will sent back to MDN, and should see the following:

...

  1. Check the I agree checkbox and click Create profile
  2. You should be signed in successfully and your account created
  3. You can confirm this be hover over your avatar and clicking View profile

Username exists

Now that we have a user in the database, we can test a signup scenario where your chosen username(aka mdnwebdocs-tester) already exists.

  1. Head over to http://mdn.localhost:8000/admin/socialaccount/socialaccount/
  2. You should see the mdnwebdocs-tester account here.
  3. Check the checkbox next to the account. From the Action dropdown, select Delete selected social accounts, and click the Go button. On the next screen, click Yes, I'm sure
  4. Head over to http://mdn.localhost:8000/admin/users/user/ and confirm that the user still exists
  5. We now have a user account with a matching username but, this user is no longer associated with the Github account
  6. Go to http://mdn.localhost:8000/en-US/ and click Sign in
  7. You should now be presented with the following view:

...

  1. Enter mdnwebdocs-tester into the input field, check the I agree checkbox, and click on Create profile
  2. You should now see the following:

...

  1. Enter a username that does not exists, check the I agree checkbox, and click on Create profile
  2. You should be signed in and your account should now be created.
  3. Again, you can confirm this be hover over your avatar and clicking View profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment