Code Monkey home page Code Monkey logo

flaskbb's Introduction

FlaskBB

Build Status codecov requires License #flaskbb:matrix.org #flaskbb@libera.chat

FlaskBB is a Forum Software written in Python using the micro framework Flask.

Currently, following features are implemented:

  • Private Messages
  • Admin Interface
  • Group based permissions
  • Markdown Support
  • Topic Tracker
  • Unread Topics/Forums
  • i18n Support
  • Completely Themeable
  • Plugin System
  • Command Line Interface

The official forums which are powered by FlaskBB can be reached via forums.flaskbb.org.

Quickstart

For a complete installation guide please visit the installation documentation here.

This is how you set up an development instance of FlaskBB:

  • Create a virtualenv
  • Configuration
    • make devconfig
  • Install dependencies and FlaskBB
    • make install
  • Run the development server
    • make run
  • Visit localhost:5000

License

FlaskBB is licensed under the BSD License.

Links

flaskbb's People

Contributors

bayerischkongo avatar caspervg avatar comradekingu avatar dependabot[bot] avatar djsilcock avatar dromanow avatar eirexe avatar exelotl avatar gordonjcp avatar gpjt avatar h5rdly avatar haliphax avatar hkupty avatar hvdklauw avatar javaj0hn avatar justanr avatar litnimax avatar maiiku avatar manistal avatar mattsterr avatar micha030201 avatar ofekrozenblat avatar realityone avatar rjackson avatar rokups avatar seanchen0617 avatar sh4nks avatar sheybey avatar uapython avatar xender avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flaskbb's Issues

A own theme

I'm pretty bad at designing.. so this will be one of the last issues I'll solve (If someone wants to design something, please feel free to do so ๐Ÿ˜„ )

Support Alternate Databases, i.e MongoDB

Hi,

I just wanted to open an issue on this, but I'll be diving in the code to see if I can modular it to support databases that sqlalchemy doesn't support, i.e MongoDB and others. Recently I moved to some projects for my business that are using mongo and I have to say I'm impressed with the performance, ease of working with it, and the scalability. I believe this is the perfect time to add that kind of support to this project, as it so new and integrating it in now, will be easier then 2 years from now. Also major props to the developer for using flask, it is my favorite web framework.

Deletings do not check CSRF

I found a risk of CSRF when deleting a topic or a post.
Deleting is using the GET method. But I didn't find any codes that check CSRF.

Editor

I have played a bit with the javascript editors (TinyMCE, MarkItUp, SCEditor) but I couldn't get familar with any of them.. I want a really simple editor like http://toopay.github.io/bootstrap-markdown. It doesn't needs to be WYSIWYG editor. But I actually have no knowledge in javascript to write one :/

Markdown instead of BBCode?

Would it be better to use markdown? I actually like markdown much more than bbcode.. it's a lot easier to write. There are also more libraries available for markdown (at least in python).

why not `form = ChangeUserDetailsForm(obj=current_user)`

https://github.com/sh4nks/flaskbb/blob/master/flaskbb/user/views.py#L112

form = ChangeUserDetailsForm()
if form.validate_on_submit():
    # pass
else:
    form.birthday.data = current_user.birthday
    # pass

The WTForms doc said:

obj - If formdata is empty or not provided, this object is checked for
      attributes matching form field names, which will be used for field values.

e.g.

form = ChangeUserDetailsForm(obj=current_user)
if form.validate_on_submit():
    # pass
# no else

Do you have some special case not to use it?

Localization

Use Flask-Babel to support different languages.

Moderator Panel

It would be nice to have an Moderator Panel. We could just rename the current "Admin Settings" to something like "Management" and display the settings depending on the permissions --> If a user has Admin permissions he can see everything but if he only has Moderator permissions he can only see the Moderation Settings/Dashboard/whatever

Use Flask-Assets for CSS/JS Includes?

Just a suggestion but while playing with the repository I noticed that the Javascript and CSS assets are being declared in "layout.html", a file which is also overridden in the themes. In both places the same CSS/JS sources are declared.

Using flask assets, any layout.html file (themes or base) could have their libs updated without having to modify the template file. This would especially help for example if someone was maintaining a third-party theme from a previous release, FlaskBB main branch can add javascript files without the theme maintainer having to update their layout.html accordingly.

Moderators

Should only a group be able to moderate a forum or should single users also be able to moderate forum?

python manage.py createall raises SQL error: no such table

Hey,

I'm having little trouble setting up the dev environment, for I'm having and issue with python manage.py createall, which raises me a no such table error, like such:

2014-05-31 18:35:37,717 INFO sqlalchemy.engine.base.Engine ROLLBACK
Traceback (most recent call last):
  File "manage.py", line 33, in <module>
    app = create_app(Config)
  File "/srv/http/flaskbb/flaskbb/app.py", line 63, in create_app
    update_settings_from_db(app)
  File "/srv/http/flaskbb/flaskbb/app.py", line 139, in update_settings_from_db
    app.config.update(Setting.as_dict(upper=True))
  File "/srv/http/flaskbb/flaskbb/admin/models.py", line 246, in as_dict
    result = cls.query.all()
  File "/srv/http/flaskbb/fbb/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2292, in all
    return list(self)
  File "/srv/http/flaskbb/fbb/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2404, in __iter__
    return self._execute_and_instances(context)
  File "/srv/http/flaskbb/fbb/lib/python2.7/site-packages/sqlalchemy/orm/query.py", line 2419, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "/srv/http/flaskbb/fbb/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 720, in execute
    return meth(self, multiparams, params)
  File "/srv/http/flaskbb/fbb/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 317, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/srv/http/flaskbb/fbb/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 817, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/srv/http/flaskbb/fbb/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 947, in _execute_context
    context)
  File "/srv/http/flaskbb/fbb/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1108, in _handle_dbapi_exception
    exc_info
  File "/srv/http/flaskbb/fbb/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 185, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/srv/http/flaskbb/fbb/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 940, in _execute_context
    context)
  File "/srv/http/flaskbb/fbb/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 435, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (OperationalError) no such table: settings u'SELECT settings.value AS settings_value, settings.extra AS settings_extra, settings."key" AS settings_key, settings.settingsgroup AS settings_settingsgroup, settings.name AS settings_name, settings.description AS settings_description, settings.value_type AS settings_value_type, settings.input_type AS settings_input_type \nFROM settings' ()

I really don't know what happened, but since I'm just starting, I can't even figure out what's happening.

Thanks for the help!

Pagination error - Is this a issue with Flask-WhooshAlchemy?

Could it be that Flask-WhooshAlchemy overwrites the query_class?
I'm not able to use my TopicQuery class anymore.

Traceback (most recent call last):
  File "/home/USER/.virtualenvs/flaskbb/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/USER/.virtualenvs/flaskbb/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/home/USER/.virtualenvs/flaskbb/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/USER/.virtualenvs/flaskbb/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/USER/.virtualenvs/flaskbb/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/USER/.virtualenvs/flaskbb/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/USER/.virtualenvs/flaskbb/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/USER/.virtualenvs/flaskbb/lib/python2.7/site-packages/flask_debugtoolbar/__init__.py", line 125, in dispatch_request
    return view_func(**req.view_args)
  File "/mnt/Daten/Documents/Workspace/flaskbb/flaskbb/forum/views.py", line 151, in view_forum
    paginate(page, current_app.config['TOPICS_PER_PAGE'], True, True)
TypeError: paginate() takes at most 4 arguments (5 given)

InvalidRequestError when deploying it.

So today I have updated the (currently still a demo) forum at http://forums.flaskbb.org and I am getting this error:

2014-06-19 14:33:35,852 ERROR: Exception on /topic/1-welcome [GET] [in /var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/flask/app.py:1423]
Traceback (most recent call last):
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/var/apps/flaskbb/flaskbb/forum/views.py", line 108, in view_topic
    topic.save()
  File "/var/apps/flaskbb/flaskbb/forum/models.py", line 496, in save
    db.session.add(self)
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 149, in do
    return getattr(self.registry(), name)(*args, **kwargs)
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1478, in add
    self._save_or_update_state(state)
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1497, in _save_or_update_state
    self._save_or_update_impl(st_)
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1746, in _save_or_update_impl
    self._update_impl(state)
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1740, in _update_impl
    self._attach(state)
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1834, in _attach
    state.session_id, self.hash_key))
InvalidRequestError: Object '<Post at 0x6900810>' is already attached to session '1' (this is '22')
2014-06-19 14:36:39,867 ERROR: Exception on /topic/1-welcome [GET] [in /var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/flask/app.py:1423]
Traceback (most recent call last):
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/var/apps/flaskbb/flaskbb/forum/views.py", line 108, in view_topic
    topic.save()
  File "/var/apps/flaskbb/flaskbb/forum/models.py", line 496, in save
    db.session.add(self)
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 149, in do
    return getattr(self.registry(), name)(*args, **kwargs)
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1478, in add
    self._save_or_update_state(state)
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1490, in _save_or_update_state
    self._save_or_update_impl(state)
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1746, in _save_or_update_impl
    self._update_impl(state)
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1740, in _update_impl
    self._attach(state)
  File "/var/apps/.virtualenvs/flaskbb/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1834, in _attach
    state.session_id, self.hash_key))
InvalidRequestError: Object '<Topic at 0x28ad490>' is already attached to session '1' (this is '2')

Any ideas why this error occurs (beside the fact that there is already a session from object) and how to fix it? It is working flawlessly with the builtin server on my workstation.

I'm deploying it with uWSGI.

Signals

Provide some signals for actions like, post/topic/forum/.. saved, deleted...

More flexible settings

While adding new setting i noticed inflexibility of the system. Currently entire settings information is forced into database. Adding new setting for me was impossible without recreating entire database. Yes - i tried mucking around with navicat but somehow forum did not like that.

My proposition:
All metada about settings should be obtained from dictionaries that are defined at runtime anyway. Plugins should register their settings fixtures at runtime w/ global manager object that later is used for obtaining all settings metadata for rendering settings pages. And in the end database should store settings as key->values only. Oh and settings values should be stored as text data so it is possible to easily eddit setting directly in database. Sometimes accidents happen and evil can be undone only by directly performing surgery on database.

Theming

Is theming available? I mean, I copied bootstrap3 folder to another where I would modify the CSS. I've changed info.json to reflect the new theme name, and changed configs/default.py to use the new theme, but on load, all static/css loading points to bootstrap3.

Is there anything wrong on my workflow? Or themeing is still unavailable? If so, I'll create a PR to help with that, since I need this feature for a freelance I'm working.

Will you have a portal?

If I were a big company, and I just want to have a community talking about my products, forums are just enough. But if the forum itself is my product, I think I want a portal as well. A portal where I can reorganize and push hot threads to gather attention.

I only have example forums in my country which are in Chinese characters to demo this idea. Please anyone help me to list English forums.

A forum about NBA/Soccer and sports. The portal will have sections to promote hots discussions, recent game videos/pictures, etc. So that users can have a glance that if there were any interesting threads to enter.

A forum about startup companies. The portal is like twitter. Any important new thread will appear there. The information is flat, not nested deep inside like old style forums do.

A forum about Smart Devices like G Glass. I'm sorry only registered users are allowed to enter. I will try to capture some screen shots if anyone interested. In this forum, every thread is associated to 1 or more products. The portal displays them like Pinterest.

Settings via Admin Panel

It would be cool to configure the "higher" options like the PER_PAGE-Options in the admin panel

Searching

I want to use Whoosh for searching, but I still need to look into it how to do it.

Events

We need more events because right now we can just add a link in the navigation and with more events it would be possible to implement other features as plugins (e.q. a Voting system)

Indexes

I think indexes are really important, especially if the forum has many users and posts.

Polls

Add an option to add a poll to a topic.

Bugfix: Primary Group Field in Edit User Form

Hello, pulled down the repository yesterday to play with and found that I wasn't seeing Groups populated into the select form for the primary group (flaskbb.management.forms.EditUser).

I made a change locally to this line in flaskbb/management/forms.py :

38 def select_primary_group():
39 return Group.query.filter(Group.guest != True).order_by(Group.id)

instead of filtering on (not Group.guest) and now see the field populating correctly. I think in this case the not operator has a different meaning (field doesn't exist or something).

flaskbb in docker.io container

Hi there,

I wanted to test out flaskbb and so I figured I would create a docker container for it.
I came up with this Dockerfile but for whatever reason I can't get it to work for
the moment. Just putting this here so other people can have a look and maybe
figure out what I did wrong.

FROM debian:jessie

ENV DEBIAN_FRONTEND noninteractive

RUN \
  apt-get update && \
  apt-get -y install \
    build-essential \
    make \
    wget \
    python \
    git

RUN \
  cd && \
  wget https://bootstrap.pypa.io/get-pip.py && \
  python get-pip.py && \
  rm get-pip.py

RUN \
  git clone https://github.com/sh4nks/flaskbb.git && \
  cd flaskbb &&\
  pip install -r requirements.txt && \
  cp flaskbb/configs/development.py.example flaskbb/configs/development.py && \
  python manage.py createall

WORKDIR /flaskbb
EXPOSE 8080

CMD "python manage.py runserver"

Cheers.

Can't delete a topic/post if nullable=False

I'm not able to delete a topic or post if the topic_id (in the Post model) has the nullable=True constraint.

It updates the topic_id when deleting the post, but I couldn't figure out why..
does someone know why this happens?

0.8049       ./forum/models.py:232 (delete) 
UPDATE posts SET topic_id=? WHERE posts.id = ?
0.4730       ./forum/models.py:232 (delete) 
DELETE FROM posts WHERE posts.id = ?

This is the traceback when using nullable=True

Traceback (most recent call last):
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/flask_debugtoolbar/__init__.py", line 125, in dispatch_request
    return view_func(**req.view_args)
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/flask_login.py", line 758, in decorated_view
    return func(*args, **kwargs)
  File "/mnt/Daten/Documents/Workspace/flaskbb/flaskbb/forum/views.py", line 409, in delete_post
    post.delete()
  File "/mnt/Daten/Documents/Workspace/flaskbb/flaskbb/forum/models.py", line 233, in delete
    db.session.commit()
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/orm/scoping.py", line 149, in do
    return getattr(self.registry(), name)(*args, **kwargs)
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 765, in commit
    self.transaction.commit()
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 370, in commit
    self._prepare_impl()
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 350, in _prepare_impl
    self.session.flush()
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1879, in flush
    self._flush(objects)
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1997, in _flush
    transaction.rollback(_capture_exception=True)
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 57, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1961, in _flush
    flush_context.execute()
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 370, in execute
    rec.execute(self)
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 512, in execute
    persistence.post_update(self.mapper, states, uow, cols)
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 89, in post_update
    mapper, table, update)
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 649, in _emit_post_update_statements
    execute(statement, multiparams)
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 717, in execute
    return meth(self, multiparams, params)
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 317, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 814, in _execute_clauseelement
    compiled_sql, distilled_params
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 927, in _execute_context
    context)
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1076, in _handle_dbapi_exception
    exc_info
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 185, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 920, in _execute_context
    context)
  File "/home/peter/.virtualenvs/flaskbb/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 425, in do_execute
    cursor.execute(statement, parameters)
IntegrityError: (IntegrityError) NOT NULL constraint failed: posts.topic_id u'UPDATE posts SET topic_id=? WHERE posts.id = ?' (None, 2)

I'm getting randomly DetachedInstanceError's.

Since we have implemented the Flask-WhooshAlchemy search, I'm get sometimes this error:
DetachedInstanceError: Parent instance <Post at 0x10e4fc4d0> is not bound to a Session; lazy load operation of attribute 'topic' cannot proceed

Replace deprecated fields/validators in forms

The latest version of (Flask-)WTForms has deprecated several form fields and validators, like TextField and Required(). FlaskBB should be updated to use their replacements (StringField and DataRequired() instead.

I'll get started on it asap

Moderators can not be left blank

relevant lines of code:

# flaskbb/admin/forms.py, line 287
def validate_moderators(self, field):
    approved_moderators = list()
    if field.data:
        # blabla

the problem is: if filed.data == "", it will not be adapted to an empty list, instead it will stay unchanged as an empty string, which is unicode. But the validator always expects a list.

ps: which version do you use on flaskbb.org? I've tried to reproduce this bug on it with test1 account, but it was not affected by this issue.

Extraneous '|' Character in Postbit for Guests

If a user has a website specified, and their posts is viewed by a guest, there is an extraneous '|' character before website. I'll fix this after I wake up.

2014-07-11-07 05 01
(Note: I've modified the look of the postbit, but the logic for the last row is the same so this should still be relevant.)

config key `MAIL_DEFAULT_SENDER` inconsistent

In configure_logging, it's DEFAULT_MAIL_SENDER. But in config files, it's MAIL_DEFAULT_SENDER.

  1. inconsistent and throw error
  2. other config keys do not have the word DEFAULT
  3. I think smtp logging is error prone. I'm using logentries.com myself. Would you consider that?

python3 support

I have found no info on this but judging from documentation explicitly indicating python2 in commands and from pip3 failing to install requirements it seems py3 is not supported. 5 years after release of python 3.0 its time to support it especially for new software.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.