First time here? Check out the FAQ!

Revision history  [back]

Askbot is a typical django plugable app + some addons. The most important folders to modify functionality are the common ones on a MVC pattern:

models/ -> this would normally be models.py in this case is a module folder that splits the model definitions into several files so it can be navigated more easily.

views/ -> also this one is a folder module including views files splited into smaller units,

templates/ -> this one includes the HTML code of the templates, it's important to note that askbot uses Jinja2 as template engine, should be more than 90% similar to django templates code.

Other important files to take a look are:

urls.py -> this defines what view function gets executed when a user visits an url.

search/ -> this folder defines the search funtionality according to database/search engine you configure.

forms.py -> form classes used in askbot.

media/ -> javascript is stored here, many features depend on javascript.

Please let me know if you need something else...

EDIT:

To modify stuff on the code easily the procedure should be the following:

  1. Fork the repository on github and clone it into your machine.
  2. Create a virtualenv for your project.
  3. Run: python setup.py develop in the askbot project root, this will install all the dependencies and you won't need to reinstall askbot everytime you make a code change, as your virtualenv will point to your repository code.
  4. Create a sample askbot project with askbot-setup command: this will just be used to run the development server, test suite and all the management commands stuff.
  5. Change code in your fork
  6. Test it with runserver on your sample project.
  7. Does it works? go to step 9, if not continue to step 8
  8. goto sept 5 and fix it!
  9. Continue working on your project :-)

Askbot is a typical django plugable app + some addons. The most important folders to modify functionality are the common ones on a MVC pattern:

models/ -> this would normally be models.py in this case is a module folder that splits the model definitions into several files so it can be navigated more easily.

views/ -> also this one is a folder module including views files splited into smaller units,

templates/ -> this one includes the HTML code of the templates, it's important to note that askbot uses Jinja2 as template engine, should be more than 90% similar to django templates code.

Other important files to take a look are:

urls.py -> this defines what view function gets executed when a user visits an url.

search/ -> this folder defines the search funtionality according to database/search engine you configure.

forms.py -> form classes used in askbot.

media/ -> javascript is stored here, many features depend on javascript.

Please let me know if you need something else...

EDIT:

To modify stuff on the code easily the procedure should be the following:

  1. Fork the repository on github and clone it into your machine.
  2. Create a virtualenv for your project.
  3. Run: python setup.py develop in the askbot project root, this will install all the dependencies and you won't need to reinstall askbot everytime you make a code change, as your virtualenv will point to your repository code.
  4. Create a sample askbot project with askbot-setup command: this will just be used to run the development server, test suite and all the management commands stuff.
  5. Change code in your fork
  6. Test it with runserver on your sample project.
  7. Does it works? go to step 9, if not continue to step 8
  8. goto sept 5 and fix it!
  9. Continue working on your project :-)