Adding a field to the profile: Difference between revisions

no edit summary
imported>Paulproteus
imported>Paulproteus
No edit summary
Line 51:
 
Let's add a new one, "IRC nick".
 
= A note about tools =
 
= The 'Where': finding the right spot to make changes =
Line 60 ⟶ 58:
One way to find that out is to be ''methodical'': we can open the urls.py file in a text editor. Since it maps web URLs into Python code that gets run, it is the starting point of how requests get dispatched in the OpenHatch source. Then you open up the appropriate view, find the template file it loads, and then you'll know what to edit.
 
Honestly, that sounds like a lot of work. I usually just ''search'' instead. I'll warn you, though, that OpenHatch code can seem to be a sprawling mess. We'll use the "git grep" command to search it.
 
I'll warn you, though, that OpenHatch code can seem to be a sprawling mess. We'll use the "git grep" command to search it.
 
= AFirst, notea word about toolsgit =
 
Before you start using it, tell it who you are. When you do a commit, git will store this information in the repository.
 
<div class="terminal"><pre>
$ git config --global user.name "Your name"
$ git config --global user.email "your.email.address@example.com"
</pre></div>
 
Some tips on "git grep" before we begin:
Line 113 ⟶ 122:
=== Commit 1: Save our work ===
 
You have made some changes! Let's saveask git to show them. to us:
 
<div class="example"><pre>
$ git diff --color
diff --git a/mysite/profile/templates/profile/base_profile.html b/mysite/profile/templates/profile/base_profile.
index f7b75b6..16bc331 100644
--- a/mysite/profile/templates/profile/base_profile.html
+++ b/mysite/profile/templates/profile/base_profile.html
@@ -157,6 +157,9 @@
</p>
{% endif %}
+ <h4>IRC nick</h4>
+ <p>drworm</p>
+
{% comment %}
<div class="tags" id="tags-links"
<span class="tag-type">links:</span>
</pre></div>
 
...
Anonymous user