This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import lxml.html | |
>>> content = "<html><%= SoftwareName %></html>" | |
>>> doc = lxml.html.fromstring(content) | |
>>> lxml.html.tostring(doc) | |
'<html></html>' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# views.py | |
def add_tip(request): | |
if request.method == "POST": | |
formset = AddTipForm(request.POST) | |
if formset.is_valid(): | |
formset.save() | |
else: | |
formset = AddTipForm() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def liquid_comment_add(request, liquid_id): | |
liquid = get_object_or_404(Liquid, pk=liquid_id) | |
if request.method == "POST": | |
formset = CommentForm(request.POST) | |
if formset.is_valid(): | |
liquid.comments.create( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html | |
- git checkout -b NUMBER_BRANCH_DESCRIPTION | |
- git commit // Multiple times | |
- git rebase -i origin/master // Compress down all the commits into a single one. Pick first line, squash rest | |
- git checkout master | |
- git merge NUMBER_BRANCH_DESCRIPTION | |
- git push origin master // Send everything back to github | |
- git branch -d NUMBER_BRANCH_DESCRIPTION |
NewerOlder