Giter VIP home page Giter VIP logo

django-todo's Introduction

django-todo

django-todo is a pluggable, multi-user, multi-group task management and assignment application for Django, designed to be dropped into an existing site as a reusable app. django-todo can be used as a personal to-do tracker, or a group task management system, or a ticketing system for organizations (or all of these at once!)

The best way to learn how django-todo works is to visit the live demo site at django-todo.org!

Features

  • Drag and drop task prioritization
  • Email task notification
  • Search
  • Comments on tasks
  • Public-facing submission form for tickets
  • Mobile-friendly (work in progress)
  • Separate view for My Tasks (across lists)
  • Batch-import tasks via CSV
  • Batch-export tasks in CSV Format
  • Multiple file attachments per task (see settings)
  • Integrated mail tracking (unify a task list with an email box)

Requirements

  • Django 2.0+
  • Python 3.6+
  • jQuery (full version, not "slim", for drag/drop prioritization)
  • Bootstrap (to work with provided templates, though you can override them)
  • bleach (pip install bleach)
  • django-autocomplete-light (optional, required for task merging)

Overview

We assume that your organization has multiple groups of employees, each with multiple users (where actual users and groups map to Django Users and Groups). Users may belong to multiple groups, and each group can have multiple todo lists.

You must have at least one Group set up in Django admin, and that group must have at least one User as a member. This is true even if you're the sole user of django-todo.

Users can view and modify all to-do lists belonging to their group(s). Only users with is_staff can add or delete lists.

Identical list names can exist in different groups, but not in the same group.

Emails are generated to the assigned-to person when new tasks are created.

File attachments of a few types are allowed on tasks by default. See settings to disable or to limit filetypes. If you are concerned about file sizes, limit them in your web server configuration (not currently handled separately by django-todo).

Comment threads can be added to tasks. Each participant in a thread receives email when new comments are added.

django-todo is auth-only. You must set up a login system and at least one group before deploying.

All tasks are "created by" the current user and can optionally be "assigned to" a specific user. Unassigned tickets appear as belonging to "anyone" in the UI.

django-todo v2 makes use of features only available in Django 2.0. It will not work in previous versions. v2 is only tested against Python 3.x -- no guarantees if running it against older versions.

Installation

django-todo is a Django app, not a project site. It needs a site to live in. You can either install it into an existing Django project site, or clone the django-todo demo site (GTD).

If using your own site, be sure you have jQuery and Bootstrap wired up and working.

django-todo views that require it will insert additional CSS/JavaScript into page heads, so your project's base templates must include:

{% block extrahead %}{% endblock extrahead %}
{% block extra_js %}{% endblock extra_js %}

django-todo comes with its own todo/base.html, which extends your master base.html. All content lives inside of:

{% block content %}{% endblock %}

If you use some other name for your main content area, you'll need to override and alter the provided templates.

All views are login-required. Therefore, you must have a working user authentication system.

For email notifications to work, make sure your site/project is set up to send email.

Make sure you've installed the Django "sites" framework and have specified the default site in settings, e.g. SITE_ID = 1

Put django-todo/todo somewhere on your Python path, or install via pip:

pip install django-todo

Add to your settings:

INSTALLED_APPS = (
    ...
    'todo',
)

Migrate in database tables:

python manage.py migrate todo

Add to your URL conf:

path('todo/', include('todo.urls', namespace="todo")),

Add links to your site's navigation system:

<a href="{% url 'todo:lists' %}">Todo Lists</a>
<a href="{% url 'todo:mine' %}">My Tasks</a>

django-todo makes use of the Django messages system. Make sure you have something like this (link) in your base.html.

Log in and access /todo!

Customizing Templates

The provided templates are fairly bare-bones, and are meant as starting points only. Unlike previous versions of django-todo, they now ship as Bootstrap examples, but feel free to override them - there is no hard dependency on Bootstrap. To override a template, create a todo folder in your project's templates dir, then copy the template you want to override from django-todo source and into that dir.

Filing Public Tickets

If you wish to use the public ticket-filing system, first create the list into which those tickets should be filed, then add its slug to TODO_DEFAULT_LIST_SLUG in settings (more on settings below).

Settings

Optional configuration params, which can be added to your project settings:

# Restrict access to ALL todo lists/views to `is_staff` users.
# If False or unset, all users can see all views (but more granular permissions are still enforced
# within views, such as requiring staff for adding and deleting lists).
TODO_STAFF_ONLY = True

# If you use the "public" ticket filing option, to whom should these tickets be assigned?
# Must be a valid username in your system. If unset, unassigned tickets go to "Anyone."
TODO_DEFAULT_ASSIGNEE = 'johndoe'

# If you use the "public" ticket filing option, to which list should these tickets be saved?
# Defaults to first list found, which is probably not what you want!
TODO_DEFAULT_LIST_SLUG = 'tickets'

# If you use the "public" ticket filing option, to which *named URL* should the user be
# redirected after submitting? (since they can't see the rest of the ticket system).
# Defaults to "/"
TODO_PUBLIC_SUBMIT_REDIRECT = 'dashboard'

# Enable or disable file attachments on Tasks
# Optionally limit list of allowed filetypes
TODO_ALLOW_FILE_ATTACHMENTS = True
TODO_ALLOWED_FILE_ATTACHMENTS = [".jpg", ".gif", ".csv", ".pdf", ".zip"]
TODO_MAXIMUM_ATTACHMENT_SIZE = 5000000  # In bytes

# Additional classes the comment body should hold.
# Adding "text-monospace" makes comment monospace
TODO_COMMENT_CLASSES = []

# The following two settings are relevant only if you want todo to track a support mailbox -
# see Mail Tracking below.
TODO_MAIL_BACKENDS
TODO_MAIL_TRACKERS

The current django-todo version number is available from the todo package:

python -c "import todo; print(todo.__version__)"

Importing Tasks via CSV

django-todo has the ability to batch-import ("upsert") tasks from a specifically formatted CSV spreadsheet. This ability is provided through both a management command and a web interface.

Management Command

./manage.py import_csv -f /path/to/file.csv

Web Importer

Link from your navigation to {url "todo:import_csv"}. Follow the resulting link for the CSV web upload view.

CSV Formatting

Copy todo/data/import_example.csv to another location on your system and edit in a spreadsheet or directly.

Do not edit the header row!

The first four columns: 'Title', 'Group', 'Task List', 'Created By' are required -- all others are optional and should work pretty much exactly like manual task entry via the web UI.

Note: Internally, Tasks are keyed to TaskLists, not to Groups (TaskLists are in Gruops). However, we request the Group in the CSV because it's possible to have multiple TaskLists with the same name in different groups; i.e. we need it for namespacing and permissions.

Import Rules

Because data entered via CSV is not going through the same view permissions enforced in the rest of django-todo, and to simplify data dependency logic, and to pre-empt disagreements between django-todo users, the importer will not create new users, groups, or task lists. All users, groups, and task lists referenced in your CSV must already exist, and group memberships must be correct.

Any validation error (e.g. unparse-able dates, incorrect group memberships) will result in that row being skipped.

A report of rows upserted and rows skipped (with line numbers and reasons) is provided at the end of the run.

Upsert Logic

For each valid row, we need to decide whether to create a new task or update an existing one. django-todo matches on the unique combination of the four required columns. If we find a task that matches those, we update the rest of the columns. In other words, if you import a CSV once, then edit the Assigned To for a task and import it again, the original task will be updated with a new assignee (and same for the other columns).

Otherwise we create a new task.

Mail Tracking

What if you could turn django-todo into a shared mailbox? Django-todo includes an optional feature that allows emails sent to a dedicated mailbox to be pushed into todo as new tasks, and responses to be added as comments on those tasks. This allows support teams to work with a fully unified email + bug tracking system to avoid confusion over who's seen or responded to what.

To enable mail tracking, you need to:

  • Define an email backend for outgoing emails
  • Define an email backend for incoming emails
  • Start a worker, which will wait for new emails

In settings:

from todo.mail.producers import imap_producer
from todo.mail.consumers import tracker_consumer
from todo.mail.delivery import smtp_backend, console_backend

# email notifications configuration
# each task list can get its own delivery method
TODO_MAIL_BACKENDS = {
    # mail-queue is the name of the task list, not the worker name
    "mail-queue": smtp_backend(
        host="smtp.example.com",
        port=465,
        use_ssl=True,
        username="[email protected]",
        password="foobar",
        # used as the From field when sending notifications.
        # a username might be prepended later on
        from_address="[email protected]",
        # additionnal headers
        headers={}
    ),
}

# incoming mail worker configuration
TODO_MAIL_TRACKERS = {
    # configuration for worker "test_tracker"
    "test_tracker": {
        "producer": imap_producer(
            host="imap.example.com",
            username="[email protected]",
            password="foobar",
            # process_all=False, # by default, only unseen emails are processed
            # preserve=False, # delete emails if False
            # nap_duration=1, # duration of the pause between polling rounds
            # input_folder="INBOX", # where to read emails from
        ),
        "consumer": tracker_consumer(
            group="Mail Queuers",
            task_list_slug="mail-queue",
            priority=1,
            task_title_format="[TEST_MAIL] {subject}",
        )
    }
}

Optionally, the email addresses of incoming emails can be mapped back to django users. If a user emails the test_tracker, and also is a registered User in your application, the user will show up as having created the task or comment. By default, only the email address will show up.

This isn't enabled by default, as some domains are misconfigured and do not prevent impersonation. If this option is enabled and your setup doesn't properly authenticate emails, malicious incoming emails might mistakenly be attributed to users.

Settings:

TODO_MAIL_USER_MAPPER = None # Set to True if you would like to match users. If you do not have authentication setup, do not set this to True.

A mail worker can be started with:

./manage.py mail_worker test_tracker

Some views and URLs were renamed in 2.0 for logical consistency. If this affects you, see source code and the demo GTD site for reference to the new URL names.

If you want to log mail events, make sure to properly configure django logging:

LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'handlers': {
        'console': {
            'class': 'logging.StreamHandler',
        },
    },
    'loggers': {
        '': {
            'handlers': ['console'],
            'level': 'DEBUG',
            'propagate': True,
        },
    },
}

Running Tests

django-todo uses pytest exclusively for testing. The best way to run the suite is to clone django-todo into its own directory, install pytest, then:

pip install pytest pytest-django
pip install --editable .
pytest -x -v

Version History

2.5.0 Change setup to pyprojec.toml

2.4.11 Add SECURITY.md

2.4.10 It is now possible to use unicode characters (such as Chinese) as the only chars in a list title.

2.4.9 Fixed: Editing a task should not change its completed/incomplete status

2.4.8 Fix bug when setting default values for unspecified settings

2.4.7 Support custom user model in external_add

2.4.6 Use defaults hash for default settings, update perms and tests

2.4.5 Re-enable "notify" feature during task edit

2.4.4 Fix issues with setup.py / installation

2.4.0 Implement optional file attachments on tasks

2.3.2 Update setup.py metadata

2.3.1 Improve error handling for badly formatted or non-existent CSV uploads.

2.3.0 Implement mail tracking system. Added ability to batch-import tasks via CSV. Fixed task re-ordering if task deleted behind the scenes.

2.2.2 Update dependencies

2.2.1 Convert task delete and toggle_done views to POST only

2.2.0 Re-instate enforcement of TODO_STAFF_ONLY setting

2.1.1 Correct Python version requirement in documentation to Python 3.6

2.1.1 Split up views into separate modules.

2.1.0 December 2018: No longer allowing Javascript in task or comment bodies. Misc bug fixes.

2.0.3 April 2018: Bump production status in setup.py

2.0.2 April 2018: Improve notification email subjects and bodies

2.0.1 April 2018: Refactored "toggle done" and "delete" actions from list view.

2.0 April 2018: Major project refactor, with almost completely rewritten views, templates, and todo's first real test suite.

1.6.2 Added support for unicode characters in list name/slugs.

1.6.1 Minor bug fixes.

1.6 Allow unassigned ("Anyone") tasks. Clean-up / modernize templates and views. Testing infrastructure in place.

1.5 flake8 support, Item note no longer a required field, fix warnings for Django 1.8, Python 2/3-compatible unicode strings, simple search for tasks, get_absolute_url() for items.

1.4 - Removed styling from default templates. Added excludes fields from Form definitions to prevent warnings. Removed deprecated 'cycle' tags from templates. Added settings for various elements for public ticket submissions.

1.3 - Removed stray direct_to_template reference. Quoted all named URL references for Django 1.5 compatibility.

1.2 - Added CSRF protection to all sample templates. Added integrated search function. Now showing the ratio of completed/total items for each list. Better separation of media and templates. Cleaned up Item editing form (removed extraneous fields). Re-assigning tasks now properly limits the list of assignees. Moved project to github.

1.1 - Completion date was set properly when checking items off a list, but not when saving from an Item detail page. Added a save method on Item to fix. Fixed documentation bug re: context_processors. Newly added comments are now emailed to everyone who has participated in a thread on a task.

1.0.1 - When viewing a single task that you want to close, it's useful to be able to comment on and close a task at the same time. We were using django-comments so these were different models in different views. Solution was to stop using django-comments and roll our own, then rewire the view. Apologies if you were using a previous version - you may need to port over your comments to the new system.

1.0.0 - Major upgrade to release version. Drag and drop task prioritization. E-mail notifications (now works more like a ticket system). More attractive date picker. Bug fixes.

0.9.5 - Fixed jquery bug when editing existing events - datepicker now shows correct date. Removed that damned Django pony from base template.

0.9.4 - Replaced str with unicode in models. Fixed links back to lists in "My Tasks" view.

0.9.3 - Missing link to the individual task editing view

0.9.2 - Now fails gracefully when trying to add a 2nd list with the same name to the same group. - Due dates for tasks are now truly optional. - Corrected datetime editing conflict when editing tasks - Max length of a task name has been raised from 60 to 140 chars. If upgrading, please modify your database accordingly (field todo_item.name = maxlength 140). - Security: Users supplied with direct task URLs can no longer view/edit tasks outside their group scope Same for list views - authorized views only. - Correct item and group counts on homepage (note - admin users see ALL groups, not just the groups they "belong" to)

0.9.1 - Removed context_processors.py - leftover turdlet

0.9 - First release

Todo 2.0 Upgrade Notes

django-todo 2.0 was rebuilt almost from the ground up, and included some radical changes, including model name changes. As a result, it is not compatible with data from django-todo 1.x. If you would like to upgrade an existing installation, try this:

  • Use ./manage.py dumpdata todo --indent 4 > todo.json to export your old todo data
  • Edit the dump file, replacing the old model names Item and List with the new model names (Task and TaskList)
  • Delete your existing todo data
  • Uninstall the old todo app and reinstall
  • Migrate, then use ./manage.py loaddata todo.json to import the edited data

Why not provide migrations?

That was the plan, but unfortunately, makemigrations created new tables and dropped the old ones, making this a destructive update. Renaming models is unfortunately not something makemigrations can do, and I really didn't want to keep the badly named original models. Sorry!

Datepicker

django-todo no longer references a jQuery datepicker, but defaults to native html5 browser datepicker. Feel free to implement one of your choosing.

URLs

Some views and URLs were renamed for logical consistency. If this affects you, see source code and the demo GTD site for reference to the new URL names.

django-todo's People

Contributors

1hanzla100 avatar bernd-wechner avatar bittner avatar calebr avatar davestgermain avatar deniz195 avatar dependabot[bot] avatar epilys avatar fross123 avatar iamlovelesh avatar james1293 avatar leephillips avatar madscientistproductions avatar multun avatar shacker avatar shantisuresh01 avatar somesmart avatar tomscytale avatar wasare 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

django-todo's Issues

Mail queues support

What ?

It might sound a little bit insane, but I would like to implement mail queues support.
The usecase is quite simple: making sure every mail of a given mailbox gets an answer.

Whenever a new mail is received, if it's already registered somewhere, comment the existing issue with the plaintext version of the received email. Otherwise, create a new issue.

How ?

  • A new model representing an email would be added. It would be referenced from comment
  • The body attribute of comments would become a property, fetching the content of the email when present, falling back to the text field otherwise.
  • A completly separate worker would register emails

Why ?

I couldn't find a good and simple mail + bug tracker combo, and I figured it isn't that much added complexity.

What it's not

  • additionnal email notification madness / embed response
  • a massive code reworks

css media in template is hardlinked

the css file in base.html is hardlinked to /media/todo/css/styles.css

it should be {{MEDIA_URL}}todo/css/styles.css

everything else in base is (correctly) linked using {{MEDIA_URL}}

Slug names conflict

Hello,

I'm using this as a helpdesk/ticketing system and I noticed that if two lists in different groups have the same name then they generate the same slug name and a later get() will get that "more than one result" error. Line 94 in views.py.

I was able to fix it for myself by manually updating the slug names in the database to be different from each other.

Thanks!

Django 1.8.2 warning and error in todo model

Juist some pointers easy to fix but juist in case you run in to them:

ERRORS:
todo.Item.created_date: (fields.E160) The options auto_now, auto_now_add, and default are mutually exclusive. Only one of these options may be present.

WARNINGS:
todo.Item.priority: (fields.W122) 'max_length' is ignored when used with IntegerField
HINT: Remove 'max_length' from field

Release version 1.5 to fix SystemCheckError in Item model

For some reason I get a SystemCheckError when I run python manage.py check (was validate until Django 1.7) on a project using django-todo with Django 1.8:

SystemCheckError: System check identified some issues:

ERRORS:
todo.Item.created_date: (fields.E160) The options auto_now, auto_now_add, and default are mutually exclusive. Only one of these options may be present.

The field provoking the error is created_date in the Item model.

extrahead block in base.html includes "jquery-ui-1.7.1.custom.css" unnecessarily

Even if you intended for this to be included in the 'extrahead' block, this would always include a non-existent file, as it's not included in your static files directory, and the version number wouldn't match the latest jquery version since it's hardcoded. So i'm guessing you added it when you were testing it, but then forgot to remove it later?

The offending line is base.html, line 9

Attachment support

Have you considered adding support for attaching documents/images to tickets?
We like the library but attachment support is a non-negotiable for our users. Would be happy to add a feature that provides this too if you can help with some direction. Thanks!

Assign task to multiple people

Hello all,
I just started using Django todo, and I love the simplicity of it. I recently hacked together a fork (locally, not on GitHub) that allows a task to be assigned to multiple users. It's not perfect yet, but would this be something worth sharing? If so, would it be the sort of thing that would stay as a fork, or could it be incorporated into the main project repo?
(I haven't contributed much on GitHub, so that's why I'm asking for etiquette advice.)
Thanks!

django mezzanine install of your django-todo app

I currently have a django/mezzanine app that runs and when I install this app i get a couple errors.

mkl-random 1.0.1 requires cython, which is not installed.
mkl-fft 1.0.0 requires cython, which is not installed.
Installing collected packages: unidecode, django-todo
Successfully installed django-todo-2.0.3 unidecode-1.0.22

It says error but then says successful django install, so I figure things might work, I put todo in my apps list and go to rerun the server and get the following error.

Unhandled exception in thread started by <function wrapper at 0x10d7997d0>
Traceback (most recent call last):
File "/Users/owner/Code/mezzanine_env/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(args, **kwargs)
File "/Users/owner/Code/mezzanine_env/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 113, in inner_run
autoreload.raise_last_exception()
File "/Users/owner/Code/mezzanine_env/lib/python2.7/site-packages/django/utils/autoreload.py", line 249, in raise_last_exception
six.reraise(
_exception)
File "/Users/owner/Code/mezzanine_env/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "/Users/owner/Code/mezzanine_env/lib/python2.7/site-packages/django/init.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/owner/Code/mezzanine_env/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/Users/owner/Code/mezzanine_env/lib/python2.7/site-packages/django/apps/config.py", line 90, in create
module = import_module(entry)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
ImportError: No module named todo

If mezzanine_env is my virtual env and its subfolder mezzanine_app is where my files are, is there a specific place where i should install this app?

In your notes you also mention some css links, where would those go as I am not seeing an existing css page in my django app.

Thanks in advance.

django-todo & wagtail integration

Hi,

I'm evaluating what are my options to add a task & writer management system to the Wagtail CMS, and I discovered django-todo through this comment on ls.joyous.

I will spend more time studying the internals of django-todo to see if I could start a wagtail-todo project (other names I have in mind are wagtail-tasks and wagtail-workflow).

First of all, I cannot see django-todo's roadmap. If there is one, can you point it out? It looks like you've been maintaining it for a while, which is reassuring, but that would be upsetting if you were to stop maintaining it tomorrow :)

Some features that I would need, but could be added directly to django-todo, are:

  • Recurring tasks (time-based, trigger action based)
  • Templates (managed from django-admin, ManyToManyField with Groups, select dropdown list in form)

Some unique features I can think of adding in a project reconcialing wagtail and django-todo are:

  • wagtail-admin styled templates (I suppose I'll take inspiration from your GTD app)
  • hooks to auto-complete and auto-create tasks (latter if recurring task feature doesn't exist in django-todo) based on some event, and default templates to figure out what task to complete/create depending on the model action being performed (sounds shaky, but trying to link tasks with some contenttype, some field and some field value opens a hole of complexity)

What are your thoughts on this? I'll be keen on contributing to django-todo core, but I have a tight schedule (I'll need to have something shipped in production by the end of next month), so your support will be highly appreciated :)

move task to other list

is it correct, that there is no option to move tasks to another list, or did I just miss that?

CSV import

While I found a few general CSV or TSV import libraries is there any recommendation or specific support for one?

There is a large amount of data that I want to load into my Django and it frequently comes in via excel or CSV files, all of which has to be loaded into Django.

Is `MissingSuperuserException` really needed?

When installing django-todo with a project you can't run the project, because the package throws a MissingSuperuserException:

MissingSuperuserException at /
django-todo requires at least one superuser in the database

The exception comes from the settings module.

Is this really needed? This way you can't run a project that has no use for a superuser or manages all administration tasks from the command line. If there are no compelling reasons for having to have a superuser there should be a warning instead of a hard exception, if any.

Don't crash during re-order if task(s) deleted

Because the demo site refreshes its db every four hours, and this error is not visible from the front-end, I see this error in logs but others don't - the reorder_tasks view crashes if referenced task IDs no longer exist.

WYSIWYG Editors

Hello, how i can change the standard text to WYSIWYG Editors in todo list?

error in list_lists view after pip install

Hi there,

Apologies if this is incorrect information (I am pretty new to python!) but there appears to be an error in version 1.5 of the todo app, or at least in the pip install.

When trying to access lists as a non-superuser, I receive:

TypeError: 'method' object is not iterable

After poking around, I found line 55 of the view.py file to read as follows:
list_list = List.objects.filter(group__in=request.user.groups.all).order_by('group', 'name')

Everything works fine once I have corrected it to this:
list_list = List.objects.filter(group__in=request.user.groups.all()).order_by('group', 'name')

Do you have any idea what could be happening?

Cheers, Will

how to run django-todo in mezzanine

Would this app work on something that is also written django or more specifically in mezzanine? I have a django page up and running, but it badly needs a todo app like this. I am interested in reposting to this page and mezzanine a link when I figure out how as well as the code.

python 3.6 is required

The readme states, that python3.3+ is required, but because of the f-strings one needs to run python3.6+

Mailtracker issues

first, thank you very much for the new mailtracking feature, I just wanted to start working on such a feature :)

But some issues came up for me:

  • had to change Comment.email_message_id to CharField and remake migrations, because mysql cannot use TextField as key and throws an error. TextField does not make sense here by the way?!
  • preserve=false setting does not work for me, emails are not deleted
  • the TODO_MAIL_BACKENDS first confused me, until I realised that they are not necessary for the mailtracking feature, its just that you can now have seperate email configs for each list, correct?
  • when a new task is created, why is he mailbody posted as comment? Is this intended? I think its good to save it as task description
  • at the the moment, anyone can use the feature when the email address is known. This should be limited to the user email addresses, even if emailaddresses can be spoofed. This way the messages could be just connected to the account and not to blank emailadresses

why no personal lists?

There should be a (simple) way for every user to have a personal list. Currently the only way to do this is create a group for every user that includes only that user. For an organisation with many users, this is untenable.

One solution is to modify the list table to include a User, then make Group and User not required, and then use Form, View and save() logic to ensure that one and only one is associated with a list. That seems overly complex.

Another option is to have a special group called "Personal", and use form and view logic to ensure that when a user is dealing with the Personal group, that they can only see lists and tasks associated with themselves. There is an issue where each user is restricted to not use a slug that is being used by another user. Its a small price to pay, and maybe upon save each slug could have the username prepended to it as a work around.

css and javascript files are not loading

my base.html looks like this.

{% load staticfiles %}

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>

{% block extrahead %}
{% endblock extrahead %}

    <a href="{% url 'todo-lists' %}">To-do Lists</a>
    <a href="{% url 'todo-mine' %}">My Tasks</a>

{% if messages %}
{% for message in messages %}
<div {% if message.tags %} class="alert alert-{{ message.tags }}"{% endif %}>
{{ message }}

{% endfor %}
{% endif %}

{% block title %}
{% endblock %}

{% block content %}
{% endblock %}

{% block body %}
{% endblock %}

No todo folder

Hi,
I used pip install django-todo to install the app in my virtual env.
Then i added the 'todo' to the INSTALLED_APPs in settings.py , and migrated the todo app, and everything.
After that i ran the server and i am able to get in the admin site( i created a superuser), but i cannot get in the todo app.( i added this in urls.py as well)
path('',include ('todo.urls')),

What am i missing.

Error migrating

I'm trying to install with Django 2.2 and getting this error when migrating:

<class 'todo.admin.AttachmentAdmin'>: (admin.E040) ModelAdmin must define "search_fields", because it's referenced by AttachmentAdmin.autocomplete_fields.
common.Comment.commented_by: (fields.E304) Reverse accessor for 'Comment.commented_by' clashes with reverse accessor for 'Comment.author'.
	HINT: Add or change a related_name argument to the definition for 'Comment.commented_by' or 'Comment.author'.
todo.Comment.author: (fields.E304) Reverse accessor for 'Comment.author' clashes with reverse accessor for 'Comment.commented_by'.
	HINT: Add or change a related_name argument to the definition for 'Comment.author' or 'Comment.commented_by'.

Make todo.Task swappable

Usecase: Extend the Task model to add a generic foreignkey to another model.
This will allow us then to set triggers to complete a task when an action is performed on its related model.
Concrete example: Link a wagtail page to a task when creating it, then auto-complete the task when the wagtail Page status field has been changed.

3rd-part code using todo:

# my_app/models.py
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from todo.models import Task


class LinkedTask(Task):
    """
    Link a task to another model, eg a Page model.
    """
    content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE)
    object_id = models.PositiveIntegerField()
    content_object = GenericForeignKey("content_type", "object_id")

# settings.py
TODO_TASK_MODEL = "my_app.LinkedTask"

todo suggested modification using swapper

import swapper

class BaseTask(models.Model):
    # rename current Task to BaseTask

class Task(BaseTask):
    class Meta:
        swappable = swapper.swappable_setting('todo', 'Task')

If you agree with this feature request, I can do a PR for it tomorrow (japan timezone)

Per-feature generic permissions system

Is there a specific reason, why only staff/admin users are allowed to create lists? I would like to allow users to create without having access to admin pages. Is that just a lack of permissions or is there an other reason for this?

message_set error

Having upgraded to the newer django trunk ('1.4 pre-alpha') I now get an error about message_set. Just needs to be migrated to the new messaging framework -- I'm attaching a diff to this ticket.

Empty Comments

Problem with comments. Why is it possible to leave an empty comment. It is Bug?

Settings are ignored

Related issue: #47
Related code: https://github.com/shacker/django-todo/blob/master/todo/defaults.py#L24

ipdb> settings.TODO_STAFF_ONLY                          
False
ipdb> key                   
'TODO_STAFF_ONLY'
ipdb> getattr(settings, key, False) or hash.get(key)    
True

TODO_STAFF_ONLY is always True, and I don't see how it could have ever worked. the first part getattr(settings, key, False) evaluate to either True or False, and the second part always evaluates to True... False or True = True or True = True.

dev libraries in pipfile

pipfile is currently:

[packages]
django = "*"
django-extensions = "*"
"psycopg2-binary" = "*"
pytest = "*"
pytest-django = "*"
"flake8" = "*"
factory-boy = "*"
titlecase = "*"
bleach = "*"

[dev-packages]
pylint = "*"
mypy = "*"

shouldn't pytest, pytest-django, flake8, factory-boy be in [dev] ?

is TODO_STAFF_ONLY used?

sorry for issue spamming, but just setting this up :)

I wonder if setting TODO_STAFF_ONLY = True does have any effect, I can still add tasks and lists with a non staff user, actually I cannot find any use of TODO_STAFF_ONLY in the code

Do you plan to add support for Django 1.6?

Hello Scot Hacker,

I am wondering if you have plan to release a version of the django-todo that supports django 1.6. When I integrated django-todo with django 1.6, I got several semantical error in template.

Thanks,
Wu

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.