GithubHelp home page GithubHelp logo

armadillica / dillo Goto Github PK

View Code? Open in Web Editor NEW
78.0 15.0 14.0 7.55 MB

Free and open web platform created to support crowd-driven content.

Home Page: https://dillo.space

Python 74.48% HTML 0.46% Pug 25.06%
community forum framework discussion

dillo's People

Contributors

christianclavet avatar dependabot[bot] avatar dfelinto avatar fsiddi avatar fweeb avatar venomgfx 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

Watchers

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

dillo's Issues

Pagination doesn't maintain category

As reported here, when navigating a specific category, the pagination links at the bottom of the page link to pages without categories (e.g. page two of 'Meta' links to /p/2 rather than /p/meta/2).

I've looked at the jade template in the default theme and I don't think the issue is there. I believe that the data fed to the template just doesn't include category information.

Error retrieving user karma when user is not authenticated

To reproduce, simply click on any post without being logged in.

Traceback (most recent call last):
  File "/Users/fsiddi/.venvs/dillo/lib/python3.6/site-packages/eve/flaskapp.py", line 1033, in __call__
    return super(Eve, self).__call__(environ, start_response)
  File "/Users/fsiddi/.venvs/dillo/lib/python3.6/site-packages/flask/app.py", line 1994, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/fsiddi/.venvs/dillo/lib/python3.6/site-packages/flask/app.py", line 1985, in wsgi_app
    response = self.handle_exception(e)
  File "/Users/fsiddi/.venvs/dillo/lib/python3.6/site-packages/flask/app.py", line 1540, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/fsiddi/.venvs/dillo/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/Users/fsiddi/.venvs/dillo/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/fsiddi/.venvs/dillo/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/fsiddi/.venvs/dillo/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/fsiddi/.venvs/dillo/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/Users/fsiddi/.venvs/dillo/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/fsiddi/.venvs/dillo/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/fsiddi/Developer/dillo/dillo/posts/routes.py", line 35, in view_embed
    return view_node(node_id=node_id, extra_template_args={'project': project})
  File "/Users/fsiddi/Developer/pillar/pillar/web/nodes/routes.py", line 236, in view
    **extra_template_args)
  File "/Users/fsiddi/.venvs/dillo/lib/python3.6/site-packages/flask/templating.py", line 134, in render_template
    context, ctx.app)
  File "/Users/fsiddi/.venvs/dillo/lib/python3.6/site-packages/flask/templating.py", line 116, in _render
    rv = template.render(context)
  File "/Users/fsiddi/.venvs/dillo/lib/python3.6/site-packages/jinja2/asyncsupport.py", line 76, in render
    return original_render(self, *args, **kwargs)
  File "/Users/fsiddi/.venvs/dillo/lib/python3.6/site-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/Users/fsiddi/.venvs/dillo/lib/python3.6/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/fsiddi/.venvs/dillo/lib/python3.6/site-packages/jinja2/_compat.py", line 37, in reraise
    raise value.with_traceback(tb)
  File "/Users/fsiddi/Developer/dillo/dillo/templates/nodes/custom/dillo_post/view_embed.html", line 38, in top-level template code
    <div class="op-karma">Karma: {{ node.user.extension_props.dillo.karma }}</div>
  File "/Users/fsiddi/.venvs/dillo/lib/python3.6/site-packages/jinja2/environment.py", line 430, in getattr
    return getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'None' has no attribute 'dillo'

Twitter username doesn't update

It doesn't currently seem possible to update the Twitter username in the admin panel. Regardless of what you set in there, it always shows dillospace as the value in that field after you save changes.

Can't edit a post's category

This one was reported to me on my little site. It seems that there's no interface for changing a post's category after it's been posted. The current work-around is to copy the contents of the post and re-post it in the desired category, but that seems a bit kludgy.

Night mode does not work

In both firefox and chrome, night mode does not work. I've cleared cache of navigation, cokkies, etc. but I can not make it work.

Sometimes the web is "recharged" and it is without CSS styles. (image attached).

screenshot_20180111_112015

Count comments including reply

Use the following code:

db.nodes.aggregate(

  // Pipeline
  [
    // Stage 1
    {
      $match: {
      parent: ObjectId('57c03fac983773693e5c8d51')
      }
    },

    // Stage 2
    {
      $lookup: {
          "from" : "nodes",
          "localField" : "_id",
          "foreignField" : "parent",
          "as" : "jemoeder"
      }
    },

    // Stage 3
    {
      $project: {
          count: {$add: [1, { $size: "$jemoeder" }]}
      }
    },

    // Stage 4
    {
      $group: {
      _id: null,
      total: {$sum: "$count"}
      }
    },
  ]
);

Support email notifications

Receiving emails when you get notifications would be great. There could be an option to enable/disable it in the settings page

Can't edit existing categories from admin panel

Currently, it's not possible to edit or delete existing categories from the admin panel. You currently have to work around this by editing the database directly.

The source of the problem appears to be a missing table in the database... specifically categories_roles. The following is a report of the error from the apache logs:

[Sat Mar 26 14:25:23.549115 2016] [:error] [pid 4230:tid 139690892015360] [remote <IP_ADDRESS>:38479] ProgrammingError: (_mysql_exceptions.ProgrammingError) (1146, "Table 'rightclickselect.categories_roles' doesn't exist") [SQL: u'SELECT role.id AS role_id, role.name AS role_name, role.description AS role_description \\nFROM role, categories_roles \\nWHERE %s = categories_roles.category_id AND role.id = categories_roles.role_id'] [parameters: (18L,)]

I could add this table manualy (and will probably have to), but I'd need to know what its schema looks like.

Can't log out when using OAuth

I'm using OAuth for authentication on my site. Unfortunately, for some reason that has made it impossible for members of the site to log out using the log-out button.

Some old posts show html code

Some old posts I made (but not all of them) show all the html code instead of images, text layout and text fomatting.
For example this one works fine and this one doesn't.

I tried editing the post and while I was doing so, the preview showed the image and the layout but after I saved and refreshed it returned to displaying the code.
Note that the concerned post is originally written in markdown.

clicking on up/down vote from user profile leads to login page

How to reproduce :

  1. go to any user's profile page
  2. click on an up or down vote button on the left side : it leads to login page while you are already logged in

The same happens if you :

  1. go to any user's profile page
  2. select one of his posts
  3. click on an up or down vote button on the right side.

Overridable configs

Currently we provide a config.py.samle. We should get rid of that and replace if with sensible overridable defaults.

Error when running `manage.py setup setup_db email` for the first time

I'm trying a fresh installation here, and I run into the following problem:

(...)
Creating group demo
Traceback (most recent call last):
  File "manage.py", line 7, in <module>
    cli.manager.run()
  File "/home/dfelinto/.virtualenvs/dillo/lib/python3.6/site-packages/flask_script/__init__.py", line 412, in run
    result = self.handle(sys.argv[0], sys.argv[1:])
  File "/home/dfelinto/.virtualenvs/dillo/lib/python3.6/site-packages/flask_script/__init__.py", line 383, in handle
    res = handle(*args, **config)
  File "/home/dfelinto/.virtualenvs/dillo/lib/python3.6/site-packages/flask_script/commands.py", line 216, in __call__
    return self.run(*args, **kwargs)
  File "/home/dfelinto/src/web-dev/pillar/pillar/cli/setup.py", line 37, in setup_db
    result, _, _, status = current_app.post_internal('users', user)
  File "/home/dfelinto/src/web-dev/pillar/pillar/__init__.py", line 769, in post_internal
    return post_internal(resource, payl=payl, skip_validation=skip_validation)[:4]
  File "/home/dfelinto/.virtualenvs/dillo/lib/python3.6/site-packages/eve/methods/post.py", line 280, in post_internal
    getattr(app, "on_inserted_%s" % resource)(documents)
  File "/home/dfelinto/.virtualenvs/dillo/lib/python3.6/site-packages/events/events.py", line 77, in __call__
    f(*a, **kw)
  File "/home/dfelinto/src/web-dev/dillo/dillo/api/users/hooks.py", line 49, in after_creating_users
    assign_to_user_main(user_doc)
  File "/home/dfelinto/src/web-dev/dillo/dillo/api/users/hooks.py", line 44, in assign_to_user_main
    add_user_to_group(user_id=user_doc['_id'], group_id=group_dillo_user_main['_id'])
TypeError: <flask_script.commands.Command object at 0x7f91a1338cc0>: 'NoneType' object is not subscriptable

Links with https not recognized by Dillo

Hi all, recently updated urchn.org to use ssl via letsencrypt. when typing the url into dillo using https:// instead of http:// the submit button stays greyed out and the link is not recognized. Removing the s and submitting works again.

Link submission not working

2016-09-13_16-22-28_chrome

Tried just pasting URL and letting it generate the title and image, doesn't work either. Maybe a URL with "?foo=bar" at the end is unsupported?

Bug: button delete custom image

If you edit a publication, and you try to delete the personalized image that you have attached, by pressing its corresponding "delete" button. Do not delete the image. I used google chrome, in case you ask.

Support for RSS

Each community should provide an RSS feed (like it used to).

Update libraries

  • update pip
  • add translitcodec to requirements
  • add requests[security] to requirements

Make sure that flask-login is at the latest version, and update all current_user functions from methods to properties.

Cannot `index_nodes_rebuild` and other operations

Since 75c35a9 I can no longer run a few of the manage commands. It may be my database that is missing more data. But perhaps the query is wrong?

This is the error I get:

Traceback (most recent call last):
  File "manage.py", line 7, in <module>
    cli.manager.run()
  File "/home/dfelinto/.virtualenvs/dillo/lib/python3.6/site-packages/flask_script/__init__.py", line 412, in run
    result = self.handle(sys.argv[0], sys.argv[1:])
  File "/home/dfelinto/.virtualenvs/dillo/lib/python3.6/site-packages/flask_script/__init__.py", line 383, in handle
    res = handle(*args, **config)
  File "/home/dfelinto/.virtualenvs/dillo/lib/python3.6/site-packages/flask_script/commands.py", line 216, in __call__
    return self.run(*args, **kwargs)
  File "/home/dfelinto/src/web-dev/dillo/dillo/cli.py", line 55, in index_nodes_rebuild
    algolia_index_post_save(post)
  File "/home/dfelinto/src/web-dev/dillo/dillo/api/posts/hooks.py", line 74, in algolia_index_post_save
    comments_count = post_count_comments(node['_id'])
  File "/home/dfelinto/src/web-dev/dillo/dillo/api/posts/hooks.py", line 53, in post_count_comments
    {'$group': {'_id': None, 'total': {'$sum': '$count'}}}
  File "/home/dfelinto/.virtualenvs/dillo/lib/python3.6/site-packages/pymongo/collection.py", line 1870, in aggregate
    collation=collation)
  File "/home/dfelinto/.virtualenvs/dillo/lib/python3.6/site-packages/pymongo/collection.py", line 232, in _command
    collation=collation)
  File "/home/dfelinto/.virtualenvs/dillo/lib/python3.6/site-packages/pymongo/pool.py", line 419, in command
    collation=collation)
  File "/home/dfelinto/.virtualenvs/dillo/lib/python3.6/site-packages/pymongo/network.py", line 116, in command
    parse_write_concern_error=parse_write_concern_error)
  File "/home/dfelinto/.virtualenvs/dillo/lib/python3.6/site-packages/pymongo/helpers.py", line 210, in _check_command_response
    raise OperationFailure(msg % errmsg, code, response)
pymongo.errors.OperationFailure: The argument to $size must be an array, but was of type: string

Support html formatting again

All the old posts and comments containing html formatting such as <kbd> display as html code now.
Supporting it again would be great

Question: Post Properties

I noticed a table in the database called post_properties. Currently it isn't really used for anything in the code and a running site doesn't have any fields in this table populated. In the code, there's a comment referencing Twitter IDs, Google IDs, or Gallery images.

What's the intended purpose of this table? Could it be used to add administrative tags to posts? In my case, I would use it for marking posts as Incomplete, Duplicate, Committed, etc. Is that the right use for this table, or should I be creating a separate table for such a feature?

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.