On 15 July 2016 at 00:02, Gary Roach <gary719_li...@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

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFkDaoQ0WCe48gDP-atcLBLD4TsrA9%2BczAtSAPiD6%2BCaHijiSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to