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

Re: django_bootstrap_calendar and admin backend

2016-11-01 Thread janne . j . hyvonen
I am trying to make reservation calendar for rent cabin web pages, but I am having problems with adding events to the calendar using admin. I have added admin.py file to myapp/django_bootstrap_calendar/admin.py with content: from django.contrib import admin from django_bootstrap_calendar.models

[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: Updating mixin subclassed instances

2016-11-01 Thread Vijay Khemlani
You could use a metaclass to keep track of all the classes that inherit from a given one, in a pure Python way it would be something like this class PluginMeta(type): # we use __init__ rather than __new__ here because we want # to modify attributes of the class *after* they have been #

[ANNOUNCE] Django security releases issued: 1.10.3, 1.9.11, and 1.8.16

2016-11-01 Thread Tim Graham
Today the Django team issued 1.10.3, 1.9.11, and 1.8.16 as part of our security process. These releases address two security issues, and we encourage all users to upgrade as soon as possible. Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2016/nov/01/se

Re: Why are view mixins not exported?

2016-11-01 Thread Avraham Serour
Which ones? What error are you getting? On Tue, Nov 1, 2016 at 3:05 PM, Frederik Creemers < frederikcreem...@gmail.com> wrote: > I'm trying to create my own generic view, and there are several mixins in > django.views.generic that would be very useful to me. When I try to import > them, PyCharm

Re: What is the use of parent_template filter in Django templates

2016-11-01 Thread ludovic coues
Is there any variable called parent_template in the context ? 2016-11-01 15:26 GMT+01:00 Prateek : > I am reading Django Unleashed in which the author uses the following code to > extends the template > > {% extends parent_template|default:"organizer/base_organizer.html" %} > > > What does parent_

What is the use of parent_template filter in Django templates

2016-11-01 Thread Prateek
I am reading Django Unleashed in which the author uses the following code to extends the template {% extends parent_template|default:"organizer/base_organizer.html" %} What does parent_template do ? I am unable to find this tag in the Django Documentation

Why are view mixins not exported?

2016-11-01 Thread Frederik Creemers
I'm trying to create my own generic view, and there are several mixins in django.views.generic that would be very useful to me. When I try to import them, PyCharm gives me an error, and this seems to be because these mixins are not in __all__. Are these just not considered part of Django's publi

Re: Minify HTML in Django

2016-11-01 Thread Mario Gudelj
Take a look at Django Compressor. On Tuesday, 1 November 2016, Web Architect wrote: > Hi, > > Is there an optimal and efficient way to minify HTML in Django? > > I tried using django-htmlmin but it's affecting the performance. > > Thanks. > > -- > You received this message because you are subscr

Re: Form Saving Related Issues

2016-11-01 Thread pradam programming
Hi Sir, Thank you. ! It's really help full.. Will try to do it On 1 Nov 2016 3:15 pm, "ludovic coues" wrote: > You need some kind of ajax. > Once the user have entered their email, send a request to your django > app with only that email. Django check if the email exist and send a > reply with y

Re: Form Saving Related Issues

2016-11-01 Thread ludovic coues
You need some kind of ajax. Once the user have entered their email, send a request to your django app with only that email. Django check if the email exist and send a reply with yes or no. 2016-11-01 3:30 GMT+01:00 pradam programming : > Thank you sir for the reply.. > But I am using HTML forms th