test-driven-django-development | repository contains materials for a San Diego Python
kandi X-RAY | test-driven-django-development Summary
kandi X-RAY | test-driven-django-development Summary
This repository contains materials for a San Diego Python workshop on learning Django with test inspired development
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Returns the success URL
- Returns the absolute URL for this entry
test-driven-django-development Key Features
test-driven-django-development Examples and Code Snippets
Community Discussions
Trending Discussions on test-driven-django-development
QUESTION
Django = 2.0
I want this app to add to my project - https://github.com/pythonsd/test-driven-django-development/tree/master/myblog
It works for me, but I don't need comments.
And I can't figure out how to delete these comments. In HTML I know how to remove it, but I want to remove comments from models and views, I want to have clean code in my project.
https://github.com/pythonsd/test-driven-django-development/blob/master/myblog/blog/models.py - I am to delete class Comment(models.Model)
, right? I think yes.
https://github.com/pythonsd/test-driven-django-development/blob/master/myblog/blog/views.py - But what I need to remove from the file, if I do not have the comments in my blog-app
?
Thank you very much.
...ANSWER
Answered 2018-Apr-22 at 11:24class EntryDetail(DetailView):
model = Entry
template_name = 'test/blog-detail.html'
def get_success_url(self):
return self.get_object().get_absolute_url()
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install test-driven-django-development
You can use test-driven-django-development like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page