Mercurial > public > bravenewsurf
annotate fabfile.py @ 41:9ce9f77d6cde
I added a get_absolute_url() to the news model so I can use that in the news template tag to create a link to the correct anchor on the news list page.
The link works, but for some reason it goes to the beginning of the article content and not to the title. I've played around with the article tag and making an aside tag with an id and for whatever reason it always goes to the article content.
author | Bob Mourlam <bob.mourlam@gmail.com> |
---|---|
date | Sun, 06 Nov 2011 22:13:27 -0600 |
parents | 1eb4b4072888 |
children | 89d0511cb5c2 |
rev | line source |
---|---|
bgneal@33 | 1 from fabric.api import cd, env, local, put, run |
bgneal@33 | 2 |
bgneal@33 | 3 |
bgneal@36 | 4 def update(): |
bgneal@33 | 5 """ |
bgneal@36 | 6 Runs hg pull -u. |
bgneal@33 | 7 |
bgneal@33 | 8 """ |
bgneal@33 | 9 with cd('/home/var/django-sites/bns/bns/'): |
bgneal@36 | 10 run('hg pull -u') |
bgneal@33 | 11 |
bgneal@33 | 12 |
bgneal@33 | 13 def collectstatic(): |
bgneal@33 | 14 """ |
bgneal@33 | 15 Runs the staticfiles collectstatic command to deploy static assets. |
bgneal@33 | 16 |
bgneal@33 | 17 """ |
bgneal@33 | 18 cmd = ('. ./env.bash && python manage.py collectstatic ' |
bgneal@33 | 19 '--settings=settings.production --noinput') |
bgneal@33 | 20 |
bgneal@33 | 21 with cd('/home/var/django-sites/bns/bns/bns_website/'): |
bgneal@33 | 22 run(cmd) |
bgneal@33 | 23 |
bgneal@33 | 24 |
bgneal@33 | 25 def touch(): |
bgneal@33 | 26 """ |
bgneal@33 | 27 Touches the wsgi file to reload the Python code. |
bgneal@33 | 28 |
bgneal@33 | 29 """ |
bgneal@33 | 30 with cd('/home/var/django-sites/bns/bns/bns_website/'): |
bgneal@33 | 31 run('touch apache/bns.wsgi') |