U
    枬gt                     @   s  d dl mZ d dlmZmZ d dlmZ d dlmZ d dl	Z	d dl
mZmZmZ d dlmZmZmZmZmZmZ d dlmZ d d	lmZ d d
lmZ d dlZd dlZG dd dejZdd Zdd Z dd Z!G dd dejZ"G dd dejZ#G dd dejZ$G dd dejZ%G dd dejZ&G dd dejZ'G dd  d ejZ(d!d" Z)G d#d$ d$ejZ*G d%d& d&ejZ+G d'd( d(ejZ,G d)d* d*ejZ-G d+d, d,ejZ.d-d. Z/G d/d0 d0ejZ0G d1d2 d2ejZ1dS )3    )models)SET_DEFAULTSET_NULL)ManyToManyField)reverseN)MemberGroupDevice)RoomAgencyCountryPatentOwnerPub_typeCommittee_status)datetime)slugify)HttpResponsec                   @   s   e Zd ZejddddddZejddddddZejdd	d
ddddZej	ddddZ
ejdddddZejddddZejddddZdd ZG dd dZdS )Add_PublicationzDOI to be added2   TN)
max_lengthblanknulldefaultZTitle  zauthor surname(   ze.g. 'Cuniberti')r   	help_textr   r   r   ZYear)r   r   ZComments  r   r   r   zDOI added to publication)r   r   r   zDOI already in publicationsc                 C   s
   t | jS N)stridself r#   #/var/www/nanotud/research/models.py__str__   s    zAdd_Publication.__str__c                   @   s   e Zd ZdZdS )zAdd_Publication.MetazAdd publicationsN)__name__
__module____qualname__verbose_name_pluralr#   r#   r#   r$   Meta   s   r*   )r&   r'   r(   r   	CharFielddoi	TextFieldtitleauthorIntegerFieldyearcommentBooleanFieldaddedZdoi_in_pubsr%   r*   r#   r#   r#   r$   r      s   r   c              	   C   sT   | j j}dd |jD }tdd}d||d< t|d}|| W 5 Q R X |S )Nc                 S   s   g | ]
}|j qS r#   name).0fieldr#   r#   r$   
<listcomp>(   s     z"export_as_docx.<locals>.<listcomp>ztext/csv)content_typezattachment; filename={}.txtzContent-Dispositionw)model_metafieldsr   formatopenwrite)r"   requestquerysetmetafield_namesresponseoutr#   r#   r$   export_as_docx%   s    
rH   c                 C   s<   t | }tjj|d}| }|r8|d t| j }|S N)slug_)r   Publicationobjectsfilterexistsr   firstr    )r,   rJ   qsrO   r#   r#   r$   create_slug_publication3   s    rR   c                 C   s*   ddi}|  D ]\}}| ||} q| S )Nu   ‐-)itemsreplace)textZreplacementsoriginalreplacementr#   r#   r$   replace_unicode_characters<   s     rY   c                       s  e Zd ZdZejddddZejdddd	d	d
ZdddddgZejddeddZ	ejddddZ
ejdddd	d	d
ZejdddZejddZejddd	d	d
Zejdd	d Zejeejjd!d"Zed#Zejd$d%d	d	d&Zejd	d'Zejd(d)d	d	d*Zejd+d	d	d,Zejdd-dZ ejd	d.d	d	d/Z!ejd0d	d	d1Z"ejd2d3d	d4Z#eje$d5d	d4Z%ej&d6d	d7d	d8Z'ej&d9d	d7d	d8Z(ejd	d:dZ)ejdd;d	d	d/Z*ej+dd<d	d	d
Z,ej-d	d	d	d=d>Z.d?d@ Z/dAdB Z0dCdD Z1dEdF Z2dGdH Z3 fdIdJZ4dKgZ5dLe3_6G dMdN dNZ7  Z8S )OrL   z.Model representing a single publication entry.DOIr   zNEnter <a href="https://www.crossref.org">DOI</a>. (Only DOI, not the Link/URL))r   r   Page   z
Enter PageTr   r   r   r   )RegZregular)zRev,Zreview)ZLetletter)ZBoZbook)ZConfzConference proceedingr^   zPublication  type)r   r   choicesr   zJournal shortd   z Enter Journal Abbreviation (PRB)ZJournalzEnter Journal NameFPublication  selected for CVr   r   r   r   r   zEnter publication abstracti  r   r   Zpublication_author)throughrelated_namer1   ZVolume
   r   r   r   r   zuploads/publication/img/Image)	upload_toverbose_namer   r   zuploads/publication/pdf/rl   r   r   zPublication public?2if no, not shown in publication but at member siter   r   r   r   i  r   ProjectZpublication_projectrg   r   Zpublication_groupzLink to open access pdf.N)r   r   r   z	arXiv urlz3Publication approved? If not, not shown on webpage!Z
OpenAccessz,URL where publication is shown(if empty:DOI)zCreated date of DB entry)auto_now_addr   r   rm   c                 C   s   t | jd | j d | j S )String for representing the Model object.z - )r   pub_dater.   author_listr!   r#   r#   r$   r%   f   s    zPublication.__str__c                 C   s   | j S r   r    r!   r#   r#   r$   get_idj   s    zPublication.get_idc                 C   s   t dt| jgdS )?Returns the url to access a detail record for this publication.publication-detailargsr   r   r    r!   r#   r#   r$   get_absolute_url_2m   s    zPublication.get_absolute_url_2c                 C   s   t dd| jidS )rz   r{   rJ   kwargsr   rJ   r!   r#   r#   r$   get_absolute_urlq   s    zPublication.get_absolute_urlc                 C   s   dS )z"Create a string for the reference.testr#   r!   r#   r#   r$   display_referencev   s    zPublication.display_referencec                    s>   t | j| _| jr| jdkr(t| j| _tt| j|| d S )N )rY   r.   rJ   rR   r,   superrL   save)r"   r}   r   	__class__r#   r$   r   z   s    zPublication.saverH   	referencec                   @   s   e Zd ZddgZdS )zPublication.Metaz-year	-pub_dateNr&   r'   r(   orderingr#   r#   r#   r$   r*      s   r*   )9r&   r'   r(   __doc__r   r+   r,   pagetype_choicespub_typeZjournal_shortZjournalr3   
cvselectedr-   r.   abstractrw   r   r   publicationrf   r/   r0   r1   volume	DateFieldrv   
ImageFieldcover_image	FileFieldpdf_fileZ
pdf_public	chair_pubZtweet_abstractprojectr   groupURLFieldZopen_access_urlZ	arxiv_urlZapprovedZopen_access	SlugFieldrJ   DateTimeFieldZcreated_dater%   ry   r   r   r   r   actionsshort_descriptionr*   __classcell__r#   r#   r   r$   rL   E   sJ   
rL   c                   @   sd   e Zd ZejeddejdZejddddddZ	ej
dd	dd
ZejddddZdd Zdd ZdS )JournalCoverZjournalCover_publicationNrg   r   	on_deleterZ   r   zUPlease enter only <a href="https://www.crossref.org">DOI</a> without https://doi.org/T)r   r   r   r   z&Instead of DOI if DOI is not avaliable)r   r   r   z%uploads/publication/img_JournalCover/rn   c                 C   s
   t | jS ru   )r   r,   r!   r#   r#   r$   r%      s    zJournalCover.__str__c                 C   s   | j S r   rx   r!   r#   r#   r$   ry      s    zJournalCover.get_id)r&   r'   r(   r   
ForeignKeyrL   CASCADEr   r+   r,   r   urlr   r   r%   ry   r#   r#   r#   r$   r      s   r   c                   @   s   e Zd ZejddddZejddddZejddddZejdddddZej	e
edd	Zejd
ddZejdddddZejddddZejddddZejddddZejddddZejddddZdd ZG dd dZdS )ProjectContainerzTitle (German)ra   Tr   r   zTitle (English)zFunding acronymzProject container IDri   r   r   URL to Projectr   Descriptionr   Funding scheme
Funding idzCoordinated by
Start dater   r   End datec                 C   s   | j S r   )name_englishr!   r#   r#   r$   r%      s    zProjectContainer.__str__c                   @   s   e Zd ZdgZdZdS )zProjectContainer.MetaagencyProject containerNr&   r'   r(   r   r)   r#   r#   r#   r$   r*      s   r*   N)r&   r'   r(   r   r+   Zname_germanr   Zfunding_acr
project_idr   r   r   r   r   info_urlr-   descriptionfunding_scheme
funding_idZcoordinated_byr   
start_dateend_dater%   r*   r#   r#   r#   r$   r      s   r   c                   @   s   e Zd ZejdddejdZejdddZej	dd	dd
Z
ejddddZejedejddZejddddZejdddZdd Zdd ZG dd dZdS )ResearchEquipment_maintainceResearchEquipmentZresearchequipment_maintainceNr   zMaintaince dateTrj   TrueDoes the equipment works?r   r   r   r   ri   r   r   r   z*uploads/research_equipment/img_maintaince/rn   z,uploads/research_equipment/files_maintaince/rl   r   c                 C   s   | j jS r   research_eqname_commonr!   r#   r#   r$   r%      s    z$ResearchEquipment_maintaince.__str__c                 C   s   | j S r   rx   r!   r#   r#   r$   ry      s    z#ResearchEquipment_maintaince.get_idc                   @   s   e Zd ZdgZdZdZdS )z!ResearchEquipment_maintaince.Meta-dateZ
MaintaincezResearch Equipment maintainceNr&   r'   r(   r   rm   r)   r#   r#   r#   r$   r*      s   r*   r&   r'   r(   r   r   r   r   r   dater3   worksr-   notesr
   r   roomr   imager   filer%   ry   r*   r#   r#   r#   r$   r      s   r   c                   @   s   e Zd ZejdddejdZejdddZej	dd	dd
Z
ejddddZejedejddZejddddZejdddZdd Zdd ZG dd dZdS )ResearchEquipment_calibrationr   Zresearchequipment_calibrationNr   zCalibration dateTrj   r   r   r   r   ri   r   z+uploads/research_equipment/img_calibration/rn   z-uploads/research_equipment/files_calibration/r   c                 C   s   | j jS r   r   r!   r#   r#   r$   r%      s    z%ResearchEquipment_calibration.__str__c                 C   s   | j S r   rx   r!   r#   r#   r$   ry      s    z$ResearchEquipment_calibration.get_idc                   @   s   e Zd ZdgZdZdZdS )z"ResearchEquipment_calibration.Metar   ZCalibrationzResearch Equipment calibrationNr   r#   r#   r#   r$   r*      s   r*   r   r#   r#   r#   r$   r      s   r   c                   @   s   e Zd ZejdddejdZejdddddZej	d	d
ddZ
ejddddZejedejddZejddddZdd Zdd ZG dd dZdS )ResearchEquipment_inventoryr   Zresearchequipment_inventoryNr   zInventory dateTzwill be filled automatically)r   rs   r   r   r   r   r   ri   r   z)uploads/research_equipment/img_inventory/rn   c                 C   s   | j jS r   r   r!   r#   r#   r$   r%      s    z#ResearchEquipment_inventory.__str__c                 C   s   | j S r   rx   r!   r#   r#   r$   ry      s    z"ResearchEquipment_inventory.get_idc                   @   s   e Zd ZdgZdZdZdS )z ResearchEquipment_inventory.Metar   Z	InventoryzResearch Equipment inventoryNr   r#   r#   r#   r$   r*      s   r*   )r&   r'   r(   r   r   r   r   r   r   r3   r   r-   r   r
   r   r   r   r   r%   ry   r*   r#   r#   r#   r$   r      s   r   c                   @   s  e Zd ZejddddZejddddZejdddddZejdddddZejd	d
dddZ	ejdd
dddZ
ejdddddZejdddddZejddddZejddddZejddddZejddddZejddddZejeddddZejedejdd Zejd!ddd"d#Zejd$ddd%d#Zejed&dd'Z eje!d(dddZ"ej#d)ddd*Z$ejdddd+d,Z%d-d. Z&d/d0 Z'd1d2 Z(G d3d4 d4Z)dS )5r   zCommon namera   Tr   zTechnical NameZManufacturerri   ModelZFacility   z-Chair of Materials Science and Nanotechnologyz3e. g. Chair of Materials Science and Nanotechnology)r   r   r   ZPartner
TU Dresdenze. g. TU DresdenzInventory number)r   r   r   zShow publicr   zShown on webpage?)rm   r   r   r   r   zIn Euro)r   r   r   z3Link to webpage of manufacturer for further details)r   r   r   zRLink to technology portal of TU Dresden (https://dresden-technologieportal.de/en/)Zresearchequipment_groupN)rg   r   r   r   rq   Zresearchequipment_project)r   r   rg   Equipment_CategoryZ$researchequipment_equipment_categoryZ$researchequipment_responsible_person)rg   r   Zresearchequipment_devicezuploads/research_equipment/rn   z*Internal information. Not shown on webpager   r   r   r   c                 C   s   | j d | j S rt   )r   r6   r!   r#   r#   r$   r%   	  s    zResearchEquipment.__str__c                 C   s   | j S r   rx   r!   r#   r#   r$   ry     s    zResearchEquipment.get_idc                 C   s   t dt| jgdS )Nzresearch_equipment-detailr|   r~   r!   r#   r#   r$   r     s    z"ResearchEquipment.get_absolute_urlc                   @   s   e Zd ZdgZdZdS )zResearchEquipment.Metaz-priceResearch equipmentNr   r#   r#   r#   r$   r*     s   r*   )*r&   r'   r(   r   r+   r   r6   Zmanufacturerr<   facilityZpartnerZinventory_nrr3   activer-   r   ZtechnicalSpecs
FloatFieldZpricer   r   ZtechPortalTUD_urlr   r   r   r   r
   r   r   r   categoryr   Zresponsible_personr	   Zdevicer   r   Zmaintenancer%   ry   r   r*   r#   r#   r#   r$   r      s2   r   c                 C   s6   t | }tjj|d}| }|r2|d t| }|S rI   )r   rq   rM   rN   rO   r   stringZid_nrrJ   rQ   rO   r#   r#   r$   create_slug_projects  s    r   c                   @   sX   e Zd ZejddddZejeejj	ddddZ
ejdddZd	d
 ZG dd dZdS )r   r   Tri   Zequipment_categoryzCategory of research equipmentrf   rg   rm   r   z&Index for order of reasearch equipmentrj   c                 C   s   | j S r   r5   r!   r#   r#   r$   r%   )  s    zEquipment_Category.__str__c                   @   s   e Zd ZdgZdZdS )zEquipment_Category.Metaorder_indexzResearch Equipment CategoriesNr   r#   r#   r#   r$   r*   ,  s   r*   N)r&   r'   r(   r   r+   r6   r   r   r   rf   	equipmentr0   r   r%   r*   r#   r#   r#   r$   r   %  s
   r   c                       s  e Zd ZejdddZejddddZejddddZejd	dddd
Z	e
dZej
ddddZejdddZejdddZejdddZejddddd
ZejdddddZejddddd
ZejdddddZejdddddZejdddddZejeeddZejddddd
Zejddddd
Zejd dddd
Z ej!e"d!d"Z#ej!e$d#dd$Z%eje&d%d&ejddd'Z'ej!e(e(j)j*d(d)dd*Z+ej!e,e,j)j*d+d,dd*Z-ej.d-ddd.d/Z/d0d1 Z0 fd2d3Z1d4d5 Z2G d6d7 d7Z3  Z4S )8rq   TzShow on webpage?rc   Namei,  r   zProject acronymra   z
Project IDri   r   r   r   r   r   zAOnly for DFG-funded projects. URL to project on website of GepriszURL to project agencyr   r   zImage of descriptionuploads/project/img/)rm   rl   r   r   ZAcknowledgementsr   z!Copyright of image of description)r   r   r   rm   zImage of projectzCopyright of imager   r   zFunding sumr   project_memberrg   Zproject_grouprr   r   N)rm   r   r   r   r   Zproject_equipmentr   r   Zproject_publicationrL      z1URL where project is shown(if empty:year+acronym)r   c                 C   s   | j  d| j S )ru   z | )project_acrr6   r!   r#   r#   r$   r%   ]  s    zProject.__str__c                    s   | j s| jd kr| jj}| jd ks,| jdkrTt| jjd t| jj d | j }qt| jjd t| jj d t| j }nt| jjd t| jj }t|| j	| _ t
 j||S )Nr   rK   )rJ   r   r   r6   r   r   r   r1   r   r    r   r   )r"   r}   r   Zagency_listargumentr   r#   r$   r   f  s    
(,zProject.savec                 C   s   t dd| jidS )rz   zproject-detailrJ   r   r   r!   r#   r#   r$   r   s  s    zProject.get_absolute_urlc                   @   s   e Zd ZdgZdZdS )zProject.Metaz	-end_dateZProjectsNr   r#   r#   r#   r$   r*   x  s   r*   )5r&   r'   r(   r   r3   Zshow_publicr+   r6   r   r   r   r   r   r   r   Z
gepris_urlZ
agency_urlr-   r   r   Zimage_descrZacknowledgementZcopyright_image_descrZimage_projectZcopyright_image_projectr   r   r   r   r   r   Zfunding_sumr   r   r   r   r   r   r   ZsuperordinateProjectr   r   rf   r   rL   r   r   rJ   r%   r   r   r*   r   r#   r#   r   r$   rq   A  s:   
	rq   c                   @   s   e Zd ZdZejedejdZej	dddZ
ejddddd	Zejddddd	Zejd
dddd	Zdd Zdd ZG dd dZdS )ProjectFilez: class needed to allow multiple file upload in class GroupN)r   r   r   zimage/video)rl   rm   r   T)r   r   r   r   r   c                 C   s   | j jS r   )r   r6   r!   r#   r#   r$   r%     s    zProjectFile.__str__c                 C   s   t j| jj\}}|S r   )ospathsplitextr   r6   )r"   r6   	extensionr#   r#   r$   get_extension  s    zProjectFile.get_extensionc                   @   s   e Zd ZdZdZdS )zProjectFile.MetazProject image/videozProject images/videosN)r&   r'   r(   rm   r)   r#   r#   r#   r$   r*     s   r*   )r&   r'   r(   r   r   r   rq   r   r   r   r   r+   	copyrightr.   r-   r   r%   r   r*   r#   r#   r#   r$   r   ~  s   r   c                   @   s  e Zd ZdZejdddZejddZejddddd	Z	ej
dd
dZejddddZejddddZejddddZej
dddZej
dddZejeddZejeddZejddddZejedddZejedddZdd Zdd Zd d! Z G d"d# d#Z!d$S )%Open_Thesis)Model representing a single thesis entry.zEdit of the postT)auto_nowr   rd   r   Enter thesis abstractr]   zShown on web page?rc   uploads/thesis/img/rn   ra   r   zuploads/open_thesis/pdf/FzTheoretical work?zExperimental work?Zopenthesis_pub_typer   Zopenthesis_supervisorrq   Zopenthesis_projectrr   Zopenthesis_groupZopenthesis_publicationc                 C   s   | j S r   )r.   r!   r#   r#   r$   r%     s    zOpen_Thesis.__str__c                 C   s   | j S r   rx   r!   r#   r#   r$   ry     s    zOpen_Thesis.get_idc                 C   s   t dt| jgdS )rz   zopen_thesis-detailr|   r~   r!   r#   r#   r$   r     s    zOpen_Thesis.get_absolute_urlc                   @   s   e Zd ZddgZdZdS )zOpen_Thesis.Metaz-theoryz
-edit_datezOpen ThesisNr   r#   r#   r#   r$   r*     s   r*   N)"r&   r'   r(   r   r   r   Z	edit_dater-   r.   r   r3   publicr   r   r+   r   r   r   ZtheoryZexperimentalr   r   Zpublication_typer   
supervisorr   r   r   rL   r   r%   ry   r   r*   r#   r#   r#   r$   r     s&   r   c                   @   s  e Zd ZdZejddZdddddgZejd	d
eddZ	ej
ddZej
dddddZejedddZejdddddZejeddZejdddddZejededdd Zejd!ddd"Zejd#ddd"Zejd$ddd"Zejdd%d&d'Zejd(ddd)Zejd*ddd)Z ejdd+ddd,Z!ejdd-d.Z"ejdd/d.Z#ej
d0ddd1Z$ejd2d3ddZ%eje&d4ddZ'd5d6 Z(d7d8 Z)d9d: Z*G d;d< d<Z+dS )=Thesisr   Tr   )rq   rq   )Bachelorr   )zMaster,ZMaster)Diplomr   )PhDr   r\   r   zThesis  type)r   r   r`   rm   r   rd   r   r   r]   Zthesis_authorrr   zAuthor (not chair related)ra   z]Please enter the full name of the author if the author is and was not a member of this chair.)rm   r   r   r   Zthesis_supervisorr   r   zSupervisor (not chair related))r   rm   r   r   Zthesis_function_cunibertiNzStatus in committee)rg   r   r   rm   r   r   r   zDefense dateFzPromotion regulations 03/2018)r   r   r   r   rn   zuploads/thesis/pdf/z/if no, not shown in thesises but at member siterp   u   Fakultät Maschinenwesen)r   r   r   i  r   rq   Zthesis_projectZthesis_groupc                 C   s   t | jd | j S rt   )r   def_dater.   r!   r#   r#   r$   r%     s    zThesis.__str__c                 C   s   | j S r   rx   r!   r#   r#   r$   ry     s    zThesis.get_idc                 C   s   t dt| jgdS )rz   zthesis-detailr|   r~   r!   r#   r#   r$   r     s    zThesis.get_absolute_urlc                   @   s   e Zd ZdgZdZdS )zThesis.Metaz-start_dateZThesesNr   r#   r#   r#   r$   r*     s   r*   ),r&   r'   r(   r   r   r   Zslubr   r+   r   r-   r.   r   r   r   Z
author_newZauthor_manualr   Zsupervisor_manualr   r   r   Zfunction_cunibertir   r   r   r   r3   Zstatus_presentationr   r   r   r   r   ZfacultyZ
universityZrigorosum_notesr   r   r   r%   ry   r   r*   r#   r#   r#   r$   r     s6   r   c                 C   s6   t | }tjj|d}| }|r2|d t| }|S rI   )r   PatentrM   rN   rO   r   r   r#   r#   r$   create_slug_patents  s    r  c                       sP  e Zd ZdZejddddZejddZejddZej	ddd	Z
ejd
ddZejd
dddZejdddddZejdddddZejd
ddZejd
ddZejedddZejedddZejddddZejddddZej	dddddZejddddZejedddZejd ddd!d"Z d#d$ Z!d%d& Z"d'd( Z# fd)d*Z$  Z%S )+r  r   ZDPMATzLink to patent family)r   r   r   Frb   rc   r   r   ri   r   zEnter patent abstractr]   re   Zpatent_authorZInventor)rg   rm   zPatent ownerZpatent_owner)rm   rg   zuploads/patent/img/rn   uploads/patent/pdf/ro   rp   rq   Zpatent_projectrr   Zpatent_groupr   z!Part of URL where patent is shownr   c                 C   s   | j S r   )title_germanr!   r#   r#   r$   r%     s    zPatent.__str__c                 C   s   | j S r   rx   r!   r#   r#   r$   ry   	  s    zPatent.get_idc                 C   s   t dd| jidS )rz   zpatent-detailrJ   r   r   r!   r#   r#   r$   r     s    zPatent.get_absolute_urlc                    s\   | j  r$| j  }t|d j}n| jr6t| j}n
t| j}t|| j| _t	 j
||S )Nr   )patentchild_patentallr   numbertitle_englishr  r  r    rJ   r   r   )r"   r}   r   Z
patent_subr   r   r#   r$   r     s    


zPatent.save)&r&   r'   r(   r   r   r   Z
url_familyZgoogle_patentsZorbitr3   r   r-   r  r  Zabstract_germanZabstract_englishrw   Zapplication_fieldsr   r   Zinventorr   ownerr   r   r   r   r   r   r   r   r   rJ   r%   ry   r   r   r   r#   r#   r   r$   r    s.   r  c                   @   s   e Zd ZdZejeddejdZej	ddZ
ddgZejd	d
edddZejdddZejeddedZejddddZejddddZejddddZejddddZdd Zdd ZG dd dZdS )PatentChildr   r  Nr   Tr   )r   r   )passiver  r\   r   zPatent statuszOe.g. passive = Offenlegungsschrift (i.e. in proof or no active property rights))r   r   r`   rm   r   IDr   rd   Zpatentchild_countryzDate of Application)rm   r   r   zPub datez Date of issuing to active patentr  rn   c                 C   s   t | jjd t | j S rt   )r   patentr  r  r!   r#   r#   r$   r%   -  s    zPatentChild.__str__c                 C   s   | j S r   rx   r!   r#   r#   r$   ry   1  s    zPatentChild.get_idc                   @   s   e Zd ZdgZdS )zPatentChild.Metar   Nr   r#   r#   r#   r$   r*   5  s   r*   )r&   r'   r(   r   r   r   r  r   r  r   r   r   r+   r   r  r   r   countryr   Zapp_daterv   Z
issue_dater   r   r%   ry   r*   r#   r#   r#   r$   r
     s   r
  )2	django.dbr   django.db.models.deletionr   r   django.db.models.fields.relatedr   django.urlsr   uuidZinternal.modelsr   r   r	   Zhome.modelsr
   r   r   r   r   r   r   django.template.defaultfiltersr   django.httpr   Znumpynpr   r   r   rH   rR   rY   rL   r   r   r   r   r   r   r   r   rq   r   r   r   r  r  r
  r#   r#   r#   r$   <module>   s>    		C&=)*0