Ask Your Question
1

The concept of "deployment"

asked 2011-06-20 15:39:20 -0500

Tomasz P. Szynalski gravatar image

After installing Askbot with (1) pip, (2) easy_install, or (3) untarring and running setup.py, you're supposed to run startforum (which resides in the same bin directory where the python executable is).

startforum is called a deployment script.

  1. What exactly does it do?
  2. Why is it needed? Why can't we just unzip Askbot in a directory and run it?
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-06-20 15:56:38 -0500

Evgeny gravatar image

updated 2011-06-20 15:59:14 -0500

Django can host multiple applications on the same site, where apps work like lego blocks - parts of the whole, for example - an online store and an askbot forum, etc.

All django sites have four project-wide files:

  • settings.py - the main settings configuration file
  • urls.py - main url configuration
  • __init__.py - often empty but needed for Python
  • manage.py - the hook allowing to run management commands

So what startforum script does - adds those files to a directory you select (and some more things specific to askbot.

If the directory is empty - the files will be just copied from askbot/setup_templates/, it won't overwrite any existing project files.

In the case you already have a django site you will not want to use startforum, because you don't want to just overwrite your existing settings.py.

edit flag offensive delete link more

Comments

Thanks. Now I have a better idea of what startforum does and why it's necessary.
Tomasz P. Szynalski gravatar imageTomasz P. Szynalski ( 2011-06-20 16:05:44 -0500 )edit
I think "startforum" is too generic a name. It is better to rename it into askbot_startforum or something more specific to avoid name clashes in /usr/bin path IMO
mether gravatar imagemether ( 2011-06-25 19:18:14 -0500 )edit
makes sense, thanks. It is best not to install into /usr/bin/path though, virtual environment would be better.
Evgeny gravatar imageEvgeny ( 2011-06-25 19:21:46 -0500 )edit
virtual env is better for the user, yes but from a distribution maintainer perspective, I have to install it into /usr/bin unless I am mistaken about packaging
mether gravatar imagemether ( 2011-06-25 19:58:54 -0500 )edit
yes, we'll fix this, the global script names must be distinct enough.
Evgeny gravatar imageEvgeny ( 2011-06-25 20:02:41 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2011-06-20 15:39:20 -0500

Seen: 127 times

Last updated: Jun 20 '11