Commit Graph

5853 Commits (c2f9047c90f81efbee013d8d985b88b052e3b180)

Author SHA1 Message Date
Raymond Yee 32407a5866 Merge pull request #643 from Gluejar/fix-export-privs
allow filter to manage export access
2016-10-28 12:01:26 -07:00
eric 1c7df5e00e get rid of some loader issues 2016-10-28 14:40:16 -04:00
eric 83d9c7574f new data 2016-10-28 14:39:48 -04:00
Raymond Yee bf6271cde1 Merge pull request #644 from Gluejar/no-control-characters
Handle control characters
2016-10-28 10:45:19 -07:00
Raymond Yee 77e47821f4 a Jupyter notebook in which I've tried the utilities 2016-10-28 10:42:09 -07:00
eric 39cf8c9c0b fix load errors 2016-10-27 20:05:43 -04:00
Raymond Yee 39209c786e use doab.json from 569a7f3557 2016-10-26 11:09:40 -07:00
Raymond Yee 5e82fa81f0 committing doab.json from 441c203baa/doab.json 2016-10-24 10:00:58 -07:00
eric 8697aec989 management command to clean the db 2016-10-20 15:25:09 -04:00
eric d95f81030f add sanitization code to edition form 2016-10-20 15:24:47 -04:00
eric 53d98aff21 allow filter to manage access
the "answer_filter" should limit the scope of answers the user can see.
(just answers for books the user has permission to manage) so the
questionnaire.export permission is only needed for users who need to
see answers for all books.
2016-10-18 23:07:58 -04:00
Raymond Yee 670e13f738 Merge pull request #642 from Gluejar/fix-survey-export
add distinct.
2016-10-17 12:48:02 -07:00
eric e31163164a add distinct.
Needed to test this with multiple landings configured.
2016-10-17 13:37:22 -04:00
eric 182887fdc2 remove async option 2016-10-12 16:19:43 -04:00
eric 167c7fc60a update doab loader 2016-10-12 16:07:54 -04:00
eric d4f47b2a5e handle age_level in merge_works 2016-10-12 13:55:27 -04:00
Raymond Yee 0ecff249cc Merge pull request #640 from Gluejar/harden-opds
work might not have an ebook
2016-10-12 09:38:20 -07:00
Raymond Yee 7180da1f9d I think checking whether updated is None is a bit clearer...other, updated might look like a boolean. 2016-10-12 09:34:46 -07:00
eric a73720daab work might not have an ebook 2016-10-12 11:01:30 -04:00
Raymond Yee 724f6f112e Merge pull request #639 from Gluejar/fix-upload-doi
fix two form bugs
2016-10-11 14:02:32 -07:00
eric 3ac7769656 move doab.py into loaders 2016-10-11 15:46:03 -04:00
Raymond Yee 9a15a1c832 Merge pull request #638 from Gluejar/questionnaire_export
Questionnaire export
2016-10-11 08:26:03 -07:00
Raymond Yee f7338f2276 delete core/models.py because we already have core/__init__.py 2016-10-10 15:07:14 -07:00
eric 41d8f53268 fix two form bugs
1. fix doi regexp
2. supress validation error when file is uploaded, not url
2016-10-05 18:02:03 -04:00
eric 2c79a31933 fix bug in choice-freeform entry 2016-10-05 16:59:34 -04:00
eric b0663d435b Merge branch 'master' into questionnaire_export 2016-10-05 15:43:51 -04:00
eric 0e7320d4e8 integrate exports into unglue.it surveys 2016-10-05 15:36:20 -04:00
eric e623f6d31f allow export to be customized 2016-10-05 15:35:44 -04:00
Raymond Yee 8c502513ea Merge pull request #637 from Gluejar/fix-ebook-notifications
tighten ebook notifications
2016-10-04 15:11:07 -07:00
eric 6c4874c3b2 tighten ebook notifications
The 0006_auto_20160818_1809 migration created inactive ebooks for
campaign books. These new ebooks triggered user notifications. Now the
new ebook notification is only sent if there's a new ebook. Also, it's
been a known issue #76568402 that we should stop notifying ebooks for
users who fave newly available ebooks.
2016-10-04 13:22:01 -04:00
Raymond Yee 98d6283b5f Merge pull request #636 from Gluejar/update-django-registration
fix cleanupregistration
2016-10-03 16:26:12 -07:00
eric 0a37ac2bba fix cleanupregistration
we're lucky we didn't lose any user data!
2016-10-03 13:27:25 -04:00
eric 23439bebe8 fix missing import 2016-09-30 17:55:27 -04:00
Raymond Yee 599ac8dc69 Merge pull request #635 from Gluejar/versions-relations-ednotes
Versions relations ednotes [merge into master not dj18]
2016-09-30 11:08:53 -07:00
eric 2761d28fed normalize runid
duplicating runid in three tables was bad practice and made filtering
very difficult
2016-09-30 14:04:41 -04:00
Raymond Yee 4405b4ee73 change regluit.core.tests.BookLoaderTests.test_add_related to test whether every WorkRelation points back properly 2016-09-29 15:15:46 -07:00
Raymond Yee 2e9ff2bf1c got regluit.core.tests.BookLoaderTests.test_add_related to work now -- but have to check
with Eric to see whether it's exactly the right test
2016-09-29 15:02:27 -07:00
Raymond Yee e0e96da968 Merge branch 'master' into versions-relations-ednotes 2016-09-29 14:02:23 -07:00
eric fada8e0222 correct comments 2016-09-29 10:57:15 -04:00
eric 4ba5104e06 move UnicodeWriter to utils 2016-09-28 18:42:55 -04:00
eric fc56744371 FileWrapper not needed, is broken 2016-09-28 18:40:57 -04:00
eshellman ee0e8be670 Merge pull request #634 from Gluejar/fix_lockss
[WIP] work.authors() returns list of all authors
2016-09-23 15:35:56 -04:00
eric 5fc4d631ff split version into label and iter 2016-09-23 14:53:58 -04:00
Raymond Yee 81524ac5f0 work.authors() returns list of all authors 2016-09-23 10:16:26 -07:00
Raymond Yee e8d4ab82be add comments to this migration 2016-09-22 14:28:49 -07:00
Raymond Yee eebd00ccd9 Merge pull request #633 from Gluejar/fix-missing-pass-reset-template
copy html template to txt
2016-09-20 08:07:09 -07:00
eric c730d70ea1 copy html template to txt 2016-09-20 08:18:38 -04:00
Raymond Yee 0e75a750ab an extra migration produced by `makemigrations` 2016-09-15 11:50:31 -07:00
Raymond Yee 298dca48b3 clean up .pyc and empty directories with software update 2016-09-12 11:30:25 -07:00
Raymond Yee 243e7d8029 fix error:
======================================================================
ERROR: test_nix (regluit.api.tests.FeedTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/raymondyee/D/Document/Gluejar/Gluejar.github/regluit/api/tests.py", line 173, in test_nix
    r = self.client.get('/api/onix/by/')
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/test/client.py", line 500, in get
    **extra)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/test/client.py", line 303, in get
    return self.generic('GET', path, secure=secure, **r)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/test/client.py", line 379, in generic
    return self.request(**r)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/test/client.py", line 466, in request
    six.reraise(*exc_info)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch
    return handler(request, *args, **kwargs)
  File "/Users/raymondyee/D/Document/Gluejar/Gluejar.github/regluit/api/views.py", line 208, in get
    return HttpResponse(onix.onix_feed(facet_class, max),
  File "/Users/raymondyee/D/Document/Gluejar/Gluejar.github/regluit/api/onix.py", line 25, in onix_feed
    editions = facet.facet_object.filter_model("Edition",editions).distinct()
  File "/Users/raymondyee/D/Document/Gluejar/Gluejar.github/regluit/core/facets.py", line 44, in filter_model
    return model_filter( self._filter_model(model, query_set))
  File "/Users/raymondyee/D/Document/Gluejar/Gluejar.github/regluit/core/facets.py", line 147, in edition_license_filter
    return query_set.filter(ebooks__rights=cc.ccinfo(facet_name))
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/db/models/query.py", line 679, in filter
    return self._filter_or_exclude(False, *args, **kwargs)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/db/models/query.py", line 697, in _filter_or_exclude
    clone.query.add_q(Q(*args, **kwargs))
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1310, in add_q
    clause, require_inner = self._add_q(where_part, self.used_aliases)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1338, in _add_q
    allow_joins=allow_joins, split_subq=split_subq,
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1177, in build_filter
    if isinstance(value, Iterator):
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/abc.py", line 144, in __instancecheck__
    return cls.__subclasscheck__(subtype)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/abc.py", line 180, in __subclasscheck__
    if issubclass(subclass, scls):
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/abc.py", line 161, in __subclasscheck__
    ok = cls.__subclasshook__(subclass)
  File "/Users/raymondyee/anaconda/envs/regluit613/lib/python2.7/site-packages/backports_abc.py", line 66, in __subclasshook__
    mro = C.__mro__
AttributeError: class ccinfo has no attribute '__mro__'
2016-09-12 10:42:12 -07:00