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

added __unicode()__ support. #147

Closed
wants to merge 3 commits into from

Conversation

abdelouahabb
Copy link
Contributor

Some additions.

This is to be used with non-english languages.
A beginners should know why he writes this weird digits and not words :D
and sorry for my bad english, i just hope you add something like that ;)
Simple example....
@@ -142,6 +142,8 @@ What about `def publish(self):`? It is exactly our `publish` method we were talk

Methods very often `return` something. There is an example of that in the `__str__` method. In this scenario, when we call `__str__()` we will get a text (**string**) with a Post title.

If you are using `Python 2.7`, and you want to use a non-ascii characters ( `é` character for example ) you have to replace `__str__()` with `__unicode()__`, but if you are using `Python 3.x` you just keep the `__str()__`.
Copy link
Member

Choose a reason for hiding this comment

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

We're using only Python 3.x in this tutorial, so this note is irrelevant in my opinion.

@olasitarska
Copy link
Member

Hi, thank you for the contributions! ❤️ I added some suggestions. Let me know what do you think.

@abdelouahabb
Copy link
Contributor Author

everything is ok 💃 sorry for my bad english :P me too i am learning Django (i come from Tornado), so i used your tutorial, and i wanted to give some ideas since me too i am a beginner 👍
thank you again :)

@olasitarska
Copy link
Member

I merged one of the commits :) Thanks for the contribution! <3

@olasitarska olasitarska closed this Nov 5, 2014
@abdelouahabb
Copy link
Contributor Author

ah, thank you ^_^
will be an advanced one? (serving static files with django problem for example)

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