DjangoBB

Django based forum engine

  • Log in
  • Sign up
  • You are not logged in.
  • ‹‹ previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • next ››
  • Root
  • » The Other
  • » Installation Tutorial spacer

#1 Nov. 3, 2010 00:35:40

bixmix
spacer
spacer
Registered: 2010-11-02
Posts: 7
Reputation: spacer   0  spacer
Profile   Send e-mail  

Installation Tutorial

this doc is deprecated
saw wiki: 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: djangobb.org/ [djangobb.org]
  2. a. Haystack requires Woosh. You can get it here: hg clone bitbucket.org/mchaput/whoosh [bitbucket.org]
  3. b. You need to use django-registration v0.7 (NOT 0.8a): 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: 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 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.


    Edited slav0nic (Aug. 18, 2011 12:31:56)

  • Offline

    • Report

    #2 Nov. 3, 2010 13:37:05

    slav0nic
    DjangoBB Developer
    spacer
    spacer
    From: Ukraine
    Registered: 2009-10-25
    Posts: 409
    Reputation: spacer   9  spacer
    Profile   Send e-mail  

    Installation Tutorial

    tnx)

    Offline

    • Report

    #3 Nov. 3, 2010 13:44:59

    alafin
    DjangoBB Developer
    spacer
    spacer
    From: Ukraine
    Registered: 2009-10-26
    Posts: 26
    Reputation: spacer   1  spacer
    Profile   Send e-mail  

    Installation Tutorial

    bixmix, thank you. I added in main page djangobb.org/

    Offline

    • Report

    #4 Nov. 5, 2010 13:51:54

    zeth0
    spacer
    spacer
    Registered: 2010-11-05
    Posts: 2
    Reputation: spacer   0  spacer
    Profile   Send e-mail  

    Installation Tutorial

    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: 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.

    Offline

    • Report

    #5 Nov. 8, 2010 17:51:16

    bixmix
    spacer
    spacer
    Registered: 2010-11-02
    Posts: 7
    Reputation: spacer   0  spacer
    Profile   Send e-mail  

    Installation Tutorial

    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: 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. spacer I'm not sure how to handle this.

    Edited bixmix (Nov. 8, 2010 20:40:03)

    Offline

    • Report

    #6 Nov. 8, 2010 20:02:29

    slav0nic
    DjangoBB Developer
    spacer
    spacer
    From: Ukraine
    Registered: 2009-10-25
    Posts: 409
    Reputation: spacer   9  spacer
    Profile   Send e-mail  

    Installation Tutorial

    i added crontab file

    Offline

    • Report

    #7 Nov. 8, 2010 20:40:55

    bixmix
    spacer
    spacer
    Registered: 2010-11-02
    Posts: 7
    Reputation: spacer   0  spacer
    Profile   Send e-mail  

    Installation Tutorial

    slav0nic
    i added crontab file


    Works on Microsoft Windows?

    Offline

    • Report

    #8 Nov. 9, 2010 09:14:19

    slav0nic
    DjangoBB Developer
    spacer
    spacer
    From: Ukraine
    Registered: 2009-10-25
    Posts: 409
    Reputation: spacer   9  spacer
    Profile   Send e-mail  

    Installation Tutorial

    we don't have money for windows spacer
    no, windows sux as server for python

    Offline

    • Report

    #9 Nov. 13, 2010 13:03:21

    zeth
    spacer
    spacer
    Registered: 2010-11-05
    Posts: 5
    Reputation: spacer   0  spacer
    Profile   Send e-mail  

    Installation Tutorial

    bixmix

    The cron job won't work on a non posix system. spacer 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.

    Offline

    • Report

    #10 Nov. 30, 2010 18:21:38

    deeco
    spacer
    spacer
    Registered: 2010-10-13
    Posts: 6
    Reputation: spacer   0  spacer
    Profile   Send e-mail  

    Installation Tutorial

    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
    }
    ]

    Offline

    • Report
    • ‹‹ previous
    • 1
    • 2
    • 3
    • 4
    • 5
    • next ››
    • Root
    • » The Other
    • » Installation Tutorialspacer

    Board footer

    Moderator control

    Powered by DjangoBB

    Lo-Fi Version

    gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.