@ponyorm

Страница 25 из 75
Romet
23.03.2017
09:27:30
Is there a repo for the website or should I just write up suggestions somewhere

Also, by any chance are any of you going to React London next week?

Luckydonald
23.03.2017
09:28:27
Probably you can even just create Pull requests there

Google
Alexey
23.03.2017
09:29:05
I think there is https://github.com/ponyorm/pony-doc
that's docs.ponyorm.com, not the site

Luckydonald
23.03.2017
09:30:18
Oh, sorry, I thought you meant that.

Alexey
23.03.2017
09:31:59
Is there a repo for the website or should I just write up suggestions somewhere
we don't have public repo for the site at this moment, the best way is to write suggestions here, I think

Romet
23.03.2017
09:32:45
fair enough, I'll have another look at it after work then

Alexey
23.03.2017
09:33:31
Also, by any chance are any of you going to React London next week?
we don't plan London next week, but the next 5 month I will be in the US, so if we can meet there it would be great ?

Romet
23.03.2017
09:34:26
Haha, I don't think there's much of a chance there

We use Django & React at work so my company's sending me to React London. Figured it would be cool to meet up with any Pony users, had there been any

Alexey
23.03.2017
09:35:55
Romet
23.03.2017
09:37:08
Possibly, although I think the reaction I'd get to that suggestion is "we could just write the models.."

Romet
23.03.2017
09:37:44
I'll definitely bring it up once you do though

Alexey
23.03.2017
09:38:19
I'll definitely bring it up once you do though
thanks! any form of feedback if greately appreciated

Luckydonald
23.03.2017
21:44:22
Sorry, but pony 0.7.1 requires Python of one of the following versions: 2.7, 3.3-3.6. You have version 3.7.0a0 https://travis-ci.org/luckydonald/pbft/jobs/214432324

Google
Alexander
23.03.2017
21:46:32
I'll fix it tomorrow in dev version on GitHub

ABIOLA SYLVESTER
30.03.2017
15:39:21
I have not started ponyorm yet but syntax looks like my beloved LINQ in MS EntityFramework

So I am dumping my learning SQLALCHEMY for this sure

A
30.03.2017
15:40:42
I hope Pony gets more exposure

Popular = more tutorials and great learning resources

ABIOLA SYLVESTER
30.03.2017
15:41:44
A
30.03.2017
15:43:31
I mean if Pony ORM is known to poeple as much as SQLAlchemy we can have books, videos and courses to make learning easier for new comers

ABIOLA SYLVESTER
30.03.2017
15:43:41
Okay

Great

Glad to hear

stsouko
30.03.2017
18:31:43
Hello! I use postgres schemas. _table_ = (schema, 'molecule') and then I run generate_mapping(create_tables=True) on existing db i receive: DBSchemaError: Table "db_data"."molecule" cannot be created, because table "molecule" (with a different letter case) already exists in the database. Try to delete "molecule" table first. but on sqlite db this works fine

I remember this works also on postgres without schemas

Micaiah
31.03.2017
01:48:28
What would be the best way to ask a Database object for all of its models?

Oh, I didn't know there was an entities attribute.

Is there a parent class for generic ORM errors?

PonyORM errors*

Alexey
31.03.2017
02:32:29
Is there a parent class for generic ORM errors?
Yep: class OrmError(Exception): pass

Micaiah
31.03.2017
02:32:41
Thanks!

Where can I import that from

Angel
31.03.2017
02:32:59
gmail.com

Google
Alexey
31.03.2017
02:34:12
from pony.orm.core import OrmError

Micaiah
31.03.2017
02:34:58
Perfect, thanks

Luckydonald
31.03.2017
06:45:31
gmail.com
Best answer :D I like your humor

Angel
31.03.2017
18:04:07
jajajajajajaja

Richie
01.04.2017
02:36:00
Hi everyone]

I just found this ORM

and want to learn more

I know few about python code, and not with database such as SQL,oracle, etc

so basically I know only python code

Hello

BEast
01.04.2017
13:15:29
Hi. So, what's your question?

Richie
01.04.2017
13:39:32
I am wondering if there is a migration tools for pony yet

Alexander
01.04.2017
13:47:36
The migration tool is unreleased yet. At this moment we are trying to using it and discover some bugs. We want to fix the most critical bugs before the migration tool is released, because bugs in migration tool can lead to database corruption. I hope we will release it soon.

Richie
01.04.2017
13:49:26
Okay..

Is it convenient to use this ORM within django?

Alexander
01.04.2017
13:54:25
Many components in Django (for example, admin UI) assume that you use Django-ORM and will not work otherwise

Richie
01.04.2017
13:55:02
Ouu...

I have slow internet connection

So I haven't try the online editor that Pony ORM had

Does it works like sqlyog or something?

Google
Richie
01.04.2017
13:57:45
Is there any offline one?

Alexander
01.04.2017
14:25:01
I have no experience with SQLyog, but from the first look it presents schema in terms of tables, while Pony editor present it in terms of entities. It's online-only

Alexey
01.04.2017
14:46:08
Is there any offline one?
You can work with the editor offline. You need the connection only when you open the diagram and when you save it.

Luckydonald
01.04.2017
16:59:03
Yeah we are waiting for a selfhostable version too

Would be great

Micaiah
01.04.2017
18:20:16
Pony is rewritting how it names rows in tables for the next version correct?

Alexander
01.04.2017
18:20:28
Yes

Micaiah
01.04.2017
18:21:17
Will the rewrite allow for class A(db.Entity): name = Required(str) class B(A): name = Required(str) other = Optional(int)

Oops I wrote the example wrong

Okay fixed it

Alexander
01.04.2017
18:24:26
No, in the next release we will just changes names of many-to-many tables and the corresponding indexes/foreign keys Why you want to define schema like in your example?

Micaiah
01.04.2017
18:26:42
I want to have a generic Entity subclass with helper methods, where unrelated tables might have similar fields

Alexander
01.04.2017
18:31:32
If B inherits an attribute from A, it doesn't need to redefine it. If it is actually an attribute with a different meaning, maybe you can give it slightly different name

Micaiah
01.04.2017
18:31:55
Okay thanks, I'll do that

Alexander
01.04.2017
18:32:27
Be aware, that currently if one entity inherits from another, they share the same table

Micaiah
01.04.2017
18:32:47
Yeah I think that the helper entity just won't have any columns of its own

Actually I think I could get away with a Mixin

which doesn't actually inherit from Entity

Romet
01.04.2017
18:37:40
If one entity inherits another and the table is shared, can the child's columns even be non-nullable?

Alexander
01.04.2017
18:39:27
no, it may be required, in a sense that Pony will check in Python, that the object instances with that column have a non-empty value in it. But in the table the column will be declared as nullable

Google
Micaiah
01.04.2017
18:41:52
What would be the best way to write code that takes an entity and produces an WTForm

Alexander
01.04.2017
18:43:35
Currently we don't have a ready solution, but if you want some generic code, you can analyze obj._attrs_ or entity_class._attrs_ in order to see attribute definitions

Micaiah
01.04.2017
18:45:01
My current plan was the use _attrs_, thanks

Where can I find all of the possible data types for columns, so I can map them to form types?

Alexander
01.04.2017
18:50:53
Each data type has corresponding database converter class in dbapiprovider.py (the converter classes are inherited and redefined in specific providers such as dbproviders/sqlite.py)

Micaiah
01.04.2017
19:06:11
Is there anything like sandman2 for PonyORM?

Alexander
01.04.2017
19:06:48
I'm no aware of that

I think no

Micaiah
01.04.2017
19:07:00
https://github.com/jeffknupp/sandman2





Romet
01.04.2017
21:58:51
90% of the time you don't want a directly generated REST API

that being said, something like DRF for pony would be neat

Micaiah
01.04.2017
23:19:20
90% of the time you don't want a directly generated REST API
I agree, this is mostly just an experiment

How can you access the length attribute of a string entity?

Страница 25 из 75