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
Documentation Improvement - Master Issue #1640
Comments
Really cool that you're doing this. The two things I look up the most are available field types and query operators. I find them easy to find via google and the table of contents so that's great! Two things I struggled to find:
I try to do |
Thanks for the feedback, I appreciate it! |
I've started a new document that discusses relationships in peewee, including addressing many of the topics you've described: http://docs.peewee-orm.com/en/latest/peewee/relationships.html |
Thanks! That looks great, I like having a dedicated section for those topics. It does seem easier to find plus I learned about |
Made some major improvements to the following sections: Hopefully these new docs help someone trying to do some advanced SQL with Peewee -- or those who are confused about table names. |
I have been bitten a few times reading the docs, trying to use features, only to realize the feature is only available in the master branch (or an updated version). It would be nice to be able to choose a specific version in read-the-docs. Or possibly make it clear which version "stable" refers to. |
The documentation on JSONField, specifically .tree() and .children() can be improved. Reading your blog post on the matter helped me achieve the desired goal indirectly (without using the methods), but examples on how to use the methods would be greatly appreciated. |
Added docs for the JSONField methods you mentioned. Thanks for the suggestion. |
i am a Chinese student.I know you try to make the document easy to read.But i real have poor english.If we can have a Document wrote by Chinese , we can use peewee more easy. Thank you for reading. |
Unfortunately that would require someone who knows Chinese and is very interested in putting a lot of effort into making a translation (and then keeping it up-to-date). English seems to be the lingua franca of open-source. Maybe google translate can help? |
Thank you for your reply, google translation is not bad. If there is a project on github that helps translate the document, someone might be involved. |
As discussed on IRC, the PostgreSQL "UPDATE FROM" feature could be really useful in documentation. |
Just migrated from 2.10.2 to 3.6.4 and it was mostly a smooth experience (struggled a bit because I'm overriding some internals, but public API hasn't changed much which is nice). I plan to use CTEs that are now supported. Maybe you could mention/explain the Other than that, I've always found peewee docs pretty nice, and although I'm sometimes yearning for more examples, SQL is such a vast landscape and you just cannot cover it all. Something else (sorry if this ain't the right forum to ask): When using CTEs, how can I: WITH q AS (...) SELECT * FROM q; I managed to run: cte = Node.select().where(...).order_by(...).cte('nodes')
query = Node.select().join(cte, on=(Node.id == cte.c.id)).with_cte(cte) But if I drop the join, then it fails ( (Why would I want this? In some cases, my postgres query planner is choosing non-optimal plan (skipping index), and using CTEs helps with that (as for some reason, as CTE the index gets used.) |
cte = Node.select().where(...).order_by(...).cte('notes')
# When using cte.select_from() it's not necessary to specify ".with_cte()"
query = cte.select_from(cte.c.id, cte.c.other_column) |
Yeah, I see it in http://docs.peewee-orm.com/en/latest/peewee/api.html?highlight=select_from#CTE.select_from, should have been more careful... thanks! |
I would love if there was some fleshed out details on http://docs.peewee-orm.com/en/latest/peewee/database.html#adding-a-new-database-driver I am trying to drag https://github.com/COUR4G3/peewee-mssql into peewee 3.0 The immediate problem is around swapping limit & offset with either SELECT TOP or |
@Nocturem -- that's beyond the scope of the documentation I plan to write, anyways. The SQL generation code is much much better in Peewee 3.0 -- in fact that was the prime reason for the rewrite -- so hopefully you can find a way to make it work. After all, the SQL generation code can be read in its entirety in a single sitting, and won't be of much interest to the average user of Peewee...hence, no docs. |
Would probably be beneficial to remove the wildcard imports
in the documentation, just to make it easier to understand what parts come from where. |
This link from the 3.5.2 Changelog doesn't work --> |
Erm...it seems working for me? 89f563d |
@coleifer I run a service called PyUp on some of my repo's that lets me know one of project requirements gets updated. It seems they mis-copied the link, dropping the hash mark out of it. See here --> https://pyup.io/changelogs/peewee/#3.5.2
So everything is fine on your end. Sorry for the false alarm. |
I would appreciate a deeper API docmentation of the design and structure of peewee. |
The quickstart doesn't mention the automagic class => table name mapping. Maybe this could be added to the info box, which currently reads:
|
If it's documented, then it might be considered a public/stable API and people would then be entitled to the same expectations of stability (presumably) they would from the currently-documented APIs. |
Class naming / table names note added here: c8b7422 I think one should be cautious about putting too much information in the quickstart, since it's intended as the briefest of introductions...but in this case I think it's probably worth explaining. |
Another thing missing in the 3.x changes doc: Renaming of
|
More 3.x changes: the renaming of |
More 3.x changes: |
I just spent far too long trying to figure out where |
I have one very small suggestion. Explicitly state all imports in documentation. I have to recover imports by greping names in source code to make examples work. |
I'm pretty happy with the state of things, going to close and will address subsequent improvements as they arise. |
The purpose of this issue is to collect suggestions for how the documentation might be improved.
Some of the things I'm wondering:
The text was updated successfully, but these errors were encountered: