Changeset 1191 in main


Ignore:
Timestamp:
06/07/12 12:10:29 (7 years ago)
Author:
pcosquer
Message:

docs: publication

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/devel/publication.rst

    r1188 r1191  
    133133++++++++++ 
    134134 
     135:func:`.display_object_lifecycle` handles the publication 
     136and unpublication of a PLMObject. 
     137 
    135138Tests 
    136139------ 
     140 
     141    * :meth:`.ViewTest.test_publish_post` 
     142 
     143    * :meth:`.ViewTest.test_publish_post_error_not_official` 
     144    
     145    * :meth:`.ViewTest.test_publish_post_error_published` 
     146     
     147    * :meth:`.ViewTest.test_unpublish_post` 
     148     
     149    * :meth:`.ViewTest.test_unpublish_post_error_unpublished` 
     150    
    137151 
    138152 
     
    140154++++++ 
    141155 
     156:func:`.public` view renders a published PLMObject. If the given  
     157object is not published, it redirects to the login page. 
     158If the given object is neither a part nor a document, it raises 
     159an :exc:`.Http404` exception. 
     160 
     161 
    142162Tests 
    143163------ 
     164 
     165    * :meth:`.ViewTest.test_public_get` 
     166 
     167    * :meth:`.ViewTest.test_public_error` 
     168 
    144169 
    145170Public download 
    146171+++++++++++++++ 
    147172 
     173:func:`.public_download` handles the download of a published file. 
     174 
     175 
    148176Browse 
    149177++++++ 
    150178 
     179:func:`.browse` allows an anonymous user to browse all published 
     180parts and documents. 
    151181 
    152182Templates 
    153183=========== 
    154184 
     185lifecycle.html 
     186+++++++++++++++ 
     187 
     188If an object has been published, this template displays a link to its 
     189publish page. 
     190 
     191If the user can publish the object, it adds a form named ``form-publish`` that 
     192prompts the user password and warns the user that a published object is 
     193accessible to anonymous user. 
     194 
     195If the user can unpublish the object, it adds a form named ``form-unpublish`` that 
     196prompts the user password and warns the user that a unpublished object is 
     197no more accessible to anonymous user. 
     198 
    155199 
    156200public.html 
    157201+++++++++++ 
    158202 
     203If the object has been published, this template displays: 
     204 
     205    * all non deprecated files 
     206    * all published attributes 
     207    * the state of the object 
     208    * all published revisions 
     209    * all published attached parts and documents 
    159210 
    160211browse.html 
    161212+++++++++++++ 
    162213 
    163  
     214If the user is not authenticated, it hides all unaccessible objects 
     215(users, groups, unpublished object). 
     216 
     217 
     218 
  • trunk/openPLM/plmapp/views/main.py

    r1190 r1191  
    15731573    return serve(ctrl, doc_file, filename) 
    15741574 
     1575@secure_required 
    15751576def public_download(request, docfile_id, filename=""): 
    15761577    """ 
    15771578    View to download a published document file. 
     1579 
     1580    It returns an :class: `HttpResponseForbidden` if the document is 
     1581    not published. 
    15781582     
    15791583    :param request: :class:`django.http.QueryDict` 
Note: See TracChangeset for help on using the changeset viewer.