Services Blog Français

Using rst for documentation on both GitHub and Sphinx/RTFD: code-block tip

| by jpic | python documentation service
Good documentation should be readable from source, and usable to generate fancy HTML. That’s why RST is so commonly used: readable as text source, usable to generate HTML and even PDF GitHub knows how to render it, Sphinx and ReadTheDocs know how to render it. Good documentation should often show code. This article demonstrates an inconsistency between RTFD and GitHub rendering, and how to fix it. As far as sphinx is concerned, the default highlight language for code blocks is Python. Read More

Django development: possible change of the .save() implementation

| by jpic | django-developers django
An interesting topic by Anssi Kääriäinen flew by django-developers mailing list about ticket #16649: “Models.save() refactoring: check updated rows to determine action”. The ticket mentions a 50% performance optimization. Here’s an explanation by akaariai (core developer): A bit more information about what the approach suggested is about. Assume you load a model from DB, change some fields and save it. We currently do: SELECT - load from DB [change fields]; save() In save: SELECT - assert that the PK exists in the DB if yes: UPDATE else: INSERT The second select above is usually redundant. Read More
Previous Page 28 of 32 Next Page

They trust us

Contact

logo