Search - User list
Full Version: Installation Tutorial
Root » The Other » Installation Tutorial
1 2 3 4 5 6
bixmix
this doc is deprecated
saw wiki: http://djangobb.org/wiki/QuickInstall [djangobb.org]


I felt like this should be present in some form on this website, since it did not appear to be found consistently anywhere. Had I had these steps, it would have saved me a couple hours worth of work digging up how to do it. Maybe I can save someone else that effort.

Please note that I installed my first copy/instance of django yesterday, and I'm not at all familiar with django or with djangobb. So I'm just identifying the steps I needed to perform to resolve the installation issues. Also, I've had more than a decade of using python.

Key:
PROJECT_ROOT – this is where your site is installed
DJANGOBB_SRC – this is where you placed the mercurial clone of django_bb

Prerequisites:
  • A) Please ensure there is a working django setup underneath PROJECT_ROOT. This should be relatively easy to setup if the tutorial on the django website is followed.
    B) You will need to setup a database. The quickest solution is to use sqlite3 and identify a file where you'll store the database. Note that this is not a good longterm solution.
    C) These steps assume a vanilla setup. If there are files you would like to keep, make sure you save them off so they do not get overwritten.
    D) The copy steps (steps 3 and 4) are unnecessary if djangobb is used as a standalone.
Steps:
  1. 1. Install the required dependencies packages. See ‘Dependencies’ section here: http://djangobb.org/ [djangobb.org]
  2. a. Haystack requires Woosh. You can get it here: hg clone http://bitbucket.org/mchaput/whoosh [bitbucket.org]
  3. b. You need to use django-registration v0.7 (NOT 0.8a): http://bitbucket.org/ubernostrum/django-registration/get/v0.7.tar.gz [bitbucket.org]2. Download the django_bb package from the website. See ‘How to get DjangoBB sources?’ section here: http://djangobb.org/ [djangobb.org]
    3. Copy the extra data from DJANGOBB_SRC into PROJECT_ROOT
    • a. settings.py
    • b. url.py
    4. Copy the files from DJANGOBB_SRC into PROJECT_ROOT
    • a. djangobb_forum/
    • b. djangobb_index/
    • c. *static/
    • d. templates/
    • e. forms.py
    • f. search_sites.py
    • g. sitemap.py
    5. +Run the following command to create your database entries:
    ./manage.py syncdb --all
    ./manage.py migrate djangobb_forum --fake
    6. +Run the following command to start django: python manage.py runserver
    7. Point your browser to http://localhost:8000/forum [localhost]

  • * Note: this assumes that you have chose static as your MEDIA_URL.
    + If this looks unfamiliar to you, then please take a look at djangos tutorial. The manage.py script is what runs django.


  • slav0nic
    tnx)
    alafin
    bixmix, thank you. I added in main page http://djangobb.org/
    zeth0
    The above instructions imply that you are adding djangobb to an established Django project. If you are just using the forum, or if you are starting a project by setting up the forum first then you can just use the djangobb directory as is, and you do not need all those copying steps.

    A couple of things that caught me that you want to watch out for.

    Firstly I found that when the user tried to register it would throw an error about wrong number of arguments. This was because I had the wrong version of django-registration. At the time of writing, you need to use a particular version of django-registration, namely 0.7 NOT 0.8a. Version 0.7 can be obtained from the following link: http://bitbucket.org/ubernostrum/django-registration/get/v0.7.tar.gz

    Secondly, I couldn't see why the activation emails were not being sent. The answer is that Djangobb uses django-mailer so therefore outgoing email from the forum is cached in the database and sent out with the command:

    python manage.py send_mail

    You will need to setup a cron job to run this command every minute or so.
    bixmix
    zeth0
    If you are just using the forum, or if you are starting a project by setting up the forum first then you can just use the djangobb directory as is, and you do not need all those copying steps.


    I think I eluded to that in the 3 prerequisites. But added the extra point to eliminate the need to copy when using djangobb without a django install.

    zeth0
    At the time of writing, you need to use a particular version of django-registration, namely 0.7 NOT 0.8a. Version 0.7 can be obtained from the following link: http://bitbucket.org/ubernostrum/django-registration/get/v0.7.tar.gz


    I added another prerequisite for this.

    zeth0
    The answer is that Djangobb uses django-mailer so therefore outgoing email from the forum is cached in the database and sent out with the command:

    python manage.py send_mail

    You will need to setup a cron job to run this command every minute or so.


    The cron job won't work on a non posix system. I'm not sure how to handle this.
    slav0nic
    i added crontab file
    bixmix
    slav0nic
    i added crontab file


    Works on Microsoft Windows?
    slav0nic
    we don't have money for windows
    no, windows sux as server for python
    zeth
    bixmix

    The cron job won't work on a non posix system. I'm not sure how to handle this.


    I myself use a Linux server and I personally would just let people with proprietary or toy operating systems handle it. I think most Windows people use third party cron-type packages but in Microsoft Windows there is a thing called "Windows Scheduled Tasks" available under Control Panel then Scheduled Tasks.

    How this works in a shared hosting type environment I am not sure, most of the cheap web hosts tend to be Linux based anyway.
    deeco
    I have djangobb installed as an app. I only installed what was necessary, anything optional was ignored. I am at the point where it tries to render base.html but I get the following error:

    Caught VariableDoesNotExist while rendering: Failed lookup for key [request] on the line containing {% set_theme_style request.user %}

    I see it's requesting "user" from the following list and can see "user" is defined. But the request object can't access it. So how can I solve this?

    [
    {

    },
    {
    'csrf_token': <django.utils.functional.__proxy__ object at 0x7fab5130c550>
    },
    {
    'perms': <django.utils.functional.__proxy__ object at 0x7fab51313410>,
    'messages': <django.contrib.messages.storage.user_messages.LegacyFallbackStorage object at 0x7fab50916950>,
    'user': <django.utils.functional.SimpleLazyObject object at 0x7fab5130c5d0>
    },
    {

    },
    {
    'LANGUAGES': (('ar',
    'Arabic'),
    ('bg',
    'Bulgarian'),
    ('bn',
    'Bengali'),
    ('bs',
    'Bosnian'),
    ('ca',
    'Catalan'),
    ('cs',
    'Czech'),
    ('cy',
    'Welsh'),
    ('da',
    'Danish'),
    ('de',
    'German'),
    ('el',
    'Greek'),
    ('en',
    'English'),
    ('en-gb',
    'British English'),
    ('es',
    'Spanish'),
    ('es-ar',
    'Argentinian Spanish'),
    ('et',
    'Estonian'),
    ('eu',
    'Basque'),
    ('fa',
    'Persian'),
    ('fi',
    'Finnish'),
    ('fr',
    'French'),
    ('fy-nl',
    'Frisian'),
    ('ga',
    'Irish'),
    ('gl',
    'Galician'),
    ('he',
    'Hebrew'),
    ('hi',
    'Hindi'),
    ('hr',
    'Croatian'),
    ('hu',
    'Hungarian'),
    ('id',
    'Indonesian'),
    ('is',
    'Icelandic'),
    ('it',
    'Italian'),
    ('ja',
    'Japanese'),
    ('ka',
    'Georgian'),
    ('km',
    'Khmer'),
    ('kn',
    'Kannada'),
    ('ko',
    'Korean'),
    ('lt',
    'Lithuanian'),
    ('lv',
    'Latvian'),
    ('mk',
    'Macedonian'),
    ('ml',
    'Malayalam'),
    ('mn',
    'Mongolian'),
    ('nl',
    'Dutch'),
    ('no',
    'Norwegian'),
    ('nb',
    'Norwegian Bokmal'),
    ('nn',
    'Norwegian Nynorsk'),
    ('pl',
    'Polish'),
    ('pt',
    'Portuguese'),
    ('pt-br',
    'Brazilian Portuguese'),
    ('ro',
    'Romanian'),
    ('ru',
    'Russian'),
    ('sk',
    'Slovak'),
    ('sl',
    'Slovenian'),
    ('sq',
    'Albanian'),
    ('sr',
    'Serbian'),
    ('sr-latn',
    'Serbian Latin'),
    ('sv',
    'Swedish'),
    ('ta',
    'Tamil'),
    ('te',
    'Telugu'),
    ('th',
    'Thai'),
    ('tr',
    'Turkish'),
    ('uk',
    'Ukrainian'),
    ('vi',
    'Vietnamese'),
    ('zh-cn',
    'Simplified Chinese'),
    ('zh-tw',
    'Traditional Chinese')),
    'LANGUAGE_BIDI': False,
    'LANGUAGE_CODE': 'en-us'
    },
    {
    'MEDIA_URL': '/media/'
    },
    {
    'messages': <django.contrib.messages.storage.user_messages.LegacyFallbackStorage object at 0x7fab50916950>
    },
    {
    'cats': [

    ],
    'users': 1,
    'last_user': <User: danc>,
    'topics': 0,
    'guest_count': 0,
    'posts': 0,
    'users_online': [

    ],
    'online_count': 0
    }
    ]
    This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
    Powered by DjangoBB