Re: [Ask for help]How to convert django models schema to json?

2016-11-01 Thread GMail
Hi! There's also an alternative to Django REST Framework - Tastypie (https://django-tastypie.readthedocs.io/en/latest/ ). You could use [Namespaced]ModelResource with Django Models. And if you're not interested in API and only want to use JSON

Re: [Ask for help]How to convert django models schema to json?

2016-11-01 Thread Asif Saifuddin
But seems like you are using sqlalchemy models. for sqlalchemy models you could try sqlalchemy-marshmellow On Wednesday, November 2, 2016 at 2:27:47 AM UTC+6, 周华 wrote: > > >- This is an example models >- class UserModel(db.Model): >__tablename__ = "user" >id = db.Column(d

Re: [Ask for help]How to convert django models schema to json?

2016-11-01 Thread Asif Saifuddin
Hi, you can try django-rest-frameworks model serializer, modelviewsets and django-json-api package for this job. thanks On Wednesday, November 2, 2016 at 2:27:47 AM UTC+6, 周华 wrote: > > >- This is an example models >- class UserModel(db.Model): >__tablename__ = "user" >i

[Ask for help]How to convert django models schema to json?

2016-11-01 Thread 周华
- This is an example models - class UserModel(db.Model): __tablename__ = "user" id = db.Column(db.Integer, primary_key=True) user_id = db.Column(db.String(255), unique=True) name = db.Column(db.String(255)) - This is a Json example which I want

Re: Ask for help

2015-11-19 Thread Proto
Can you post the migration file? It looks like one of the fields you're parsing for date doesn't like the data it's trying to parse (it's expecting a string type, but that may not be what it's getting), -- You received this message because you are subscribed to the Google Groups "Django users"

Ask for help

2015-11-19 Thread Cision Lee
*When I migrate the database, I meet some errors, and errors are following:* > Operations to perform: > Synchronize unmigrated apps: staticfiles, messages > Apply all migrations: admin, contenttypes, api, auth, sessions > Synchronizing apps without migrations: > Creating tables... > Runn

Re: [ask for help] how to solve this issue: "DatabaseError at /admin/myapp, no such column: myapp.myvar"

2011-05-21 Thread brad
It sounds like you may have created your Models, run "mange.py syncdb", then added another field to your Model. Remember, syncdb doesn't add new columns in your table when you add a new field to an existing model. If this app is still in development, you can drop the whole table corresponding

Re: [ask for help] how to solve this issue: "DatabaseError at /admin/myapp, no such column: myapp.myvar"

2011-05-21 Thread Gabriel Gunderson
On Fri, May 20, 2011 at 8:36 PM, enqing wrote: >  This weird issue hanpped when I used the django admin site. I have > set the database with sqlite3,  and creat a number of my classes in > app model.py, all others classes  can work as expectation. only a > class have this  "DatabaseError at /admin

[ask for help] how to solve this issue: "DatabaseError at /admin/myapp, no such column: myapp.myvar"

2011-05-21 Thread enqing
This weird issue hanpped when I used the django admin site. I have set the database with sqlite3, and creat a number of my classes in app model.py, all others classes can work as expectation. only a class have this "DatabaseError at /admin/myapp, no such column: myapp.myvar" error apper in web