Using the code for the training¶
You can get the complete code for this training in https://github.com/collective/ploneconf.site
The code-package¶
The package
Note
If you want to do it by hand do the following:
cd src
git clone https://github.com/collective/ploneconf.site.git
Getting the code for a certain chapter¶
To use the code for a certain chapter you need to checkout the appropriate tag for the chapter. The package will then contain the complete code for that chapter (excluding exercises). If you want to add the code for the chapter yourself you have to checkout the tag for the previous chapter.
Here is a example:
git checkout views_2
The names of the tags are the same as the url of the chapter.
So the tag for the chapter https://training.plone.org/5/mastering_plone/registry.html is registry
and you can get it with git checkout registry.
Moving from chapter to chapter¶
To change the code to the state of the next chapter simply checkout the tag for the next chapter:
git checkout views_3
If you made any changes to the code you have to get them out of the way first:
git stash
This will stash away your changes but not delete them. You can get them back later. You should learn about the command git stash before you try reapply stashed changes.
If you want to remove any changes you made locally you can delete them with this command:
git reset --hard HEAD
Telling Plone about ploneconf.site¶
If you did not yet do this (it is covered in chapter Write Your Own Add-Ons to Customize Plone) you will have to
modify buildout.cfg
to have Plone expect the egg ploneconf.site
to be in src
.
1 2 3 4 5 6 7 8 9 10 11 12 | eggs =
...
# our add-ons
ploneconf.site
# starzel.votable_behavior
...
[sources]
ploneconf.site = git https://github.com/collective/ploneconf.site.git
|
These are the tags for which there is code: