Giter Site home page Giter Site logo

ellmetha / django-machina Goto Github PK

View Code? Open in Web Editor NEW
577.0 37.0 122.0 10.86 MB

A Django forum engine for building powerful community driven websites.

Home Page: https://django-machina.readthedocs.org

License: BSD 3-Clause "New" or "Revised" License

Python 83.33% CSS 0.05% HTML 14.51% JavaScript 0.68% Makefile 0.42% SCSS 1.01%
python django forums conversations topics messages posts board

django-machina's People

Contributors

barsch avatar bopeng avatar brendah avatar carofun avatar dependabot[bot] avatar ellmetha avatar franga2000 avatar hammygoonan avatar jmsmkn avatar kkomninos avatar lauri-openscop avatar madmatah avatar martinburchell avatar mmeinzer avatar mtueng avatar norman-tan avatar notkit avatar nvankampenhout avatar onerainbowdev avatar reinbach avatar sampaccoud avatar savelmtr avatar strindhaug avatar yakky avatar yuriiz 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

django-machina's Issues

markdown widget not loading

Hi,
I am integrating Machina into a django project.
First, let me say I really like your work !

I have a forum working but the markdown widget is not showing when creating/editing a post.
see printscreen
The strange thing is that is I have the widget in local test but not behind nginx+gunicorn.
Do you have any idea why this is happening and how to fix it?

Thanks in advance.
Climu

Some feature proposals

Are there any plans to add:

  • a function to report posts to admins/moderators
  • a banning system possibly combined with warnings users can get from moderators, so they are automatically banned for some time if they got their third warning for example
  • private messages, so you can talk to specific users privately
  • softdelete posts so admins/moderators can still have a look at them later

Some background info: I am searching for forumsoftware I can nicely integrate with the django-project I am building at the moment. The current forum is based on phpBB and thus not exactly what I want :P. So after some search I came across django-machina and had a closer look at it. And the above list is what I feel is somewhat missing.

If you consider any of those things as doable I can add an issue for each request separately.

I hope it is ok to bolt in like this :)

Editing posts of others overwrites poster field

It seems that if the user has permission to edit posts of others and they use the frontend-form to do the edits; the poster field will be overwritten with the user doing the edit. So that it appears like the admin originally wrote the post, and the original author is unable to edit their own post (since it's no longer theirs), and it will disappear from "My posts" list etc...

(This can't possibly be intended behavior, can it?)

XSS Injection

django-machina is vulnerable do XSS Injection when user creates a topic.

you just have create or reply a topic with:
<script>alert('hello');</script>

Some issues regarding the docs for app overriding

Hi! I am trying to override a class in models.py following doc instructions. It finally worked but I would like to provide some points.

In overriding code example at https://django-machina.readthedocs.io/en/stable/customization/recipes/overriding_models.html :

# -*- coding: utf-8 -*-

from __future__ import unicode_literals

from machina.apps.forum_conversation.abstract_models import AbstractTopic

# Custom models should be declared before importing
# django-machina models

class Topic(AbstractTopic):
    icon = models.ImageField(verbose_name="Icon", upload_to="forum/topic_icons")

from machina.apps.forum_conversation.models import *  # noqa

seems to be missing:

from django.db import models

In the whole example doc about overriding app/model, the app to override is reffered as "forum_conversation" but at https://django-machina.readthedocs.io/en/stable/customization/recipes/overriding_models.html the migration command is: $ django-admin makemigrations forum_conversations

Another issue I got:
'ImportError: No module named apps.forum_conversation.registry_config'
when apps directory was inside project directory.

I had to remove "yourproject" from line ] + get_machina_apps(['yourproject.apps.forum_conversation', ]) and move apps one folder up (out of project), or keep apps directory inside project and add project name to registry_config : name = yourproject.apps.forum_conversation

and __init__.py: default_app_config = 'yourproject.apps.forum_conversation.registry_config.ConversationRegistryConfig'

Add softdelete

Add a feature to enable softdeletion of posts/topics so they are only visible to staff.

Cannot use in Django 1.10.4

I follow the tutorial and cannot use machina.
I use :
Django 1.10.4
Python 3.5

The django debug page shows that TemplateDoesNotExist at /forum/.Then i found django 1.10 remove the TEMPLATE_DIRS from settings.py.I move config the path into TEMPLATES .But still cannot work. Does django1.10.4 cannot support machina?

Make posts or categories public to non users

I notice that the posts are not public and can only be viewed once regsitered as a user. Since I am manging a public project, I wonder if this is a variable that I can just switch on, or is this on the admin UI somehow.

Extending this to a site similar to SMF?

I would like to replace SMF with this forum, but one of the issues I found is that it lacks certtain social features like direct messages, and more extended user fields, I wonder if there are some code/plugin that can provide that extendability.

Translate and registration

How to change the translate? And by the way, how quests can register on forum? django-machina have ready templates for that?

Posts with polls crash when viewed as anonymous user

To reproduce, I gave the anonymous user read permissions for "see forum", "read forum", etc.

Exception Type:     AttributeError
Exception Value:    'AnonymousUser' object has no attribute 'poll_votes'

Relevant template : machina/templates/machina/forum_conversation/forum_polls/poll_detail.html

{% get_permission 'can_vote_in_poll' poll request.user as user_can_vote_in_poll %}

Relevant Code : machina/apps/forum_permission/handler.py line 181

user_votes = user.poll_votes.filter(poll_option__poll=poll)

If you provide an expected behaviour, I think I can provide a fix.

Create a .TODO or feature roadmap?

This project looks like it has a lot of potential, but project management and roadmap seems a bit nebulous. Would be nice to see a todo or feature roadmap leading to when you see this as being fit for a production environment to make it easier to make code contributions.

Forum member avatar not loading

The GET request for the avatar is returning a 404 error: Not Found: /forum/member/profile/1/machina/avatar_images/homer_2SUQZII.png [22/Mar/2016 02:23:38] "GET /forum/member/profile/1/machina/avatar_images/homer_2SUQZII.png HTTP/1.1" 404 5471

The file is located in mysite/machina/avatar_images and I have not changed the default location for avatar image storage.

Cant get to work: "ImportError: No module named board.urls"

I am probably missing somthing basic.
I have machina installed and followed the instructions to the T.
Unhandled exception in thread started by <function wrapper at 0x7fd3758700c8>

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 227, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 125, in inner_run
self.check(display_num_errors=True)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 359, in check
include_deployment_checks=include_deployment_checks,
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 346, in _run_checks
return checks.run_checks(**kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/registry.py", line 81, in run_checks
new_errors = check(app_configs=app_configs)
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 16, in check_url_config
return check_resolver(resolver)
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 26, in check_resolver
return check_method()
File "/usr/local/lib/python2.7/dist-packages/django/urls/resolvers.py", line 254, in check
for pattern in self.url_patterns:
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 35, in get
res = instance.dict[self.name] = self.func(instance)
File "/usr/local/lib/python2.7/dist-packages/django/urls/resolvers.py", line 405, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 35, in get
res = instance.dict[self.name] = self.func(instance)
File "/usr/local/lib/python2.7/dist-packages/django/urls/resolvers.py", line 398, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/home/nick/Desktop/django stuff/clubotaku/clubotaku/urls.py", line 22, in
url(r'^forum/', include('board.urls')),
File "/usr/local/lib/python2.7/dist-packages/django/conf/urls/init.py", line 50, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
ImportError: No module named board.urls

and here is my urls.py -

from django.conf.urls import url, include
from django.contrib import admin
from machina.app import board
urlpatterns = [
url(r'^$', include('home.urls')),
url(r'^anime/', include('anime.urls')),
url(r'^forum/', include('board.urls')),
url(r'^shop', include('shop.urls')),
url(r'^admin/', admin.site.urls),
]

please help i dont know what im missing lol. probably something simple tbh cx

What is the purpose of `extra_css` block?

I've found in the _base.html blocks called extra_js and extra_css.

Additionally, I've spotted that js block in board_base.html is overriden.

As I thought, I can use extra_css block to apply styles specific to my website. However, then I've found the topic_create.html where extra_css was overloaded.

My question: which block should be used for customization?

If it's a bug, won't you mind if I contribute? 🤓

Edited post

<machina.models.fields.MarkupText object at 0x7f9be925db70>

In edit form, not formated Post
django==1.9.1 py-==3.5.1

off topic - keep your good work, project look very promising, so far probably best forum engine in django world, well designed, easy to integrate with any django project.
Wishlist - upload (and display) picture in editor or pluggable editor, not only Markup editor

Duplicated queries

Inspecting a few views using django-debug-toolbar I have noticed some duplicated queries:

  • IndexView: 22 queries including 18 duplicates
  • ForumView: 20 queries including 13 duplicates
  • TopicView: 13 queries including 3 duplicates

Most of the duplicates seems to come from the app forum_permission.

MACHINA_DEFAULT_AUTHENTICATED_USER_FORUM_PERMISSIONS can't get to work

I have about 30 users and 8 groups. The groups are departments within the company. Each department has several default forums which they only have permissions to view, create, edit... etc. I'd like to create a number of forums that all users/departments can access. I thought I could do this with the default permissions within settings. If I read correctly, that is exactly why the setting exists; however, when creating a new forum and not setting any permissions, users still can't see the forum despite the default permissions allowing it.

TemplateSyntaxError Django 1.9.x

The requirements in docs mention Django 1.8+ but in 1.9 I'm getting a TemplateSyntaxError: Unused 'is' at end of if expression. when I'm trying to see a forum. According to Django docs "is" in template added in 1.10.
In topic_list.html there is the if clause: {% if not force_all_unread and unread_topics is None %}
where I changed the is to == in order to work.

"forum/index.html" template improvement

Hi,
some days ago, i started integrating the django-machina app into my company's application. I had some troubles with the customization of the template but after a brief look at the Vanilla Demo, everything is ok.
I would suggest a little improvement for the "machina/forum/index.html" template that should help users in css customization. The improvement allows "forumlist-top-controls", forum list and page-header/statistics elements to be better aligned and to group the page-header and statistics elements.
This is the improvement:

  • before:
<h4 class="page-header">{% trans "Statistics" %}</h4>
<p class="statistics">{% trans "Total posts:" %}&nbsp;<b>{{ total_posts_count }}</b>&nbsp;&#8226;&nbsp;{% trans "Total topics:" %}&nbsp;<b>{{ total_topics_count }}</b>&nbsp;</p>
  • after:
<div class="row">
    <div class="forum-page-statistics col-xs-12">
        <h4 class="page-header">{% trans "Statistics" %}</h4>
        <p class="statistics">{% trans "Total posts:" %}&nbsp;<b>{{ total_posts_count }}</b>&nbsp;&#8226;&nbsp;{% trans "Total topics:" %}&nbsp;<b>{{ total_topics_count }}</b>&nbsp;</p>
    </div>
</div>

I hope this could be useful.
Bye

CSS code is too broad

This app does not integrate very well at all with base templates as setting major things like html, body, etc.

What is the best method to use to make this work better inside of an already existing site template?

Restrict forums per site

This is probably just a feature request or just a question to how one can restrict forums to a site.
We are currently using the sites framework in Django pretty heavily and it would be super awesome to restrict a created forum/category to a site. How easy do you think this is? I would imagine we'd have to filter by site id on the queryset and add another field on the forum model to specify a site. If this is something that you don't see as a new feature in this project, how easy can one modify the forum model?

Error when triying to disaprove a post

Occurs when I click on the Yes button for disapproving a post.

Internal Server Error: /forum/moderation/queue/1/disapprove/
Traceback (most recent call last):
File "/home/me/www/my_project/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, _callback_args, *_callback_kwargs)
File "/home/me/www/my_project/local/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
return self.dispatch(request, _args, *_kwargs)
File "/home/me/www/my_project/local/lib/python2.7/site-packages/machina/apps/forum_permission/viewmixins.py", line 109, in dispatch
return super(PermissionRequiredMixin, self).dispatch(request, _args, *_kwargs)
File "/home/me/www/my_project/local/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch
return handler(request, _args, *_kwargs)
File "/home/me/www/my_project/local/lib/python2.7/site-packages/machina/apps/forum_moderation/views.py", line 453, in post
return self.disapprove(request, _args, *_kwargs)
File "/home/me/www/my_project/local/lib/python2.7/site-packages/machina/apps/forum_moderation/views.py", line 449, in disapprove
self.object.delete()
File "/home/me/www/my_project/local/lib/python2.7/site-packages/machina/apps/forum_conversation/abstract_models.py", line 297, in delete
if self.is_topic_head and self.is_topic_tail:
File "/home/me/www/my_project/local/lib/python2.7/site-packages/machina/apps/forum_conversation/abstract_models.py", line 259, in is_topic_tail
return self.topic.last_post.id == self.id
AttributeError: 'NoneType' object has no attribute 'id'

Markdown not parsing on Topic Detail page

I am using pagedown and in the preview it parses the markdown just fine, however in the topic detail it does not parse the markdown at all.

Version: 0.3.0

Machina Settings:

Machina settings

MACHINA_MARKUP_LANGUAGE = None
MACHINA_MARKUP_WIDGET = 'pagedown.widgets.PagedownWidget'
MACHINA_FORUM_NAME = 'IRC Driven'
MACHINA_DEFAULT_AUTHENTICATED_USER_FORUM_PERMISSIONS = [
'can_see_forum',
'can_read_forum',
'can_start_new_topics',
'can_reply_to_topics',
'can_edit_own_posts',
'can_post_without_approval',
'can_create_polls',
'can_vote_in_polls',
'can_download_file',
]

Attachments have some issues with amazon s3 hosting

On localhost using normal local file storage upload and download of attachments works just fine.

But when uploaded files are hosted externally on Amazon S3 (external upload hosting is required on Heroku), it struggles with uploading large-ish files (for me it failed with a 10 MB file) because the upload code runs out of memory. The exact size when this happens probably depends on how beefy your server is, but it seems to be some issues with very inefficient buffer usage when it probably should just have forwarded the file directly to amazon s3; or maybe it's because it tries to read the file back to read the file size and this blows up somehow.
(My "workaround" for this was simply telling the customer not to upload large files as attachments and use the wagtail admin document upload and post links to the uploaded file instead. And limit the users who have upload permissions severely; which is sensible anyway because of malware risks)

And a related issue is when the filename contains non-ascii characters such as the norwegian letters "æøå". Then the view for this url {% url 'forum_conversation:attachment' pk=attachment.id %} gives a server error.
(My workaround for this was simply bypassing the attachment view completely by linking directly to the file using {{ attachment.file.url }} in my template. This disables the serverside permission check, though; and makes the actual file url visible to anyone with download permissions.)

Currently using v0.5.2 but judging by the change logs of 0.5.3 and 0.5.4 i do think these issues are still valid)

I didn't save the stack-traces before fixing the issues, but if you have problems reproducing these bugs (maybe my s3 config is just stupid), I could revert my fixes on our dev-server and give you a access to the forum so you can see the stack traces yourself.

Add Topic subscription

The following feature should be implemented:

Topic subscriptions: a user can get a list of all topics to which he subscribed

conflict with jQuery

Hi,
I have implemented django-machina in my app and so am loading jQuery before the django-machina's javascript and when I load both my jQuery and the js/machina.packages.min.js the moderation dropdown button doesn't work. Taking out either js scripts resolves the problem. Which packages (apart from jQuery) are included in the js/machina.packages.min.js file?

Thanks!

How can I set up a sign up, login-out?Custom member models?

I have gotten machina working just fine. Im at the point to trying to make it work with my website im making. I want to possibly extend the profiles so that they can have more user specif info, ex: user can use the profile their logged in as and choose to favorite something(a show for example) and that then shows up in their subscribed feed when something new happens to it(new show made).
I also need to make a sign up part for the profiles so people can join the forum. How would i do this with machina?

so, is it possible to make my own profile model or to edit machinas? if so how?

Django 2.0 set to require on_delete for related fields

If you try to run the server using the -Wd flag, you become plagued with lots of warnings for machina stating that on_delete is set to be required.

 python -Wd manage.py runserver

For example,

lib\site-packages\machina\apps\forum\abstract_models.py:33: RemovedInDjango20Warning: on_delete will be a required arg for TreeForeignKey in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/1.9/ref/models/fields/#django.db.models.ForeignKey.on_delete
'self', null=True, blank=True, related_name='children', verbose_name=_('Parent'))

I've made a simple regex that you should be able to go through and find and replace all (or at least most) foreign keys that don't currently contain an on_delete to contain this so theres not much effort involved in fixing.

(ForeignKey|OneToOneField)\(((?:(?!on_delete|ForeignKey|OneToOneField)[^\)])*)\)

replace with

$1($2, on_delete=models.CASCADE)

See my stackoverflow question for more info on what this regex does if required (or ask me! :) ).

Many thanks!

Support fot django-avatar

I am about to start working on a new, rather large feature, so I'd like to check in with the maintainers first, to make sure my code would be good to merge. To allow for better interoperability with other apps, I would like to add support for django-avatar.

Since a big focus of the project seems to be keeping dependencies to a minimum, I'd like to ask if this is something you'd be interested in merging and if so, what are your requirements:
Should I keep the current avatar system and somehow add this as an option, or would it be ok to replace the current system completely?

Personally, I think that switching to django-avatar makes the most sense, but if you want the old system to remain, I can do my best to do that.

Django 1.11 and AttributeError: Can only be accessed via an instance when creating a new Topic

It would seem that after upgrading to Django 1.11 I am getting this error at this point:

raise AttributeError(_('Can only be accessed via an instance.'))

[07/Jun/2017 14:16:29] ERROR [django.request:135] Internal Server Error: /forum/forum/test-forum-77/topic/create/
Traceback (most recent call last):
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/contextlib.py", line 53, in inner
    return func(*args, **kwds)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/contextlib.py", line 53, in inner
    return func(*args, **kwds)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/contextlib.py", line 53, in inner
    return func(*args, **kwds)
  [Previous line repeated 1 more times]
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/machina/apps/forum_permission/viewmixins.py", line 108, in dispatch
    return super(PermissionRequiredMixin, self).dispatch(request, *args, **kwargs)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args, **kwargs)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/machina/apps/forum_conversation/views.py", line 548, in post
    return super(TopicCreateView, self).post(request, *args, **kwargs)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/machina/apps/forum_conversation/views.py", line 434, in post
    poll_options_validated=poll_options_validated)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/machina/apps/forum_conversation/views.py", line 494, in form_valid
    post_form, attachment_formset, poll_option_formset=poll_option_formset, **kwargs)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/machina/apps/forum_conversation/views.py", line 348, in form_valid
    self.forum_post = post_form.save()
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/machina/apps/forum_conversation/forms.py", line 204, in save
    return super(TopicForm, self).save(commit)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/machina/apps/forum_conversation/forms.py", line 108, in save
    post.save()
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/machina/apps/forum_conversation/abstract_models.py", line 304, in save
    super(AbstractPost, self).save(*args, **kwargs)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/django/db/models/base.py", line 806, in save
    force_update=force_update, update_fields=update_fields)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/django/db/models/base.py", line 831, in save_base
    update_fields=update_fields,
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 193, in send
    for receiver in self._live_receivers(sender)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/django/dispatch/dispatcher.py", line 193, in <listcomp>
    for receiver in self._live_receivers(sender)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/machina/apps/forum_member/receivers.py", line 31, in increase_posts_count
    profile, dummy = ForumProfile.objects.get_or_create(user=instance.poster)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/django/db/models/query.py", line 459, in get_or_create
    lookup, params = self._extract_model_params(defaults, **kwargs)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/django/db/models/query.py", line 521, in _extract_model_params
    property_names = self.model._meta._property_names
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/django/utils/functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/django/db/models/options.py", line 887, in _property_names
    dir(self.model) if isinstance(getattr(self.model, attr), property)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/django/db/models/options.py", line 887, in <setcomp>
    dir(self.model) if isinstance(getattr(self.model, attr), property)
  File "/opt/pyenv/versions/3.6.1/lib/python3.6/site-packages/machina/models/fields.py", line 112, in __get__
    raise AttributeError(_('Can only be accessed via an instance.'))

Unable to extend Post object

By following documentation I get RuntimeError: Conflicting 'post' models in application 'forum_conversation': <class 'machina.core.db.models.Post'> and <class 'apps.forum_conversation.models.Post'>. error
Topic model from the same application works

Pagination calculations for posts incorrect

In the forum thread listing (and when posting), using the link /topic/topic-slug/?post=postid#postid will result in the page number miscalculating when the page is full (i.e. posts in thread = n x TOPIC_POSTS_NUMBER_PER_PAGE).

For example, if posts in the thread = 30 (including the topic) and the TOPIC_POSTS_NUMBER_PER_PAGE =15, it will attempt to redirect to page 3 while page 2 is the intended behaviour.

The fix for the template tags is as follows;

https://github.com/ellmetha/django-machina/blob/master/machina/templatetags/forum_conversation_tags.py

pages_number = ( (topic.posts_count-1) // machina_settings.TOPIC_POSTS_NUMBER_PER_PAGE) + 1

The fix for posts pagination in:

https://github.com/ellmetha/django-machina/blob/master/machina/apps/forum_conversation/views.py

requested_page = ((post.position-1) // machina_settings.TOPIC_POSTS_NUMBER_PER_PAGE) + 1

Resize or auto-thumbnail profile pictures

Image size issues with large images on profile photos.

thumbnailissues

I think the desired behaviour is to either enforce a max-upload size, or to use something like sorl-thumbnail to display thumbnails in the default template.

Embedding images on a post

How did you envision users embedding images in a post? Currently one has to store the images externally and references them through a URL. But one can allow attachments and specifically images should be possible to be seen. Not needed to be downloaded.

How do I change the icons on a forum?

They all start with blue circles, I cannot find a way to change them. The demo forum makes it look like there is a way. Docs seem to say nothing on the topic.

Can't save or delete Topic

In the topics admin ( topic details not list ) it generates a validation error trying to save or delete: the error is from an empty post inline. Posts are inline under the topic in the admin, and there is always an empty one that complains about having no subject and content when trying to save the Topic.

Note: why this inline? Is it really necessary?

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.