Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#25957 closed Uncategorized (invalid)

how to access SQLAlchemy to Django Model ?

Reported by: Ramin Farajpour Cami Owned by: Ramin Farajpour Cami
Component: Uncategorized Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

A basic Django model looks something like this:

class Person(models.Model):
       first_name = models.CharField(max_length=30)
       last_name = models.CharField(max_length=30)

The equivalent SQLAlchemy model with declarative base looks like this:

from sqlalchemy import Column, Integer, String
class Person(Base):
    __tablename__ = 'persons'
    id = Column(Integer, primary_key=True)
    first_name = Column(String(30))
    last_name = Column(String(30))

Change History (2)

comment:1 by Tim Graham, 9 years ago

Resolution: invalid
Status: newclosed

in reply to:  1 comment:2 by Ramin Farajpour Cami, 9 years ago

Replying to timgraham:

Please see TicketClosingReasons/UseSupportChannels.

i need this, how? oppssss

Note: See TracTickets for help on using tickets.
Back to Top