PHP-inspired user-friendly in-browser DJango install

93 views
Skip to first unread message

Alec Taylor

unread,
Sep 6, 2011, 1:29:35 PM9/6/11
to Django developers
Good morning,

I have been using Drupal for a while now, but am slowly moving toward
DJango.

I am currently working on quite an ambitious project, which I will be
releasing under a permissive license (New BSD or better).

I would like my project to be as accessible as possible. To this end,
I would like people without any Python or DJango knowledge to be able
to quickly setup my project.

Here is the web-interface functionality I would like to present to the
user:

<welcome to [project y]>

<Select database type>
<Database name>
<Database location>
<Username>
<Password>
<Database prefix>
[Install]

Can DJango be made do work this way? — If so, do you have some example
code or an existing project which does this?

Thanks for all suggestions,

Alec Taylor

Cal Leeming [Simplicity Media Ltd]

unread,
Sep 7, 2011, 2:08:46 PM9/7/11
to django-d...@googlegroups.com
On Tue, Sep 6, 2011 at 6:29 PM, Alec Taylor <alec.t...@gmail.com> wrote:
Good morning,

I have been using Drupal for a while now, but am slowly moving toward
DJango.

I am currently working on quite an ambitious project, which I will be
releasing under a permissive license (New BSD or better).

I would like my project to be as accessible as possible. To this end,
I would like people without any Python or DJango knowledge to be able
to quickly setup my project.

Uh.. what? Django != Drupal.

Can you please explain a bit more about what you want the end result to be.

Thanks
 

Here is the web-interface functionality I would like to present to the
user:

<welcome to [project y]>

<Select database type>
<Database name>
<Database location>
<Username>
<Password>
<Database prefix>
[Install]

Can DJango be made do work this way? — If so, do you have some example
code or an existing project which does this?

Thanks for all suggestions,

Alec Taylor

--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to django-d...@googlegroups.com.
To unsubscribe from this group, send email to django-develop...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.


Kayode Odeyemi

unread,
Sep 7, 2011, 3:05:22 PM9/7/11
to django-d...@googlegroups.com
I write Drupal myself. But Python is not Drupal and don't see the comparison. 

Python already has in-built modular system. Building install profiles wouldn't be necessary 
either since you can leverage setup tools.

To write those fancy Drupal style installation hooks, you might want to leverage writing your own
application hooks.

--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to django-d...@googlegroups.com.
To unsubscribe from this group, send email to django-develop...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.


--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To post to this group, send email to django-d...@googlegroups.com.
To unsubscribe from this group, send email to django-develop...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.



--
Odeyemi 'Kayode O.
http://www.sinati.com. t: @charyorde

kenneth gonsalves

unread,
Sep 8, 2011, 11:54:45 PM9/8/11
to django-d...@googlegroups.com
On Wed, 2011-09-07 at 19:08 +0100, Cal Leeming [Simplicity Media Ltd]
wrote:

> Uh.. what? Django != Drupal.
>
> Can you please explain a bit more about what you want the end result
> to be.

I do not think you have fully read the post - he wants users to be able
to set up their django sites with a GUI.
--
regards
Kenneth Gonsalves

Aymeric Augustin

unread,
Sep 9, 2011, 2:23:01 AM9/9/11
to django-d...@googlegroups.com, Django developers
Hi Alec,

Nothing prevents you from altering the settings file dynamically and telling the user to restart the webserver. You can run wih an in-memory SQLite database until this is done.

So your question isn't related to the development of Django itself; it would be more appropriate on django-users.

Note that deploying a Django project is a bit more complicated than a PHP project (just throw the files in WWW_ROOT). IMO setting up the database isn't the most difficult step. I don't know any projects that provide this feature.

Best regards,

--
Aymeric.

Jens Diemer

unread,
Sep 9, 2011, 3:38:28 AM9/9/11
to django-d...@googlegroups.com
Am 09.09.2011 08:23, schrieb Aymeric Augustin:
> Nothing prevents you from altering the settings file dynamically and telling the user to restart the webserver. You can run wih an in-memory SQLite database until this is done.
>
> So your question isn't related to the development of Django itself; it would be more appropriate on django-users.
>
> Note that deploying a Django project is a bit more complicated than a PHP project (just throw the files in WWW_ROOT). IMO setting up the database isn't the most difficult step. I don't know any projects that provide this feature.


For PyLucid CMS i created a "standalone package" with a Web-GUI installation.
You need not shell to install it.

Here some screenshots:

http://www.pylucid.org/permalink/340/pylucid-screenshots/PyLucid-standalone/

The Web-GUI install is a simple CGI script for running syncdb, south migrate and
create a first superuser etc.

The script is here:
<https://github.com/jedie/PyLucid/blob/master/scripts/standalone/install_pylucid.cgi>


The install procedure is really simple:
* Upload all files via FTP to webserver
* request http://www.my_server.tld/install_pylucid.cgi
* run "syncdb", "migrate", "create superuser", "loaddata"

Complete instruction here:
http://www.pylucid.org/permalink/331/1b-install-pylucid-standalone-package

But the prefered way to install PyLucid is a bootscript which creates a virtualenv:
<http://www.pylucid.org/permalink/333/1a1-create-a-pylucid-environment-with-pylucid-boot>


--

Mfg.

Jens Diemer


----
http://www.jensdiemer.de

Alec Taylor

unread,
Sep 9, 2011, 11:56:23 AM9/9/11
to django-d...@googlegroups.com
Looks useable.

Anyone interested in working with me to port this to DJango?

(the reason I'm not doing it myself is that I am very new to Python and DJango)

Tom Evans

unread,
Sep 12, 2011, 12:39:02 PM9/12/11
to django-d...@googlegroups.com
On Fri, Sep 9, 2011 at 4:56 PM, Alec Taylor <alec.t...@gmail.com> wrote:
> Looks useable.
>
> Anyone interested in working with me to port this to DJango?

Alec, as other people have mentioned, Django is not Drupal. Drupal is
a web application that can be customized using plugins, where as
Django is a python library one can use to create web applications.
With that in mind, 'porting this to django' is nonsensical - PyLucid
uses Django already, and Django is only the framework, not the
project.

The point here is that two different web apps created using Django
could have vastly different requirements and installation steps, where
as Drupal has a single set of steps to go from nothing to installed.

In fact, its quite common to have the same project installed and
running in completely different manners. For instance on our
production servers, all libraries/code/templates, even in house ones,
are installed from our internal package repository (an in house pypi
clone), where as in development, each package is checked out from
subversion in an editable form.

PyLucid is a good example of a project based on django providing
simple and clean installation instructions - although I wouldn't
deploy it quite like that myself, any solution which uses .htaccess is
Bad and Wrong imo*.

>
> (the reason I'm not doing it myself is that I am very new to Python and DJango)
>

And (not to be too harsh) this is why you are suggesting it. Django is
like a tool, admittedly it's one of those Leatherman style multi tools
that you can use to do almost anything, but it's still a tool for you
to use rather than a base.

Cheers

Tom

* de gustibus non est disputandum

Romain Dorgueil

unread,
Sep 12, 2011, 2:47:37 PM9/12/11
to django-d...@googlegroups.com
Hi,

it may be my first message on the list ever, but I wanted to put my 2
cents here.

From the PHP world, Symfony2 introduced a "web installer" system in its
"standard" distribution (which is the core + some fancyness).

To me, it's useless unless you want to attract people from a larger
audience than what the framework is aimed at at first. I personally
don't want some useless (or use-once at best) code to be around my
project, and I don't think it's the role of a developper-oriented piece
of software to provide such things. Of course, a more "newbie-friendly"
may be "nice-to-have", but imho the "core" of a framework should not
provide such thing.

Romain.

Alec Taylor

unread,
Sep 12, 2011, 10:54:56 PM9/12/11
to django-d...@googlegroups.com
Romain: My main argument is not for n00b developers, but just for any
nut with a server...

I want to be able to package my DJango project up into something as
easily installable as a Drupal distribution.

h3

unread,
Sep 12, 2011, 11:41:40 PM9/12/11
to Django developers
I think pretty much everything have been said about why this isn't
practical and why it's probably quite hard to implement "drop-in" apps
for django.

But there's one point that catched my attention: lowering entry level
for newcomers.

It's not because Django wasn't build with "drop-in" features in mind
that it's not possible to lower the entry level.

Not long ago, I've started working on doing exactly that.

I've written a Python package which makes django development a
breeze.. at least for me so far. It's basically a thin wrapper for
fabric, pip & virtualenv.

Among other sweet things, with simple commands I can:

* Configure it for an existing project
* Enter development mode (activate virtualenv, creates it and install
requirements if non-existents)
* Update clear/requirements, restart apache, syncdb on any stages
(dev, demo, beta, prod)
* Deploy to any stages (configured ssh keys makes it's even easier)

To be honest the deploy part works, but it still needs a bit of
polishing. However all the other commands are so damn useful in my
everyday work that it's really worth using.

My motivation was twofold:

1. Type less. I hate having to type the same thing over and over and
Ctrl+R has its limits. I run a business and it's a waste of time. I
often work on more than 10 projects at the same time, if my package
makes me save more than 100 commands over the their lifetime of a
project, it's already worth it.

2. Collaboration. Where I live Django isn't quite popular, in fact it
barely exists. Even most web design companies and programmers never
heard of it. And most developers never heard of pip, fabric,
virtualenv or even rsync for that matter. I know it sucks, but I have
to deal with it. So the faster I can set an developer on track, the
faster he can generate the profits necessary to pay his salary.

Now don't worry, the reason I write a reply on this thread is not
because I think such tool should be included in django core.

But as a whole, I think the django community would gain a lot by
promoting or even building such external tool.

A different project, aimed at setting developers on track in no time.


I know many tools exists and there's many ways to setup and use
django, but just like Python itself there is optimal ways to do it.

I think Django should advocate good practices, but also try to make
developers' life easier.

At the end of the day it would pay off.

For those who are interested, my project is hosted there:
https://github.com/h3/python-dad/tree/master/dad

Most of the docs are still hosted there (moving to docs/ & rtd):
http://code.google.com/p/python-dad/w/list

I welcome comments, suggestions and pull requests :)

Justine Tunney

unread,
Sep 12, 2011, 11:44:26 PM9/12/11
to django-d...@googlegroups.com
The only reason Drupal is able to do that is because every cheap web hosting provider supports PHP.  If we made a web gui installer, the only people who'd be able to use it would be people with root access and they're better off using apt-get.  There's no way to get people running Django on their cheap cPanel hosting accounts.

I agree with you that reducing the barriers to using Django is very important.  But what we need is not necessarily a web based installer, but something to get people off the ground so they can start playing around with Django very quickly.  Back in the day (like circa 2004) the thing that really helped me learn PHP was this program called EasyPHP which was a simple Windows based installer that got me up and running and writing code on my local machine in five minutes.

I'd like to see people start up a project for making a Windows installer for Django that does the following:

- Bundles Python 2.7
- Uses important tools like distribute/pip/virtualenv/fabric
- Installs cygwin or mingw stuff if needed
- Has a simple GUI to do the following: a) ability generate a sqlite django project skeletons, b) button to start/stop runserver, c) button to show the site in your web browser, d) button to open a terminal in your project folder, d) button to open the project folder in the file browser.

Whoever writes this tool could potentially make a lot of money because they could also write a deployment tool for deploying sites to places like Gondor.

Xavier Ordoquy

unread,
Sep 13, 2011, 2:07:08 AM9/13/11
to django-d...@googlegroups.com

Le 13 sept. 2011 à 05:44, Justine Tunney a écrit :

> I agree with you that reducing the barriers to using Django is very important. But what we need is not necessarily a web based installer, but something to get people off the ground so they can start playing around with Django very quickly. Back in the day (like circa 2004) the thing that really helped me learn PHP was this program called EasyPHP which was a simple Windows based installer that got me up and running and writing code on my local machine in five minutes.

PHP and Django installation are very different.

For PHP you need a couple of things:
- apache or equivalent
- php module
- configuration tuning
- find the apache root to put your files under
- a database
- database modules for php
and I might have missed a couple of things

For Django, you'll need:
- Python
- Django

At this point you can go ahead with the dev server and sqlite. No need to tune/configure things further. I hardly see how one can lower this further.

Beyond that, what I am wondering is how much users will be able to understand how Django work if they can't do the installation.

Regards,
Xavier.

Mikhail Korobov

unread,
Sep 13, 2011, 2:14:58 AM9/13/11
to django-d...@googlegroups.com
Hi all,

There are a lot of projects for making django deployment easier (a bit of them are listed here: http://djangopackages.com/grids/g/deployment/ ) but there is no clear winner, everybody have different preferences and requirements. I think this all doesn't relate to development of django itself now: if somebody have an idea for an another deployment app she should go and implement it and see if it will work for other people. Deployment approaches can be very different, they are subject to holy wars so I think for now the diversity is for good.

h3

unread,
Sep 13, 2011, 11:00:20 AM9/13/11
to Django developers
> Beyond that, what I am wondering is how much users will be able to understand how Django work if they can't do the installation.

Each year I accept foreign students for internship in my company and
most of then either never heard of Django or didn't bother to learn
how it works just to try it.

Most of them were competent developers, but they didn't see the point
of learning a how to get started with Django because it seemed too
complicated to setup and use for starters. So they preferred to stay
in their comfort zone: PHP.

But when I gave them no other choices than to learn and use Django,
most of them picked it up in less than a week and they "saw the
light".

Just last week my last intern wrote me on facebook to say he continued
to use django back in his country and he think it's really awsome.

The point is not to lower the bar for the "less gifted" as you imply,
it's to lower the bar so more developers can give it a try without
having to learn about every possible approaches and test them to see
which one fits their needs.

If they can get started and play with django with little efforts and
they like it, *then* they will have a good incentive to spend time
learning more about the many ways you can use and deploy it.

I think that's what "lowering the bar" is mostly about. It's not about
making it dumb-friendly by any means.

regards

Alec Taylor

unread,
Sep 13, 2011, 11:04:10 AM9/13/11
to django-d...@googlegroups.com
Agreed

On Wed, Sep 14, 2011 at 1:00 AM, h3 <hain...@gmail.com> wrote:
>> Beyond that, what I am wondering is how much users will be able understand how Django work if they can't do the installation.

Adam Jenkins

unread,
Sep 13, 2011, 11:17:39 AM9/13/11
to django-d...@googlegroups.com
On Tue, Sep 13, 2011 at 10:00 AM, h3 <hain...@gmail.com> wrote:
> Most of them were competent developers, but they didn't see the point
> of learning a how to get started with Django because it seemed too
> complicated to setup and use for starters. So they preferred to stay
> in their comfort zone: PHP.

One option a third part could put time into to solve this issue is a
prebuilt machine. A wrapped up, distributable vagrant install. That
could easily take 90% of the complexity away.

Reply all
Reply to author
Forward
0 new messages