Anonymous user
Adding a field to the profile: Difference between revisions
Undo revision 18879 by 86.51.26.15 (talk)
imported>Mark |
imported>Brittag (Undo revision 18879 by 86.51.26.15 (talk)) |
||
(13 intermediate revisions by 8 users not shown) | |||
Line 25:
== Getting the source ==
All the sample code in this walkthrough refers to version '''d56a354''' of the OpenHatch source. To make sure the code is in line with what you expect, follow the instructions on the [
$ git checkout d56a354 # Switch to that revision
Line 32:
Here's how you can check that it worked. Run these commands in your new ''oh-mainline'' directory, and check that they have the same output as I've recorded:
<b>TODO: before continuing need to setup the DB for older version of code that you are trying to run</b>
The command is: <code>python manage.py migrate #####</code>
<b>How to determine what ##### should be? (bug paulproteus on IRC)</b>
$ git log -1 # look at the most recent commit on the current branch
Line 147 ⟶ 151:
<div class="example"><pre>
$ git commit -a -m "base_profile.html: Now everyone's profile says they were born on January 1, 1980."
</pre></div>
Line 266 ⟶ 270:
Run 'git status' and you should see all of the files you have edited up to now:
<div class="example"><pre>
$git status
Line 296 ⟶ 300:
<div class="example"><pre>
$ python manage.
Syncing...
No fixtures found.
Line 335 ⟶ 339:
Now run the migration as described [http://openhatch.org/wiki/Making_schema_changes here].
<div class="example"><pre>
$
+ Added field birthday on profile.Person
Created 0090_auto__add_field_person_birthday.py. You can now apply this migration with: ./manage.py migrate profile
$
Running migrations for profile:
- Migrating forwards to 0090_auto__add_field_person_birthday.
Line 425 ⟶ 429:
Now run the test and let's make sure it passes!
<div class="example"><pre>
$
<test information will print here...>
Line 441 ⟶ 445:
== Commit 4: Save the
Go ahead and commit the
<div class="example"><pre>
Line 486 ⟶ 490:
That it! For more information on using git and creating a patch, check out our [http://openhatch.org/missions/git git mission].
= Wrapping it up =
Welcome to the OpenHatch community. We are very glad to have you here!▼
▲Welcome to the OpenHatch community. We are very glad to have you here! be sure to [[chat with us on IRC]] and say hello or ask any questions you may have.
|