This repository has been archived by the owner on Nov 25, 2017. It is now read-only.
Chapter03 #12
Merged
Merged
Chapter03 #12
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
4c493d6
Update example urls.py to match the one created by django-admin.py
mpdaugherty 81ec74a
update example 2
mpdaugherty eb790a4
Continuing to update example to match new version of django-admin.py
mpdaugherty 1e3d147
Update the import to match the example.
mpdaugherty 18636ed
Update the example to be consistent.
mpdaugherty 3dfa18e
Update python 2.4 to 2.7
mpdaugherty 679db00
Update settings.py location and do not reference DATABASE_NAME, which…
mpdaugherty 07018b5
rewrap paragraph
mpdaugherty bdc74e6
updating urls.py example again.
mpdaugherty 9ccd762
web is not a proper noun
mpdaugherty 3ac9120
The default urlconf generated by django-admin includes the url() func…
mpdaugherty 6f66efa
Update another urlconf example.
mpdaugherty fb49713
Another urlconf
mpdaugherty d84988f
updated more urlconf examples; made note to cover url() optional argu…
mpdaugherty 4cb5190
Use active, not passive voice.
mpdaugherty c5762a2
pluralize function
mpdaugherty 115b209
Fix RST note syntax.
mpdaugherty dc4aee4
Since we are using the url function, we are not just adding a "python…
mpdaugherty 4969ea7
This admonition makes more sense after we have written the view.
mpdaugherty ca0f84b
Merge branch 'master' into chapter03
mpdaugherty eb3bf62
Update Django 1.5 note to include details from https://docs.djangopro…
mpdaugherty File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This note is a distraction; it's not needed here.
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.
In fact, I'd probably just not use raw strings at all. Backslashes rarely appear in URLs (and certainly not in well-formed ones) and so the distinction's just extra noise and confusion for new users.
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.
I agree that this note is a distraction from the point of the chapter.
On the other hand, I do think our examples should use raw strings, because that's what
startproject
puts intourls.py
by default. Therefore, I feel that the question would naturally occur to new users if they look at our examples vs. their urlconf and think "Why do these strings start with 'r' and the ones in the book don't?"What do you think about using raw strings, but leaving out the explanation? Or, we could change this inline explanation to be something short like "The
r
indicates a raw string instead of a normal string. To find out why you would use one instead of the other, read the note at the end of this chapter." and then put the longer explanation at the end of the chapter.