모듈 목록

apps.core

apps.core.models module

class apps.core.models.DeletableModel(*args, **kwargs)[소스]

기반 클래스: django.db.models.base.Model

삭제 여부 필드(boolean)를 포함하는 추상 모델

class Meta[소스]

기반 클래스: object

abstract = False
delete(using=None, keep_parents=True)[소스]
deleted_at

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_deleted

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects
class apps.core.models.DeletedManager(*args, **kwargs)[소스]

기반 클래스: django.db.models.manager.Manager

get_queryset()[소스]

Return a new QuerySet object. Subclasses can override this method to customize the behavior of the Manager.

class apps.core.models.TimeStampModel(*args, **kwargs)[소스]

기반 클래스: django.db.models.base.Model

생성, 수정 날짜 필드를 포함하는 추상 모델

class Meta[소스]

기반 클래스: object

abstract = False
created_at

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)
get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)
updated_at

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

apps.core.exceptions module

exception apps.core.exceptions.BaseException(detail=None, code=None)[소스]

기반 클래스: apps.core.exceptions.DetailDictMixin, rest_framework.exceptions.APIException

class apps.core.exceptions.DetailDictMixin(detail=None, code=None)[소스]

기반 클래스: object

exception apps.core.exceptions.UserAlreadyBookmarked(detail=None, code=None)[소스]

기반 클래스: apps.core.exceptions.BaseException

default_code = 'already_bookmarked'
default_detail = '이미 북마크 되어있습니다.'
status_code = 406
apps.core.exceptions.custom_exception_handler(exc, context)[소스]

apps.core.permissions module

class apps.core.permissions.IsOwner[소스]

기반 클래스: rest_framework.permissions.BasePermission

로그인한 유저는 읽기 가능함 객체를 생성한 특정 유저만 수정, 삭제 가능함

has_object_permission(request, view, obj)[소스]

Return True if permission is granted, False otherwise.

has_permission(request, view)[소스]

Return True if permission is granted, False otherwise.

apps.user

apps.user.models module

class apps.user.models.User(*args, **kwargs)[소스]

기반 클래스: apps.core.models.TimeStampModel, django.contrib.auth.base_user.AbstractBaseUser, django.contrib.auth.models.PermissionsMixin

username, email, profile_image

AbstractBaseUser
fields:

password, last_login, is_active

PermissionsMixin
fields:

is_superuser, groups, user_permissions

exception DoesNotExist

기반 클래스: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

기반 클래스: django.core.exceptions.MultipleObjectsReturned

REQUIRED_FIELDS = ['username']
USERNAME_FIELD = 'email'
bookmark_user

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

created_at

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

email

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)
get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)
groups

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_staff

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_superuser

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

last_login

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.contrib.auth.models.UserManager object>
password

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

profile_image

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

profile_image_tag()[소스]
profile_image_tag_large()[소스]
review_user

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

save(*args, **kwargs)[소스]

Save the current instance. Override this in a subclass if you want to control the saving process.

The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

updated_at

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

user_permissions

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

userkeyword

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

username

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class apps.user.models.UserKeyword(user_id, keyword)[소스]

기반 클래스: django.db.models.base.Model

exception DoesNotExist

기반 클래스: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

기반 클래스: django.core.exceptions.MultipleObjectsReturned

keyword

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
user_id

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

user_id_id

apps.user.serializers module

class apps.user.serializers.TokenBlacklistResponseSerializer(*args, **kwargs)[소스]

기반 클래스: rest_framework.serializers.Serializer

create(validated_data)[소스]
update(instance, validated_data)[소스]
class apps.user.serializers.TokenObtainPairResponseSerializer(*args, **kwargs)[소스]

기반 클래스: rest_framework.serializers.Serializer

create(validated_data)[소스]
update(instance, validated_data)[소스]
class apps.user.serializers.TokenRefreshResponseSerializer(*args, **kwargs)[소스]

기반 클래스: rest_framework.serializers.Serializer

create(validated_data)[소스]
update(instance, validated_data)[소스]
class apps.user.serializers.TokenVerifyResponseSerializer(*args, **kwargs)[소스]

기반 클래스: rest_framework.serializers.Serializer

create(validated_data)[소스]
update(instance, validated_data)[소스]
class apps.user.serializers.UserCheckAvailableSerializer(*args, **kwargs)[소스]

기반 클래스: rest_framework.serializers.ModelSerializer

유저 유효성 체크

아이디, 닉네임이 가입가능한 값인지 유효성을 체크합니다.

class Meta[소스]

기반 클래스: object

extra_kwargs = {'email': {'required': False, 'write_only': True}, 'username': {'required': False, 'write_only': True}}
fields = ['username', 'email']
model

:py:class:`django.contrib.auth.models.User`의 별칭

class apps.user.serializers.UserImageUploadSerializer(*args, **kwargs)[소스]

기반 클래스: rest_framework.serializers.ModelSerializer

유저 프로필 이미지 업로드

class Meta[소스]

기반 클래스: object

fields = ['username', 'profile_image']
model

:py:class:`django.contrib.auth.models.User`의 별칭

read_only_fields = ('username',)
class apps.user.serializers.UserRegisterSerializer(*args, **kwargs)[소스]

기반 클래스: rest_framework.serializers.ModelSerializer

유저 추가

class Meta[소스]

기반 클래스: object

fields = ['username', 'email', 'password']
model

:py:class:`django.contrib.auth.models.User`의 별칭

create(validated_data)[소스]

We have a bit of extra checking around this in order to provide descriptive messages when something goes wrong, but this method is essentially just:

return ExampleModel.objects.create(**validated_data)

If there are many to many fields present on the instance then they cannot be set until the model is instantiated, in which case the implementation is like so:

example_relationship = validated_data.pop(‘example_relationship’) instance = ExampleModel.objects.create(**validated_data) instance.example_relationship = example_relationship return instance

The default implementation also does not handle nested relationships. If you want to support writable nested relationships you’ll need to write an explicit .create() method.

validate_password(value)[소스]
class apps.user.serializers.UserResetPasswordSerializer(*args, **kwargs)[소스]

기반 클래스: rest_framework.serializers.Serializer

유저 비밀번호 변경

validate(data)[소스]
class apps.user.serializers.UserSerializer(*args, **kwargs)[소스]

기반 클래스: rest_framework.serializers.ModelSerializer

유저 정보 조회, 수정

class Meta[소스]

기반 클래스: object

extra_kwargs = {'email': {'required': False}, 'username': {'required': False}}
fields = ['username', 'email', 'profile_image']
model

:py:class:`django.contrib.auth.models.User`의 별칭

read_only_fields = ('profile_image',)

apps.user.views module

apps.park

apps.park.models module

class apps.park.models.Equipment(id, equipment_name, equipment_type)[소스]

기반 클래스: django.db.models.base.Model

exception DoesNotExist

기반 클래스: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

기반 클래스: django.core.exceptions.MultipleObjectsReturned

equipment_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

equipment_type

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
park

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class apps.park.models.Park(id, park_name, gu_id, full_address, si_address, gu_address, dong_address, latitude, longitude, park_image)[소스]

기반 클래스: django.db.models.base.Model

exception DoesNotExist

기반 클래스: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

기반 클래스: django.core.exceptions.MultipleObjectsReturned

property average_rating: float
bookmark_park

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

property count_reviews
dong_address

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

full_address

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

gu_address

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

gu_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

latitude

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

longitude

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

nearby_parks

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>
park_equipments

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

park_image

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

park_name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

review_park

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

si_address

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class apps.park.models.ParkEquipment(id, park_id, equipment_id, quantity)[소스]

기반 클래스: django.db.models.base.Model

exception DoesNotExist

기반 클래스: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

기반 클래스: django.core.exceptions.MultipleObjectsReturned

equipment_id

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

equipment_id_id
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
park_id

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

park_id_id
quantity

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class apps.park.models.Review(id, created_at, updated_at, is_deleted, deleted_at, user_id, park_id, content, score)[소스]

기반 클래스: apps.core.models.TimeStampModel, apps.core.models.DeletableModel

exception DoesNotExist

기반 클래스: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

기반 클래스: django.core.exceptions.MultipleObjectsReturned

content

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

created_at

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

deleted_at

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)
get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

is_deleted

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

park_id

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

park_id_id
score

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

updated_at

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

user_id

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

user_id_id

apps.park.serializers module

class apps.park.serializers.EquipmentSerializer(*args, **kwargs)[소스]

기반 클래스: rest_framework.serializers.ModelSerializer

공원 시설

class Meta[소스]

기반 클래스: object

fields = ['equipment_name', 'equipment_type']
model

:py:class:`apps.park.models.Equipment`의 별칭

class apps.park.serializers.ParkEquipmentSerializer(*args, **kwargs)[소스]

기반 클래스: rest_framework.serializers.ModelSerializer

class Meta[소스]

기반 클래스: object

fields = ['equipment_name', 'quantity']
model

:py:class:`apps.park.models.ParkEquipment`의 별칭

class apps.park.serializers.ParkNearbyListSerializer(*args, **kwargs)[소스]

기반 클래스: rest_framework.serializers.ModelSerializer

공원 정보

class Meta[소스]

기반 클래스: object

fields = ['id', 'park_name', 'parks']
model

:py:class:`apps.park.models.Park`의 별칭

class apps.park.serializers.ParkReviewSerializer(*args, **kwargs)[소스]

기반 클래스: rest_framework.serializers.ModelSerializer

공원 리뷰 조회, 생성, 수정

class Meta[소스]

기반 클래스: object

extra_kwargs = {}
fields = ['id', 'username', 'park_id', 'parkname', 'score', 'content', 'created_at']
model

:py:class:`apps.park.models.Review`의 별칭

read_only_fields = ('id',)
class apps.park.serializers.ParkSerializer(*args, **kwargs)[소스]

기반 클래스: rest_framework.serializers.ModelSerializer

공원 정보

class Meta[소스]

기반 클래스: object

fields = ['id', 'park_name', 'gu_id', 'full_address', 'si_address', 'gu_address', 'dong_address', 'latitude', 'longitude', 'park_image', 'total_equipments', 'equipments', 'total_reviews', 'avg_score']
model

:py:class:`apps.park.models.Park`의 별칭

get_avg_score(obj) float[소스]
get_total_equipments(obj) int[소스]
get_total_reviews(obj) float[소스]

apps.park.views module

apps.bookmark

apps.bookmark.models module

class apps.bookmark.models.Bookmark(id, created_at, updated_at, user_id, park_id)[소스]

기반 클래스: apps.core.models.TimeStampModel

exception DoesNotExist

기반 클래스: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

기반 클래스: django.core.exceptions.MultipleObjectsReturned

created_at

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)
get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>
park_id

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

park_id_id
updated_at

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

user_id

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

user_id_id

apps.bookmark.serializers module

apps.bookmark.views module