This repository has been archived by the owner on Jan 26, 2021. It is now read-only.
Add a url to "Transfer ownership" on user profile #126
Labels
Type: Enhancement
New feature or request.
Hi @veniemi1
Here is a simple task to get you started. Please comment to this issue to let us know that you are on to it. Also mark checkboxes to let us know that you did this step.
Preparing:
To the code:
python systers_portal/manage.py runserver.127.0.0.1:8000address in your browser.127.0.0.1:8000/adminand login with your superuser credentials (username and password).Community. Click onCommunitieslink, then click on create a new community. Set yourself as the admin of that community. Fill in any dummy data you want for the res of the form.127.0.0.1:8000aka Portal landing page.The issue is that "Transfer ownership" button has no URL and we need to fix this.
In order to fix this, do the following:
portal/systers_portal/templates/users/snippets/membership.htmland find the anchor tag (a) that has an empty URL property, in other wordshref="#".#with a valid URL that will allow the user to transfer the ownership of a community. Therefore instead of#, put{% url 'transfer_ownership' community.slug %}.{% %}are special Django template tags that allow us to execute a set of functions inside the HTML code.urlis this function of Django template language that constructs a URL based on its name.transfer_ownershipis the name of the URL, we have set it up ourselves before in code. And finallycommunity.slugextracts the slug of the community object. This is necessary to let the function know what community we want to manipulate.Committing and making a pull request.
git add systers_portal/templates/users/snippets/membership.htmlgit commit -m "add a url to "Transfer ownership" on user profilegit push origin <the-name-of-your-branch>The text was updated successfully, but these errors were encountered: