On 15 July 2016 at 00:02, Gary Roach <
gary71...@verizon.net> wrote:
> While - with the exception of the metafile - these are static files, we are
> talking about hundreds of documents. I do not think that storing them as
> static files will work. They have to be searchable. I assume that I need a
> model that will set up appropriate fields in the database (postgresql) This
> is where I stumble. I've looked at the Model.field reference but can't seem
> to come up with what I need or don't know what I'm looking at. The latter
> being the most probable.
do store the PDFs as static files. just not in a single directory,
instead add one or two levels of subdirectories. Alternatively, use
an Object Storage, like S3, for that (check django-storages [1] for an
easy way to do it). To make them searchable, store the plain text of
the document in a TextField in the model, and add a full text index
(you can use Watson [2] to help with that).
[1]
http://django-storages.readthedocs.io/en/latest/
[2]
https://github.com/etianen/django-watson
--
Javier