Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documents should be documented like images #2001

Closed
alexgleason opened this issue Dec 4, 2015 · 7 comments
Closed

Documents should be documented like images #2001

alexgleason opened this issue Dec 4, 2015 · 7 comments

Comments

@alexgleason
Copy link
Contributor

There's a section on creating image fields and templating them in the Wagtail docs. It would be nice to also include a section on creating document fields. Without it, the developer needs to view the Wagtail source code to know how to implement it.

Also feel free to reame this issue to something more explicit than "please document documents"...

@kaedroho kaedroho added this to the 1.4 milestone Dec 21, 2015
@gasman gasman modified the milestones: 1.5, 1.4 Mar 1, 2016
@gasman gasman modified the milestones: some-day, 1.5 May 10, 2016
@m1kola
Copy link
Contributor

m1kola commented Apr 13, 2017

Related question (and answer) on StackOverflow: http://stackoverflow.com/a/43389396/896843

@SalahAdDin
Copy link
Contributor

👍

@gasman gasman removed this from the some-day milestone Mar 30, 2022
@lb-
Copy link
Member

lb- commented Oct 11, 2023

I think it would be good to have cross links to document management commands, using in templates (as called out on the main description), settings that impact the way documents are served.

Finding out about documents currently is a bit haphazard.

@lb-
Copy link
Member

lb- commented Oct 11, 2023

Proposed approach.

Add ~4 new sub-pages to https://docs.wagtail.org/en/stable/advanced_topics/documents/index.html (in docs/advanced_topics/documents)

  1. Overview /basics page
  • Covers including the app 'wagtail.documents' in INSTALLED_APPS
  • Covers including URLs from wagtail.documents import urls as wagtaildocs_urls etc
  • Explain that by default they will be included in the references index
  • Add a Page example with a document file, then the page template that will make a link to that file available.
  • How the work within collections (cross link) and can be made private using private collections
  • Made available through the API via wagtail.documents.api.v2.views.DocumentsAPIViewSet - with a cross link to the relevant API section
  1. Rich text
  • Reference to document-link usage with simple example
  1. Customising the document upload form
  • WAGTAILDOCS_DOCUMENT_FORM_BASE link to setting with code example (maybe a simple T&C checkbox that the file was not created by AI :) that has to get checked on the clean method but is not saved to the Document model )
  • Link to the already created sub-pages for custom Document models and customising the upload title.
  1. Storing and serving

Most of this is just bringing cross-links to a central place and then adding supporting content.

I can see why we have not done this yet as the info is 'there', it's just not available in the obvious place (the section about documents).

@NXPY123
Copy link
Contributor

NXPY123 commented Oct 23, 2023

I've added the Overview/basics page. Can you verify the changes so I know I've understood the requirements you described correctly?

@NXPY123
Copy link
Contributor

NXPY123 commented Oct 25, 2023

Is the second page supposed to show how to insert links to documents into body text?

@lb-
Copy link
Member

lb- commented Oct 25, 2023

Is the second page supposed to show how to insert links to documents into body text?

I think that's covered by existing rich text rendering. I was thinking more about how to turn on/off the rich text feature.

lb- pushed a commit to NXPY123/wagtail that referenced this issue Nov 12, 2023
- Added customizing document upload form subsection in documents section
- Added storing and serving subpage
- Added overview section, including RichText and StreamField usage
- Closes wagtail#2001
lb- pushed a commit to NXPY123/wagtail that referenced this issue Nov 12, 2023
- Added customizing document upload form subsection in documents section
- Added storing and serving subpage
- Added overview section, including RichText and StreamField usage
- Closes wagtail#2001
@lb- lb- closed this as completed in 8932c67 Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants