Comments (14)
This is a very good idea. I like it. The CSV would have to be very rigidly formatted (unless we provided a mapping tool, which would be complex). Basically every field on the Task object in django-todo would need to be specified in the right order. And maybe a dropdown to let you select which list it should go into. The tool would be available to Staff users only (or would a command line tool be acceptable?). Other thoughts on the specific implementation?
Is this something you'd be willing to contribute?
from django-todo.
Yes, I have about 25 different values, will have to play with a main importing function then a hub people could connect to. Any aesthetic or technical requests for this?
from django-todo.
There are only 10 fields on the Task model - where are the other 15 values coming from / going to? And what do you mean by "a hub people could connect to" ?
Technical requests: We'll need tests to ensure this is working properly. Let's start simple, with a required field order mirroring the order of fields currently shown in the Task model. No mapping tool for now. Thanks in advance!
from django-todo.
Ok lets start with the first ten, and go from there. I can write tests but I'll need to know the values we are testing for as I'm relatively new to writing tests.
I have another project and we could definitely add features to this in helping to support/contribute.
One challenge is we use unittests vs pytest, do the two play well together ?
from django-todo.
pytest can officially run standard unit tests (it is backwards compatible) but pytest are so much more capable and easier to read. For consistency, it sure would be nice if you include them in pytest format. See the existing tests directory in this project for examples. Not sure what you mean by "what the values are" - you will get the CSV importer up and running, and importing a csv should result in new Tasks in the database, owned by the right people, assigned to the right people, in the right groups and lists, with valid due dates, etc. Your tests of course will feed mock data into the system and then check that tasks exist in the db reflecting the inputs (and of course also testing that bad input data results in no new tasks being created).
If you can get something off the ground, I can help,
from django-todo.
I was curious that I would be the first one to create an importer for data into a Django app and found that Django has built in JSON app. So this might be multiple functional uses; a format selectable, multi document importer to Django as a side app for the current built in JSON recognition?
from django-todo.
@datatalking As far as I know, Django doesn't include any JSON-specific support, but you can of course call the JSON libs that are part of the Python standard library. It is not clear to me how your comment relates to the point of this issue, which is the ability to import tasks from CSV.
from django-todo.
I've been wanting to work on this but it's possibly out of my depth right now. The process looks like a django serialization model. https://docs.djangoproject.com/en/2.1/topics/serialization/
It looks like we could serialize the data into Json
from django-todo.
I could probably build the feature in a day or less, just struggling for spare time. One wouldn't need JSON or serializers - Python has a built-in CSV reader. Just scoop it in and write out db records. The hard part is the tooling around it - defining the import format, and all of the small decisions to be made during import. Not hard, just need to jump into it.
from django-todo.
FYI this feature is now under way and I'm making good progress. Should be done in a few days. Would you be willing to beta test it? (that offer is open to anyone).
from django-todo.
from django-todo.
Okey doke, all set for beta testing - just check out the csv
branch of this repo, then see the new Importing Tasks via CSV
section of the readme for usage notes. This provides both a web upload interface and a management command (./manage.py import_csv -f /path/to/file.csv
). An example spreadsheet is provided in todo/data/import_example.csv
.
Please provide any and all feedback - were you able to crash it? Did you get the tasks created/updated that you expected? Did you find any bugs? Thanks and looking forward to your feedback.
from django-todo.
@datatalking I'd like to merge the pull request tomorrow and get this released. Have you had a chance to test? I built it for you! (j/k) If you don't have time, you can always file follow-on issues later.
from django-todo.
Sorry, we never heard beta feedback. But we do have tests! The CSV import feature is now merged into master, and going to pypi shortly.
from django-todo.
Related Issues (20)
- Social message response HOT 4
- Django HOT 1
- Where do i place the Navigation CSS? HOT 2
- TypeError: view must be a callable or a list/tuple in the case of include(). HOT 2
- Login Loop HOT 2
- Add Task Button not responding HOT 5
- pip install django-todo didn't install bleach HOT 1
- Match registered users sending emails to tracker and add them to "created by" HOT 1
- setup.py imports django, which it shouldnt HOT 6
- Occasional crasher when importing CSVs HOT 7
- Failed migration
- Self Test Fails HOT 1
- Add SECURITY.md HOT 2
- Please do docker-compose HOT 8
- Demo `500: Hard Crash` when entering comments HOT 2
- manage.py is missing HOT 1
- python3 manage.py migrate todo: multiple exception types must be parenthesized HOT 2
- todo/home.html not extending project home.html
- pipenv path and executable path issues HOT 3
- Relate tasks to other objects HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-todo.