How to deploy a blog made using Sphinx - python

I made a blog using Ablog, a plugin for Sphinx that lets you build a complete blog with analytics, disqus integration etc.
I want to deploy this app, I tried heroku but it didn't work. Has anybody deployed a blog using Ablog, or Sphinx?
Thanks
http://ablog.readthedocs.org/
http://sphinx-doc.org/

It looks like ablog build generates a static site, and deploying it should be as easy as copying the generated files into a directory that a web server is configured to serve. I have a similar setup using Pelican for my blog and I use Github Pages to deploy it, which means creating a git repo with the correct name (username.github.io), adding your generated files, and pushing it up, after which your blog will be available at username.github.io.

Related

Deploy Sphinx docs on Django server

Recently I have been creating docs using sphinx. Now when the docs are done I want to deploy them on my web app under like /docs/ url.
Is here any good tool that is capable of doing that?
So far I found a tool that is able to deploy the docs under url but the docs look awful - it takes the json created by make and renders the data…
https://github.com/carltongibson/django-sphinx-view
Thanks for any ideas.

Hosting build documentation from a pull request on GutHub

I work on an open source project.
In order to facilitate the review of sphinx documentation changes in our Python source code, we’d love if we could somehow get the documentation generated and hosted somewhere for each pull request, like we already do with coveralls for our code coverage.
Pushing new commits would update the generated doc for that pull request. We’ll be soon be adding doc generation to our travis build to find sphinx errors, but doing a final visual review would still need to be done locally by pulling the branch and generating it locally.
Is there any GitHub app that offers to host a webpage generated on a pull request?
2018: You can make your own GitHub repository serve pages with GitHub pages.
If you generate your documentation in the gh-pages branch or the doc/ subfolder of your main branch, you can have both your codebase, and your doc in the repo.
See for instance lneuhaus/pyrpl issue 85, which illustrates how to automate Sphinx for Python documentation
cd doc/sphinx
sphinx-apidoc -f -o source/ ../../pyrpl/
make html
You can automate that using Syntaf/travis-sphinx:
A standalone script for automated building and deploying of sphinx docs via travis-ci
Update Q4 2022: the OP fronsacqc adds in the comments:
We ended up pushing the documentation generated by the build on an S3 folder tagged with the static hosting flag, so now every build's documentation is hosted on S3 for a couple of days.

Not getting the Template Repository Layout after deploying Python 2.7 on openshift

I am trying to to deploy django-cms on openshift. However, after creating a Python 2.7 application (with rhc app create django-cms python-2.7), I don't get the default template layout described in the doc. Instead I get only 3 files: requirements.txt, setup.py and wsgi.py; and the openshift folder.
Is this normal? Should I rebuild the layout from there?
Yes, this is normal. There are lots of examples on python / openshift on github.
I wrote one for django, https://github.com/jfmatth/openshift-django16

Deploying Django Project

I have a django project which I want to deploy on apache2 Http Server.
However, I want to automatically copy all the python files from some directory to apache srv directory which is /srv/www/myproject. Is there any automatic python tool which could solve the purpose.
I have looked into DistUtils and setup.py but I am unsure about how I would copy all .py files (along with directory structure) to the apache directory.
Any help will be appreciated!!!
Take a look to fabric, it is a great tool to do automatic deployments
From the django tutorial:
If your background is in PHP, you're probably used to putting code
under the Web server's document root (in a place such as /var/www).
With Django, you don't do that. It's not a good idea to put any of
this Python code within your Web server's document root, because it
risks the possibility that people may be able to view your code over
the Web. That's not good for security.
Put your code in some directory outside of the document root, such as
/home/mycode.
For copying files, you can use something as simple as FTP/SCP which you can automate; or you can use more full blown deployment options like fabric (see this blog entry for a step-by-step guide on fabric + virtualenv + apache mod_wsgi).
You can use any tool to automate the task; but please put the code in the appropriate non-web browsable directory.

Where can I download a sample Django template?

I just started working at a place as a front end developer where I need to build Django templates. I never worked with these before, does anyone know where I can download a sample template so I can look through the code structure?
I won't be doing any application development using the Django framework, only taking the variables the developer gives me and incorporating the in the html/css templates I build.
There are lots of Open Source django apps that you could look at for inspiration. One example is Zinnia which is a blogging application - there are dozens of templates in this project, see this directory. There are many other open source django projects on http://github.com and http://bitbucket.org
You should also take a look at the official template documentation, there are lots of snippets there that are very useful.
Here's a nice little tutorial.
http://www.webmonkey.com/2010/02/use_templates_in_django/
Also, Check out the Django Docs.
http://docs.djangoproject.com/en/1.3/ref/templates/builtins/

Categories