Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'py-api-views' #385

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

'py-api-views' #385

wants to merge 14 commits into from

Conversation

elenkomar
Copy link

No description provided.

cinema/urls.py Outdated
path("cinema_halls/", cinema_hall_list, name="cinema-hall-list"),
path("cinema_halls/<int:pk>/", cinema_hall_detail,
name="cinema-hall-detail"),
path("", include(router.urls)),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to use include when basepath is not provided. Use urlpatterns = [list of urls] + router.urls

def post(self, request):
serializer = GenreSerializer(data=request.data)
serializer.is_valid(raise_exception=True)
serializer.save()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is return???

Pipfile Outdated
Comment on lines 2 to 12
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]

[dev-packages]
pytest-django = "*"

[requires]
python_version = "3.11"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove from PR

pyproject.toml Outdated
Comment on lines 2 to 5
requires = [
"setuptools>=61.0.0",
]
build-backend = "setuptools.build_meta"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove from PR

@elenkomar elenkomar requested a review from vsmutok November 17, 2023 19:38
Copy link

@vsmutok vsmutok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pipfile.lock remove from PR

@elenkomar elenkomar requested a review from vsmutok November 17, 2023 19:52
.gitignore Outdated
db.sqlite3
Pipfile
pyproject.toml

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add empty line


urlpatterns = [
path("movies/", movie_list, name="movie-list"),
path("movies/<int:pk>/", movie_detail, name="movie-detail"),
*router.urls,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can do:
urlpatterns = [list of urls] + router.urls

pytest.ini Outdated
addopts = --reuse-db
django_find_project = false
pythonpath = . src

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add empty line

Copy link

@ArsenPidhoretskyi ArsenPidhoretskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants