-
Notifications
You must be signed in to change notification settings - Fork 862
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
base: master
Are you sure you want to change the base?
Conversation
taxi/views.py
Outdated
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/" |
There was a problem hiding this comment.
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
templates/taxi/car_form.html
Outdated
{{ form|crispy }} | ||
<input type="submit" value="submit"> | ||
</form> | ||
{% endblock %} |
There was a problem hiding this comment.
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 %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blank line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.