!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache. PHP/5.3.29 

uname -a: Linux tardis23.nocplanet.net 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024
x86_64
 

 

Safe-mode: OFF (not secure)

/opt/cloudlinux/venv/lib/python3.11/site-packages/pylint_django/tests/input/   drwxr-xr-x
Free 980.09 GB of 1859.98 GB (52.69%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     func_noerror_foreignkeys.py (2.17 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
"""
Checks that Pylint does not complain about various
methods on Django model fields.
"""
#  pylint: disable=missing-docstring,wrong-import-position
from django.db import models
from django.db.models import ForeignKey, OneToOneField


class Genre(models.Model):
    name = models.CharField(max_length=100)


class Author(models.Model):
    author_name = models.CharField(max_length=100)


class ISBN(models.Model):
    value = models.CharField(max_length=100)


class Book(models.Model):
    book_name = models.CharField(max_length=100)
    # Check this works with and without `to` keyword
    author = models.ForeignKey(to="Author", on_delete=models.CASCADE)
    isbn = models.OneToOneField(to=ISBN, on_delete=models.CASCADE)
    genre = models.ForeignKey(Genre, on_delete=models.CASCADE)

    def get_isbn(self):
        return self.isbn.value

    def get_author_name(self):
        return self.author.author_name


class Fruit(models.Model):
    fruit_name = models.CharField(max_length=20)


class Seed(models.Model):
    fruit = ForeignKey(to=Fruit, on_delete=models.CASCADE)

    def get_fruit_name(self):
        return self.fruit.fruit_name


class User(models.Model):
    username = models.CharField(max_length=32)


class UserProfile(models.Model):
    user = OneToOneField(User, on_delete=models.CASCADE)

    def get_username(self):
        return self.user.username


class Human(models.Model):
    child = ForeignKey("self", on_delete=models.SET_NULL, null=True)
    parent = ForeignKey(to="self", on_delete=models.SET_NULL, null=True)

    def get_grandchild(self):
        return self.child.child

    def get_grandparent(self):
        return self.parent.parent


class UserPreferences(models.Model):
    """
    Used for testing FK which refers to another model by
    string, not model class, see
    https://github.com/PyCQA/pylint-django/issues/35
    """

    user = ForeignKey("User", on_delete=models.CASCADE)


class UserAddress(models.Model):
    user = OneToOneField(to="User", on_delete=models.CASCADE)
    line_1 = models.CharField(max_length=100)
    line_2 = models.CharField(max_length=100)
    city = models.CharField(max_length=100)
    postal_code = models.CharField(max_length=100)

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0151 ]--