Merge remote-tracking branch 'origin/master' into merge_test
This commit is contained in:
@@ -17,7 +17,7 @@ same properties that can trigger the issue and upload that file instead.
|
||||
- Add steps that trigger the issue in a **repeatable manner**.
|
||||
- **Screenshots** go a long way in helping understand problems.
|
||||
- The issue must be related to the code only, do not open issues for problems
|
||||
with webservers, cloud providers, etc.
|
||||
with deployments, webservers, cloud providers, etc.
|
||||
- Do not open issues asking for **support or consulting**.
|
||||
|
||||
Code
|
||||
@@ -40,7 +40,19 @@ following branches:
|
||||
are unstable and should not be used in production.
|
||||
|
||||
1. Start making your changes in your own separate branch.
|
||||
1. Write a test which shows that the bug was fixed or that the feature works as expected.
|
||||
1. Write a test which shows that the bug was fixed or that the feature works as
|
||||
expected.
|
||||
1. Sign your work. Your signature certifies your submission according to the
|
||||
articles of the [Developer Certificate of Origin](https://gitlab.com/mayan-edms/mayan-edms/blob/master/DCO).
|
||||
The sign-off should be in the form:
|
||||
|
||||
````
|
||||
Signed-off-by: John Doe <john.doe@example.com>
|
||||
````
|
||||
|
||||
You must use your real name and email, pseudonyms or anonymous contributions
|
||||
are not allowed. If you set your user.name and user.email git configs, you can
|
||||
sign your commit automatically with git commit -s.
|
||||
1. Submit a merge request for your changes.
|
||||
|
||||
Feature requests
|
||||
@@ -64,8 +76,3 @@ Code style
|
||||
----------
|
||||
- Refer to the [Development](http://mayan.readthedocs.io/en/latest/topics/development.html)
|
||||
chapter for information and examples of the code style.
|
||||
|
||||
License
|
||||
-------
|
||||
By contributing your code, you agree to license your contribution under the
|
||||
terms of the project's license.
|
||||
|
||||
36
DCO
Normal file
36
DCO
Normal file
@@ -0,0 +1,36 @@
|
||||
Developer Certificate of Origin
|
||||
Version 1.1
|
||||
|
||||
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
|
||||
660 York Street, Suite 102,
|
||||
San Francisco, CA 94110 USA
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
|
||||
Developer's Certificate of Origin 1.1
|
||||
|
||||
By making a contribution to this project, I certify that:
|
||||
|
||||
(a) The contribution was created in whole or in part by me and I
|
||||
have the right to submit it under the open source license
|
||||
indicated in the file; or
|
||||
|
||||
(b) The contribution is based upon previous work that, to the best
|
||||
of my knowledge, is covered under an appropriate open source
|
||||
license and I have the right under that license to submit that
|
||||
work with modifications, whether created in whole or in part
|
||||
by me, under the same open source license (unless I am
|
||||
permitted to submit under a different license), as indicated
|
||||
in the file; or
|
||||
|
||||
(c) The contribution was provided directly to me by some other
|
||||
person who certified (a), (b) or (c) and I have not modified
|
||||
it.
|
||||
|
||||
(d) I understand and agree that this project and the contribution
|
||||
are public and that a record of the contribution (including all
|
||||
personal information I submit with it, including my sign-off) is
|
||||
maintained indefinitely and may be redistributed consistent with
|
||||
this project or the open source license(s) involved.
|
||||
@@ -68,6 +68,8 @@ Step 3- Open a browser and go to http://localhost
|
||||
- [Videos](https://www.youtube.com/channel/UCJOOXHP1MJ9lVA7d8ZTlHPw)
|
||||
- [Documentation](http://mayan.readthedocs.io/en/stable/)
|
||||
- [Paid support](http://www.mayan-edms.com/providers/)
|
||||
- [Roadmap](https://gitlab.com/mayan-edms/mayan-edms/wikis/roadmap)
|
||||
- [Contributing](https://gitlab.com/mayan-edms/mayan-edms/blob/master/CONTRIBUTING.md)
|
||||
- [Community forum](https://groups.google.com/forum/#!forum/mayan-edms)
|
||||
- [Community forum archive](http://mayan-edms.1003.x6.nabble.com/)
|
||||
- [Source code, issues, bugs](https://gitlab.com/mayan-edms/mayan-edms)
|
||||
|
||||
@@ -6,7 +6,8 @@ from rest_framework.reverse import reverse
|
||||
from common.models import SharedUploadedFile
|
||||
|
||||
from .models import (
|
||||
Document, DocumentVersion, DocumentPage, DocumentType, RecentDocument
|
||||
Document, DocumentVersion, DocumentPage, DocumentType,
|
||||
DocumentTypeFilename, RecentDocument
|
||||
)
|
||||
from .settings import setting_language
|
||||
from .tasks import task_upload_new_version
|
||||
@@ -45,11 +46,18 @@ class DocumentPageSerializer(serializers.HyperlinkedModelSerializer):
|
||||
)
|
||||
|
||||
|
||||
class DocumentTypeFilenameSerializer(serializers.ModelSerializer):
|
||||
class Meta:
|
||||
model = DocumentTypeFilename
|
||||
fields = ('filename',)
|
||||
|
||||
|
||||
class DocumentTypeSerializer(serializers.HyperlinkedModelSerializer):
|
||||
documents_url = serializers.HyperlinkedIdentityField(
|
||||
view_name='rest_api:documenttype-document-list',
|
||||
)
|
||||
documents_count = serializers.SerializerMethodField()
|
||||
filenames = DocumentTypeFilenameSerializer(many=True, read_only=True)
|
||||
|
||||
class Meta:
|
||||
extra_kwargs = {
|
||||
@@ -57,7 +65,7 @@ class DocumentTypeSerializer(serializers.HyperlinkedModelSerializer):
|
||||
}
|
||||
fields = (
|
||||
'delete_time_period', 'delete_time_unit', 'documents_url',
|
||||
'documents_count', 'id', 'label', 'trash_time_period',
|
||||
'documents_count', 'id', 'label', 'filenames', 'trash_time_period',
|
||||
'trash_time_unit', 'url'
|
||||
)
|
||||
model = DocumentType
|
||||
|
||||
Reference in New Issue
Block a user