What are the various Python CMS's and their statuses? - python

I'm usually a PHP developer that has lots of experience with Drupal CMS & framework. And I realize Drupal is very mature, but I don't know much about the Python scene.
I've heard the following CMSs be mentioned:
Plone
Django (framework)
What other CMSs are there, and what do you think are some of the pros and cons? How mature are they? Is it even worth starting to use Python for general web development?

My vote is for Django CMS. Django itself is a development framework (but one that gives you a lot for free, including an excellent pluggable admin interface). DjangoCMS is an application that you can install into a Django application. I am using DjangoCMS and, as a Django user, I think it's perfect. I'm not what non-Django users would think. It's no Wordpress.

Here is a page which lists the Python based CMS. Zope based Plone is the very popular one and very mature too. Apart from that you, have customized solutions built using Django, like Django-CMS and also there are wiki like MoinMoin Engines. That page gives a lot of options for you.

Django is not a CMS; it's a web development framework.
That said, Django's roots come from newspaper-oriented CMS-like systems. Unsurprisingly, that makes Django a very good platform on which to create a CMS.
You can check the state of Django-based CMSs on Django-packages, which tracks the project metrics of many packages.

Related

Getting started with Django, Heroku and Amazon

I want to change my static website (http://ingledow.co.uk) to a Django site on Heroku and Amazon using GitHub to store the code.
I've been through the Django tutorial once, so I'm fairly new to the whole thing.
Where would you guys start with this? Any useful books, code learning websites you could recommend to get started?
Thanks
David
To easily understand and visualize Heroku when hosting Django apps I created this drawing for our startup ChattyHive. I hope it is helpful. Don't hesitate on asking me any doubt or suggest anything :)
(please right clic on it and "view picture" to see it full size or it will be too small!)
The best way to learn Python and Django is to be comfortable with creating a proper environment for developing your application, although you can skip the details and start with Heroku's official guide on how to manage a Django application across the whole stack.
At the time of writing, these are some of the essential tools Python developers should be comfortable with:
virtualenv for creating distinct copies of the Python interpreter and it's environment
pip for managing Python dependencies
fabric for defining administrative tasks across all your target environments
puppet or chef for provisioning environments
vagrant for provisioning development environments
I would suggest that you immediately familiarize yourself with vagrant and focus on the virtualenv+pip+fabric trio--these are ubiquitously utilized in any Python web project and your bound to be forced to come to terms with them sooner or later, so get straight to it and you'll be otherwise amazed how you ever managed any Python development without them.
As far as learning Django is concerned, you will need to understand that Django is still just plain-old Python, what WSGI applications are, how domain objects are modeled, how Django routes requests, how views handle requests and how they produce responses, including additional and intermediary framework components. Afterwards, you should be knowledgeable enough to start tackling any requirements you might have of your application.
I will stress that having a good grasp on Python goes a long way in helping you understand how Django was designed and how to better write and organize your application's sources. The documentation is pretty exhaustive and it's the primary resource for any developer, but if you find yourself in need, there are several good books written that focus on providing additional material on certain aspects, but never forget to hone your Python skills.
Worth mentioning is the Django Package index which tracks any Python package specifically written to be integrated with Django. Their repositories are publicly accessible either on Github or Bitbucket and they range from tiny to huge and are an invaluable resource to see how other developers are doing Django development right.
Maybe you should start with some introduction books about Django,like The Django Book.

Auction site with Django

If one is to build an online auction site using Django, then would it be a good idea to modify an existing CMS? If so, could someone suggest a CMS for the scaffolding?
Thanks
You could starting building with django-cms which is a great CMS that is very much aimed at extensibility. It has a plugin architecture which allows you to integrate your existing (or third party) apps.
If you are making an auction site though, it mightn't so much be a CMS you are after as much as a app-platform for builing off. So i'd recommend that you have a look at pinax which is a project that allows you to start your own project with a lot of the common requirements of web apps already satisfied (like profiles, email auth, social authentication, commenting etc.)
I suggest Pinax instead of customizing an existing CMS according to your needs.If you want more choices then there's also a project called Satchless

Python Web Framework with best Mongo support

I'm looking to write a small web app to utilise a dataset I already have stored in a MongoDB collection. I've been writing more Python than other languages lately and would like to broaden my repertoire and write a Python web app.
It seems however that most if not all of the current popular Python web development frameworks favour MySQL and others with no mention given to MongoDB.
I am aware that there are more than likely plugins written to allow Mongo be used with existing frameworks but so far have found little as to documentation that compares and contrasts them.
I was wondering what in people's experience is the Python web development framework with the best MongoDB support?
Many thanks in advance,
Patrick
I have not tried MongoKit although it has been around for a while and retains a good reputation. I personally prefer MongoEngine and feel very comfortable with it (maybe because I like its nice homepage and good documentation). There is also a very good opensource project named Mumblr which demonstrates a Django-MongoEngine-MongoDB combination, which I think a very good starter for any project. I'm developing a CMS for my own company using this app.
I've used MongoKit with Pylons before and it worked out good.
You might want to refer to this post though: MongoDB ORM for Python?
There is no stable support for mongodb using django framework. I tried using mongoengine, but unlike models, provided for admin in django framework, there is no support for mongoengine.
Correct if I am wrong.
Flask is the best framework to use with MongoDB. It has a mongodb library called flask-pymongo
Make sure you run the following commands before starting your project.
$ pip3 install Flask
$ pip3 install Flask-PyMongo

Using python to develop web application

I have been doing some work in python, but that was all for stand alone applications. I'm curious to know whether any offshoot of python supports web development?
Would some one also suggest a good tutorial or a website from where I can pick up some of the basics of web development using python?
Now that everyone has said Django, I can add my two cents: I would argue that you might learn more by looking at the different components first, before using Django. For web development with Python, you often want 3 components:
Something that takes care
of the HTTP stuff (e.g.
CherryPy)
A templating language
to create your web pages.
Mako
is very pythonic and works with Cherrpy.
If you get your data from a
database, an ORM comes in handy.
SQLAlchemy
would be an example.
All the links above have good tutorials. For many real-world use-cases, Django will be a better solution than such a stack as it seamlessly integrates this functionality (and more). And if you need a CMS, Django is your best bet short of Zope. Nevertheless, to get a good grasp of what's going on, a stack of loosely coupled programs might be better. Django hides a lot of the details.
Edited 3 years later: Don't use mod_python, use mod_wsgi. Flask and Werkzeug are good frameworks too. Needing to know what's going on is useful, but it isn't a requirement. That would be stupid.
Don't lookup Django until you have a good grasp of what Django is doing on your behalf. for you. Write some basic apps using mod_python and it's request object. I just started learning Python for web-development using mod_python and it has been great.
mod_python also uses a dispatcher in site-packages/mod_python/publisher.py. Have a ganders through this to see how requests can be handled in a simple-ish way.
You may need to add a bit of config to your Apache config file to get mod_python up and running but the mod_python site explains it well.
<Directory /path/to/python/files>
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On
</Directory>
And you are away!
use (as a stupidly basic example):
def foo(req):
req.write("Hello World")
in /path/to/python/files/bar.py assuming /path/to is your site root.
And then you can do
http://www.mysite.com/python/files/bar/foo
to see "Hello World". Also, something that tripped me up is the dispatcher uses a lame method to work out the content-type, so to force HTML use:
req.content_type = 'text/html'
Good Luck
After you have a good idea of how Python interacts with mod_python and Apache, then use a framework that does all the boring stuff for you. Up to you though, just my recommendation
If you really don't want to delve into the frameworks - and you should, I heartily recommend Django or Pylons - there's still need to go down the road of CGI. This is a totally out-of-date technology, not to mention slow and inefficient.
There is a standard way of building Python web applications, and it's called WSGI. If you want to roll your own web app from scratch, this is absolutely the way to go.
That said, if you're just starting out, really you should go with one of the frameworks.
Python Wiki: Web Frameworks for Python
If you decide to use Django, the official tutorial is an excellent place to start. The Django Book is also free.
There are a couple of choices for web development. From my experience, your choice will again be dependent on your application. I used django and web.py in production and I am about to deploy an app based on pylons.
Django hides a lot of choices (comes with its ORM and templating). The documentation is extensive and well-written. There are many reusable app available for django, but you will likely to invest a little time in integrating them seamlessly. One thing mentioned on djangocon 08 was the fact, that there is cool stuff in django, which can't be easily
accessed in non-django projects.
web.py impressed me by its raw simplicity. Before I knew it, I wrote a small app (78 lines quasi-wiki) in it.
pylons feels like in the middle of both. I can use sqlalchemy and jinja, all in all a pleasant experience for the start.
Lookup Django.
Python can be used for web development, but there isn't a special language extension or anything in the language that will handle all the HTML generation or that works like PHP.
It's pretty much run through some sort of interpreter on a web server (CGI, mod_python, etc.).
I would recommend looking into Python Web Application Frameworks or how to write Python CGI scripts.
There are quite a few web frameworks for python out there, but the only one I've used is Django, and I really like it.
If you've got a few hours, do the tutorial, I promise you, you'll enjoy it :)
As others have mentioned, one of the more prominent python "offshoots" as you call them would be Django. It is a rather powerful framework that allows you to quickly and securely build web applications. The first place to look would be their overview which gives some insight as to what Django does as a framework.
Going through their tutorial taught me alot about the prominent Model-View-Controler design pattern and how it may be used in a web-development context. I found it a great way to start writing an application that worked and learn by improving it.

Example Facebook Application using TurboGears -- pyFacebook

I have a TurboGears application I'd like to run through Facebook, and am looking for an example TurboGears project using pyFacebook or minifb.py. pyFacebook is Django-centric, and I can probably figure it out, but this is, after all, the lazy web.
Why is pyFacebook django centric? Looks like it works perfectly fine with all kinds of WSGI apps or Python applications in general. No need to use Django.
pyFacebook is Django-centric because it includes a Django example. I did not intend to irk, but am merely looking for a TurboGears example using pyFacebook.

Categories