Giter Site home page Giter Site logo

cfpb / idea-box Goto Github PK

View Code? Open in Web Editor NEW
157.0 20.0 49.0 1.2 MB

An application that lets an organization collect ideas, comment on them, and vote them up.

License: Creative Commons Zero v1.0 Universal

Python 77.25% CSS 10.64% JavaScript 0.48% HTML 11.63%

idea-box's Introduction

IdeaBox

Build Status

IdeaBox is a Django app for collecting and surfacing ideas from users, in the vein of IdeaScale, IdeaX, and Django Voice. IdeaBox differs from these projects in its minimal, easily integrate-able interface. IdeaBox also takes a strong stance on transparency, such that ideas, votes, etc. are tied to specific users.

Features

  • Idea Submission
  • Tagging (via taggit)
  • Voting
  • Comments
  • Listing by trending, likes, and recently added
  • Archive/hide ideas
  • Customizable challenges for specific campaigns

Screen shot

Idea Profile

Requirements

  • django (1.5.4) - This is a Django app, so you need Django.
  • django-taggit - A library for tags within Django
  • mock - A library for creating mock objects for testing.
  • south - A library for schema and data migrations.
  • django-mptt - A library enabling nested/reply-to comments

Optional

  • collab platform - Installing IdeaBox as an app inside a collab platform provides several convenience features:
    • Autocomplete when adding new tags (requires elasticsearch server)
    • User can delete tags he/she created
    • Email notifications

Installation

  • Use pip to install the dependencies listed above
  • If not using collab as the Django platform, you still need to install collab for custom_comments and taggit
pip install git+https://github.com/cfpb/collab.git#egg=collab

Settings File

Modify your settings file to add the following to your INSTALLED_APPS:

'django.contrib.comments',
'south',
'mptt',
'core.custom_comments',
'core.taggit',
'idea'

Optional: Django-taggit

If your project is already using taggit, you can use that instead of collab's taggit but you will lose some minor functionality. To use the generic taggit, replace core.taggit with taggit in the INSTALLED_APPS step above.

Folder Structure

You will need to get the contents of the src/idea directory into your Django project. The simplest way to do this might be a symbolic link.

mydjango_project/
  |- idea/      (includes models.py, views.py, etc.)
  |- mydjango_project/ (settings.py, url.py, etc.)
  |- manage.py
  |- etc etc etc

URLs

Add the idea.urls and comments.urls to your url.py. For example:

from mydjango_project import settings

if 'idea' in settings.INSTALLED_APPS and \
        'django.contrib.comments' in settings.INSTALLED_APPS:
    urlpatterns.append(url(r'^comments/',
        include('django.contrib.comments.urls')))
    urlpatterns.append(url(r'^idea/', include('idea.urls', namespace='idea')))

Migrations

From your project root, synchronize and migrate the new apps. Make sure to set your database settings.

$ python ./manage.py syncdb --noinput --migrate

Templates

A basic set of templates has been provided. The 'base.html' template should probably be overwritten into something less basic for a better user experience.

If users in the system have a profile module specified our templates will use this to link users to a profile page. This is specified through the AUTH_PROFILE_MODULE setting. Your profile module will also have to specify a get_absolute_url() method.

CSS

The default CSS style for IdeaBox is not ready for production. This was done intentionally so that IdeaBox's style can match the style of the platform in which it resides (i.e. not everyone wants a green header). The simplest way to improve the styling is to source src/idea/static/idea/css/sample_style.css in the css_files block in the /src/idea/templates/idea/idea-base.html template:

{% block "css_files" %}
    # ... existing code ...
    <link rel="stylesheet" href="{{ STATIC_URL }}idea/css/sample_style.css">
{% endblock %}

Ideally, your Django platform will provide styles that can be sourced in the base.html template described in the section above so IdeaBox can match the look and feel of your system.

Campaign Banner

To create a challenge, use Django's administrative panel to add a Banner model object. The text field will be displayed at the right of the IdeaBox idea listing page. The banner will only be displayed between Start Date and End Date (or indefinitely after the Start Date if the End Date is empty.)

idea-box's People

Contributors

cmc333333 avatar dlapiduz avatar dpford avatar khandelwal avatar m3brown avatar marcesher avatar montedesai avatar scotchester 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

idea-box's Issues

installing idea-box in collab

I've installed collab and idea-box according to the readme instructions. both are working but when i enable idea-box, the collab index page goes blank. The collab login page is still there, but the green toolbar is missing after enabling idea-box. is there some conflict between these two, or different instructions for installing idea-box within collab? Thanks,
Dave

How can I fix SiteProfileNotAvailable exception

I have I configured and deploy the application. But when I going to read some comment I will get following exception,

Exception Type: SiteProfileNotAvailable
Exception Value: You need to set AUTH_PROFILE_MODULE in your project settings

But I haven't any idea to how too set proper value for "AUTH_PROFILE_MODULE" (under src\collab\collab\settings.py).

Now I am using following values,

application name is 'idea'
I have created user call 'dev'

AUTH_PROFILE_MODULE = 'idea.dev'

Can you please tell me how can I derive that values ?

Thanks.

You need to set AUTH_PROFILE_MODULE in your project settings

Hi everyone!

I have installed ideabox last friday night. So when I try to put a comment I get an error message. The message follows bellow:

****Request Method: GET
http://127.0.0.1:8000/detail/3/
1.5
SiteProfileNotAvailable

You need to set AUTH_PROFILE_MODULE in your project settings
/usr/local/lib/python2.7/dist-packages/django/contrib/auth/models.py in get_profile, line 435
/usr/bin/python
2.7.12
['/home/edson/idea-box-master', '/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg', '/home/edson/idea-box-master/src/collab', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages']
Mon, 31 Jul 2017 15:32:59 -0500

I dont know how to fix it. I check another issue and tried to fix this problem, but I didnt get sucess.
Thanks in advance

stuck with installation

I am not a django developer, but really keen to use this project for a ideation initiative. I have been trying to set this up for last 2 days and getting lost in the dependency maze and other issues. There is not much support for the required version either.

Can someone please provide some steps/script or a Dockerfile to get a working version of this promising tool.

thanks.

Installation Ideabox - Problems

Ideabox Installation: I've tried to install ideabox o Microsoft Windows with python 3.6 and django 1.11. So, I'm very disappointed after fail trying to install on Windows and on Ubuntu 17. Is there any guide to install ideabox? Could anybody help me?
Thanks

Error: type object 'Manager' has no attribute 'from_queryset'

Hello Ideabox,
I am trying to create Ideabox project and app using Django 1.5.8, done everything described in README.md file, until the last step : migration. Error : AttributeError: type object 'Manager' has no attribute 'from_queryset'.

I suspected the mptt lib is too new for your app, but not sure what version required.
Please help!!! Thanks,

Postgres error

I'm using postgres and getting

operator does not exist: integer = text
LINE 7: ...        LEFT OUTER JOIN django_comments b ON a.id = b.object...

when I hit the /list/ page

No module named comments

Hello ideaboxers
when I migrate the project i always got the error says: No module named comments

I cant figure out what to change to make it work

thanks

Constratint Violated When Submit a Comment

Hi Guys!

When I try to add a comment to an idea I get the error message:

IntegrityError at /comments/post/

(1452, 'Cannot add or update a child row: a foreign key constraint fails (collab.django_comments, CONSTRAINT site_id_refs_id_c6498c81 FOREIGN KEY (site_id) REFERENCES django_site (id))')

How can I fix it?

Best regards

exit status 2 on repl.it

It says:

Python 3.7.4 (default, Jul  9 2019, 00:06:43)
[GCC 6.3.0 20170516] on linux
 print('Loading')
sh: 1: Syntax error: word unexpected (expecting ")")
exit status 2

Comment has no attribute is_anonymous

Did a little looking, the type of the comment I am seeing is
and the comment type is:
<class 'django.contrib.comments.models.Comment'>
I think it should be custom-comments as the django comment object does not contain an is_anonymous function. Any ideas would be very helpful.

AttributeError at /comments/post/
'Comment' object has no attribute 'is_anonymous'
Request Method: POST
Request URL: http://192.168.1.25:8000/comments/post/
Django Version: 1.5.12
Exception Type: AttributeError
Exception Value:
'Comment' object has no attribute 'is_anonymous'
Exception Location: /home/ideabox/development/mysite/idea/init.py in send_idea_notifications, line 15
Python Executable: /usr/bin/python
Python Version: 2.7.18
Python Path:
['/home/ideabox/development/mysite',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/home/ideabox/.local/lib/python2.7/site-packages',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages']
Server time: Mon, 1 Nov 2021 19:55:22 -0500

simpler and more updated doc for setup?

seeing activities in recent days, is the documentation for the setup still applicable?
I've tried following, the dependencies are mostly met by PIP, and elasticsearch isn't so hard to install. but when incorporating it to a django app, the setup seems puzzling? is there anyway to ease that pain? perhaps prototype app that users can download?

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.