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

solution with fixes ahead #866

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

solution with fixes ahead #866

wants to merge 4 commits into from

Conversation

dxrrkwm
Copy link

@dxrrkwm dxrrkwm commented Nov 22, 2024

No description provided.

@dxrrkwm
Copy link
Author

dxrrkwm commented Nov 22, 2024

image
image
image

taxi/views.py Outdated
Comment on lines 57 to 88
class CarCreateView(LoginRequiredMixin, generic.CreateView):
model = Car
fields = "__all__"
success_url = "/cars/"


class CarUpdateView(LoginRequiredMixin, generic.UpdateView):
model = Car
fields = "__all__"
success_url = "/cars/"


class CarDeleteView(LoginRequiredMixin, generic.DeleteView):
model = Car
success_url = "/cars/"


class ManufacturerCreateView(LoginRequiredMixin, generic.CreateView):
model = Manufacturer
fields = "__all__"
success_url = "/manufacturers/"


class ManufacturerUpdateView(LoginRequiredMixin, generic.UpdateView):
model = Manufacturer
fields = "__all__"
success_url = "/manufacturers/"


class ManufacturerDeleteView(LoginRequiredMixin, generic.DeleteView):
model = Manufacturer
success_url = "/manufacturers/"

Choose a reason for hiding this comment

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

Use reverse_lazy() for success_url

{{ form|crispy }}
<input type="submit" value="submit">
</form>
{% endblock %}

Choose a reason for hiding this comment

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

Add blank line

{{ form|crispy }}
<input type="submit" value="Accept">
</form>
{% endblock %}

Choose a reason for hiding this comment

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

Blank line

@dxrrkwm dxrrkwm requested a review from AnyoneClown November 25, 2024 17:24
Copy link

@AnyoneClown AnyoneClown left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants