Re: Should I use Django-Rest-Framework for performance reasons, despite not needing an externally-consumable API?

2018-10-26 Thread Andréas Kühne
s and present them in a template. >> This is not hard to cache or to setup. >> >> I think I would need to know more about your use case to understand it >> better :-) >> >> Regards, >> >> Andréas >> >> >> Den fre 26 okt. 2018 kl 03:44 skre

Re: Should I use Django-Rest-Framework for performance reasons, despite not needing an externally-consumable API?

2018-10-26 Thread Tyler Lynch
t; > > Regards > > > Eric > -- > *From:* django...@googlegroups.com < > django...@googlegroups.com > on behalf of Andréas Kühne < > andrea...@hypercode.se > > *Sent:* Friday, October 26, 2018 9:29:40 AM > *To:* django...@googlegroup

Re: Should I use Django-Rest-Framework for performance reasons, despite not needing an externally-consumable API?

2018-10-26 Thread Tyler Lynch
> template, or just cache the database calls and present them in a template. > This is not hard to cache or to setup. > > I think I would need to know more about your use case to understand it > better :-) > > Regards, > > Andréas > > > Den fre 26 okt. 2018 kl 03:44 skrev Tyl

Re: Should I use Django-Rest-Framework for performance reasons, despite not needing an externally-consumable API?

2018-10-26 Thread PASCUAL Eric
From: django-users@googlegroups.com on behalf of Andréas Kühne Sent: Friday, October 26, 2018 9:29:40 AM To: django-users@googlegroups.com Subject: Re: Should I use Django-Rest-Framework for performance reasons, despite not needing an externally-consumable API? Hi, I really don't get why

Re: Should I use Django-Rest-Framework for performance reasons, despite not needing an externally-consumable API?

2018-10-26 Thread Andréas Kühne
e case to understand it better :-) Regards, Andréas Den fre 26 okt. 2018 kl 03:44 skrev Tyler Lynch : > I have no need for an externally consumable API, but I am interested in > using Django-Rest-Framework simply for performance reasons. > > I'm led to believe that by decoupli

Should I use Django-Rest-Framework for performance reasons, despite not needing an externally-consumable API?

2018-10-25 Thread Tyler Lynch
I have no need for an externally consumable API, but I am interested in using Django-Rest-Framework simply for performance reasons. I'm led to believe that by decoupling my front and back end and then simply consuming the DRF api within views, that I can setup a better caching system? Does

Re: How to Structure Django Rest Framework API

2018-10-18 Thread Andréas Kühne
Hi, I have followed this approach when I created my current app: http://danielhnyk.cz/django-rest-framework-how-to-structure-your-app/ The only thing I have added to that is versioning. We also have a v1 on our url and in our directories as well. Regards, Andréas Den tors 18 okt. 2018 kl 13

How to Structure Django Rest Framework API

2018-10-18 Thread Ali Cheema
Hi, I am new to django, I have to develop an API using django rest framework. I am confused about directory structure of my project. Please can you suggest be best directory structure for my project which should be easy to maintain and salable as well. Thanks in advance. -- You received

Re: how to make https work in django REST framework on runserver port

2018-08-29 Thread Kasper Laudrup
Hi Rupam, On 29/08/2018 17.44, Rupam Hazra wrote: I want to do on production but how . could you elaborate me because i am new in python You shouldn't be using the development server in production. That is quite clearly stated in the documentation for good reasons. You could set up a web

Re: how to make https work in django REST framework on runserver port

2018-08-29 Thread Rupam Hazra
or nginx with uwsgi/gunicorn > > On Wednesday, August 29, 2018 at 7:16:15 AM UTC-4, Rupam Hazra wrote: >> >> >> Hi, i am working django rest service using runserver on different port on >> http but i want to use the https service. >> >> Please help. >> &g

Re: how to make https work in django REST framework on runserver port

2018-08-29 Thread Jason
for local development, why do you need https? for staging and production, you should be using apache with mod_wsgi or nginx with uwsgi/gunicorn On Wednesday, August 29, 2018 at 7:16:15 AM UTC-4, Rupam Hazra wrote: > > > Hi, i am working django rest service using runserver on diffe

how to make https work in django REST framework on runserver port

2018-08-29 Thread Rupam Hazra
Hi, i am working django rest service using runserver on different port on http but i want to use the https service. Please help. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving e

How to get and process Input for django-multiselectfield in Django rest framework

2018-07-14 Thread jagruti . mscit16
I have attched the issue related ss also weekday = MultiSelectField( choices=WEEK_DAYS_CHOICES, max_length=10, default=True) WEEK_DAYS_CHOICES = ( ('Monday', 'Monday'), ('Tuesday', 'Tuesday'), ('Wednesday', 'Wednesday'), ('Thuersday', 'Thuersday'), ('Friday', 'Friday'), ('Saturday',

How to get and process Input for django-multiselectfield in Django rest framework via form-data

2018-07-14 Thread jagruti . mscit16
WEEK_DAYS_CHOICES = ( ('Monday', 'Monday'), ('Tuesday', 'Tuesday'), ('Wednesday', 'Wednesday'), ('Thuersday', 'Thuersday'), ('Friday', 'Friday'), ('Saturday', 'Saturday'), ('Sunday', 'Sunday'), ) weekday = MultiSelectField( choices=WEEK_DAYS_CHOICES, max_length=10, default=True) -- You received

How to limit the format of django-rest-framework-api uploading(post method)

2018-04-30 Thread Majid Am
xyz/uploading-file-using-api-django-rest-framework/> that i use it code in my api I will thank you :) my stack topic : https://stackoverflow.com/questions/50095233/how-to-limit-the-format-of-django-rest-framework-api-uploadingpost-method -- You received this message because you are subs

Ann: django-rest-framework-datatables 0.2.1 released

2018-04-11 Thread izi
Hello, I'm happy to announce the availability of the version 0.2.1 of django-rest-framework-datatables: https://pypi.org/project/djangorestframework-datatables/ Django-rest-framework-datatables is a third party app that provides seamless integration between Django Rest Framework

Re: Django rest framework foreign key display details from table 1 to table 2

2018-04-05 Thread siva.gatti
did u get the solution for this if found send that to me -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to

Re: Django Rest Framework: Get Data from an external apis

2018-01-25 Thread Andy
you dont have to define any route when getting data from an external api, just use requests.get('https://api.test.com/consumers') to get your data -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Django Rest Framework: Get Data from an external apis

2018-01-25 Thread Jani Tiainen
Hi, You can't do that. Django URL configs are URLS that are routed to views withing Django and you can't define url that would access external sources. To access external sources you have to do that in your endpoint API to call remote resource, for example by using requests library. On

Django Rest Framework: Get Data from an external apis

2018-01-25 Thread tapha kebe
Hi, i'm trying to get my data from an external api (example: https:api.test.com/consumers). And i would like to know, if i have to build the extenal Api URL in my urls.py like this: url(r'^(?P[0-9]+)$/', views.get, name="get"), or you have any other good idea? Thanks -- You

Re: How to get two django rest framework to communicate with each other

2018-01-16 Thread Avraham Serour
nding, it is API connect to another API.Which allow django 1 api to >>> POST to BookAppt and django 2 api to GET the data. >>> >>> On Monday, January 15, 2018 at 1:42:59 PM UTC+9, chern...@gmail.com >>> wrote: >>>> >>>> So i have 2 djan

Re: How to get two django rest framework to communicate with each other

2018-01-15 Thread cherngyorng
ookAppt and django 2 api to GET the data. >> >> On Monday, January 15, 2018 at 1:42:59 PM UTC+9, chern...@gmail.com >> wrote: >>> >>> So i have 2 django project. Both have its seperated database and table. >>> I create the django rest framework api

Re: How to get two django rest framework to communicate with each other

2018-01-15 Thread shreekant bohra
59 PM UTC+9, chern...@gmail.com wrote: >> >> So i have 2 django project. Both have its seperated database and table. I >> create the django rest framework api for both project but i want both of >> them to communicate with each other. >> >> >> I

Re: How to get two django rest framework to communicate with each other

2018-01-15 Thread cherngyorng
gt; So i have 2 django project. Both have its seperated database and table. I > create the django rest framework api for both project but i want both of > them to communicate with each other. > > > In django 1 is about the social media and medical record app API. In > django 2 i

Re: How to get two django rest framework to communicate with each other

2018-01-15 Thread cherngyorng
> >> So i have 2 django project. Both have its seperated database and table. I >> create the django rest framework api for both project but i want both of >> them to communicate with each other. >> >> >> In django 1 is about the social media and medi

Re: How to get two django rest framework to communicate with each other

2018-01-15 Thread Mohammad Etemaddar
to a doctor. There is other way also. You can copy data from one app to another one. Or one model to another. On Monday, January 15, 2018 at 8:12:59 AM UTC+3:30, chern...@gmail.com wrote: > > So i have 2 django project. Both have its seperated database and table. I > create the dj

Re: How to get two django rest framework to communicate with each other

2018-01-15 Thread Jason
t; create the django rest framework api for both project but i want both of > them to communicate with each other. > > > In django 1 is about the social media and medical record app API. In > django 2 is a clinic app API where the it is for staff of the clinic and > collect use

How to get two django rest framework to communicate with each other

2018-01-14 Thread cherngyorng
So i have 2 django project. Both have its seperated database and table. I create the django rest framework api for both project but i want both of them to communicate with each other. In django 1 is about the social media and medical record app API. In django 2 is a clinic app API where

django rest framework display authtoken model in API view

2018-01-14 Thread cherngyorng
Is it possible to display the authtoken model in api json view with all its function ? As i am using django rest framework token authentication by djoser, there is a authtoken model created to store the token. Is it possible to view it in the api view ? Since right now i can only see

Re: Django rest framework foreign key display details from table 1 to table 2

2018-01-09 Thread Jason
What you are looking for is nested serialization. There's a section in the DRF docs on this that should provide some light. Fortunately, your serializers are almost there. -- You received this message because

Re: Django rest framework Version

2018-01-08 Thread Xavier Ordoquy
Hi, Out of curiosity, is there anything wrong with the latest version ? Regards, Xavier. > Le 9 janv. 2018 à 04:59, Rakhee Menon <menonrakhe...@gmail.com> a écrit : > > Hey!!! > Please can anyone tell whats the stable version of django rest framework to > be used for

Re: Django rest framework Version

2018-01-08 Thread Andréas Kühne
Hi, Just get the latest version of DRF (currently 3.7.7) - as long as the version of django you are running is supported by the DRF version. Regards, Andréas 2018-01-09 4:59 GMT+01:00 Rakhee Menon <menonrakhe...@gmail.com>: > Hey!!! > Please can anyone tell whats the stable versi

Django rest framework foreign key display details from table 1 to table 2

2018-01-08 Thread cherngyorng
I have 2 model, MyUser, Family. What i want to do is display users details in Family table based on the MyUser table. It is like adding friends or family in other social media and display them In my current Family table, there are these 3 field. userId , familyId and relationship

Django rest framework Version

2018-01-08 Thread Rakhee Menon
Hey!!! Please can anyone tell whats the stable version of django rest framework to be used for production. Thanks in Advance. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving e

Re: Django rest framework Best way to link and display value.

2018-01-04 Thread cherngyorng
So foreign key is fine. Thank you. I thought that maybe theres a better way than using foreign key. On Friday, January 5, 2018 at 4:38:58 PM UTC+9, Dylan Reinhold wrote: > > | But i have a feeling this is a very troublesome way to do it. > > Why do you have this feeling? Foreign key to another

Re: Django rest framework Best way to link and display value.

2018-01-04 Thread Dylan Reinhold
| But i have a feeling this is a very troublesome way to do it. Why do you have this feeling? Foreign key to another table sounds fine. If you don't think that list will change much you could do it as a choice. https://docs.djangoproject.com/en/2.0/ref/models/fields/#choices Dylan On Thu, Jan

Re: Django rest framework import data from one table to another

2018-01-04 Thread cherngyorng
This is my stackoverflow link which may be able to make it look more easier to understand: https://stackoverflow.com/questions/48109034/django-rest-framework-import-data-from-one-table-to-another On Friday, January 5, 2018 at 3:47:23 PM UTC+9, chern...@gmail.com wrote: > > I am doing a

Re: Django rest framework import data from one table to another

2018-01-04 Thread cherngyorng
This is my stackoverflow link which may be able to make it look more easier to understand On Friday, January 5, 2018 at 3:47:23 PM UTC+9, chern...@gmail.com wrote: > > I am doing a django rest framework API for ios application. And currently, > i am doing a function between user a

Re: Django rest framework viewset and its url

2018-01-04 Thread cherngyorng
: > > That link is not valid, and without seeing your views no one will be able > to help. > > Dylan > > On Thu, Jan 4, 2018 at 7:18 PM, <chern...@gmail.com > wrote: > >> For a better and more detailed question i ask, refer to here : >> https://stackoverflow.com

Django rest framework Best way to link and display value.

2018-01-04 Thread cherngyorng
I have a table called family, you can see the models.py below. My partner told me that he wanted the relationship to change to this kind 1,Father 2,Mother 3,Husband 4,Wife 5,Son 6,Daughter 7,Aunt 8,Uncle 9,Nephew 10,Niece 11,Others This is where he will sent me the id (eg:5) and i will save that

Django rest framework import data from one table to another

2018-01-04 Thread cherngyorng
I am doing a django rest framework API for ios application. And currently, i am doing a function between user and family. Let me explain my logic between these two. User= current user (an account that can be use to login) Family = current user's family member eg:father mother

Re: Django rest framework viewset and its url

2018-01-04 Thread Dylan Reinhold
That link is not valid, and without seeing your views no one will be able to help. Dylan On Thu, Jan 4, 2018 at 7:18 PM, <cherngyo...@gmail.com> wrote: > For a better and more detailed question i ask, refer to here : > https://stackoverflow.com/questions/48106733/django- >

Django rest framework viewset and its url

2018-01-04 Thread cherngyorng
For a better and more detailed question i ask, refer to here : https://stackoverflow.com/questions/48106733/django-rest-framework-viewset-and-url-mixup In my project, i have 2 model. family and schedule As i wanted to have 1 api to get all while the other is to get current user only therefore

Django rest framework filtering foreign key value and setting userId = current user

2018-01-03 Thread cherngyorng
problem is here: https://stackoverflow.com/questions/48088912/django-rest-framework-foreign-key-multiple-data Sorry for my inexperience as this is my first time creating such a huge API. Please give me guidance on how to do this. -- You received this message because you are subscribed

how to integrate django rest framework jwt and angular 4 authentication?

2017-12-19 Thread rakibul
Hi everyone. I want to build a system where user logged in using username & password.In that purpose i am used djangorestframework-jwt in token based authentication system. djangorestframework-jwt provided this *urls*url(r'^api/auth/token/', obtain_jwt_token) if i go this url it shows

Re: Django Channels alongside Django Rest Framework

2017-12-12 Thread Alexandre Verri
Hi Adam, are you using Django REST Framework? I was using it, but after introducing Django Channels the REST endpoints stopped to work. Regards, Alexandre Em sexta-feira, 3 de fevereiro de 2017 15:07:18 UTC, adam@hedgehoglab.com escreveu: > > Hi Andrew, > > Thanks f

Re: How to do query inner join in django rest framework

2017-11-17 Thread Jason
I would look at the django beginner tutorial first https://docs.djangoproject.com/en/1.11/intro/tutorial01/ what you're asking for is covered in part 2 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

How to do query inner join in django rest framework

2017-11-16 Thread Angel Omar Rojas Pacheco
hello everyone, I am a new in django, need to inner join in django, it searching in documentation DJANGO REST FRAMEWORK / SERIALIZER, but is not looking for I am, My query in sql is: select * from auth_user as auser inner join profile_user_colony as profileu on auser.id=profileu.user_id

Re: Django REST framework nested query.

2017-11-06 Thread Xavier Ordoquy
Hi, You are looking for nested serializers. Documentation explains how to deal with them at: http://www.django-rest-framework.org/api-guide/relations/#nested-relationships Regards, Xavier, Linovia. > Le 7 nov.

Django REST framework nested query.

2017-11-06 Thread Shamim Hossain
I am switched to Djangorest framework from Nodejs. I don't know how can I start to solve following problem. I have two django model named Category and Product. In Category model has "is_featured" boolean field. I need category list in JSON format where is_featured=true and the list of

Re: Django + Django REST Framework SQL query response handling and serialization is very, very slow - yet not a “N+1” problem

2017-06-14 Thread Miika Huusko
fault" GET e.g. for 50k "Items" took about 1 minute, with updates it's now about 10 seconds. That's good enough for now, although it's sad I had to write code that one shouldn't need to write when using good framework. Added update also to Stack Overflow: https://stackoverflow.co

Re: Django + Django REST Framework SQL query response handling and serialization is very, very slow - yet not a “N+1” problem

2017-06-11 Thread Melvyn Sopacua
On Sunday 11 June 2017 14:41:22 Miika Huusko wrote: > The reason I'm providing all "Items" and other relates stuff with one > request is that I want to make customer (that's also me and my good > frieds) life easier. I want to keep all the difficult and heavy work > on server side. Customer needs

Re: Django + Django REST Framework SQL query response handling and serialization is very, very slow - yet not a “N+1” problem

2017-06-11 Thread Alceu Rodrigues de Freitas Junior
I'm guessing here that REST would not be the appropriate to handle "large" amounts of data, and probably that's why Melevyn suggested to use pagination. If your customer needs such data to be used off-line, I bet that would be better to generate a file in the appropriate format, compact it

Re: Django + Django REST Framework SQL query response handling and serialization is very, very slow - yet not a “N+1” problem

2017-06-11 Thread Miika Huusko
ld be done with hashes or IDs. Either way it would be customer who would make the JOIN. I might go there, but still I don't believe that Django could not handle my meager data faster than 20 seconds :) If that would be the case it really would be sad. On Sunday, June 11, 2017 at 4:57:22 PM UTC+2, Miik

Re: Django + Django REST Framework SQL query response handling and serialization is very, very slow - yet not a “N+1” problem

2017-06-11 Thread Melvyn Sopacua
On Sunday 11 June 2017 13:41:55 Miika Huusko wrote: > @Melvyn Sopacue, I opt to use prefetch_related because I'm fetching > "Items" that are used as ForeignKey for "Photos" and "Events". > Select_related is meant for cases where you have OneToOne of > ForeignKey relation (single item) that you

Re: Django + Django REST Framework SQL query response handling and serialization is very, very slow - yet not a “N+1” problem

2017-06-11 Thread Miika Huusko
extra looping or cloning going on when performing Python level JOIN for prefetched Photos or other related sets. On Sunday, June 11, 2017 at 4:57:22 PM UTC+2, Miika Huusko wrote: > > I have a performance problem with Django + Django REST Framework. The > problem is that it takes Django

Re: Django + Django REST Framework SQL query response handling and serialization is very, very slow - yet not a “N+1” problem

2017-06-11 Thread Melvyn Sopacua
On Sunday 11 June 2017 09:15:09 Miika Huusko wrote: > Thanks for response! > > Yep, timing with "time" is not the best way to go to compare SQL query > times. The reason I added that "time" test is that in Stack Overflow > I was asked to confirm that data transfer is not factor here. I timed >

Re: Django + Django REST Framework SQL query response handling and serialization is very, very slow - yet not a “N+1” problem

2017-06-11 Thread Alceu Rodrigues de Freitas Junior
This may be very basic thing to ask, but there is no harm to double check: are you using select_related instead of all for those two specific Models? Check out https://django-debug-toolbar.readthedocs.io/en/stable/index.html if you aren't using it yet, it will help you to get that very

Re: Django + Django REST Framework SQL query response handling and serialization is very, very slow - yet not a “N+1” problem

2017-06-11 Thread Miika Huusko
ne should consider when making related items like Photos and Events related to Items? That use case is quite simple and still result Django to use 18 seconds to process SQL query response. There is lot of data of course, but I have thought that returning 50k objects should not be a problem for Pytho

Re: Django + Django REST Framework SQL query response handling and serialization is very, very slow - yet not a “N+1” problem

2017-06-11 Thread Alceu Rodrigues de Freitas Junior
on a Perl related blog, the concepts on the post are applicable everywhere. Em 11/06/2017 07:06, Miika Huusko escreveu: I have a performance problem with Django + Django REST Framework. The problem is that it takes Django very, very long time to handle SQL query response + DRF serialization take

Re: Django + Django REST Framework SQL query response handling and serialization is very, very slow - yet not a “N+1” problem

2017-06-11 Thread Alceu Rodrigues de Freitas Junior
see, you want to get 10k to 50k items... that's a lot (to serialize too). Em 11/06/2017 07:06, Miika Huusko escreveu: I have a performance problem with Django + Django REST Framework. The problem is that it takes Django very, very long time to handle SQL query response + DRF serialization take

Django + Django REST Framework SQL query response handling and serialization is very, very slow - yet not a “N+1” problem

2017-06-11 Thread Miika Huusko
I have a performance problem with Django + Django REST Framework. The problem is that it takes Django very, very long time to handle SQL query response + DRF serialization take quite some time also. It happens when there are ManyToMany or OneToMany relations and nested objects. Sounds like &q

Re: Django rest framework JWT and custom authentication backend

2017-05-28 Thread Melvyn Sopacua
am I missing? Why is it that its working while loggin to the > django admin site, but get error when getting token with django rest > framework jwt? Shot in the dark: Your payload is not json. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Djang

Django rest framework JWT and custom authentication backend

2017-05-26 Thread Robin Lery
I have a custom user model and have created a custom authentication backend. I am using django rest framework JWT <http://getblimp.github.io/django-rest-framework-jwt/#extending-jsonwebtokenauthentication> for token authentication. User model: class User(AbstractBaseUser, Permission

Re: Django REST API

2017-05-22 Thread Andréas Kühne
Hi, That is a very broad question and hard to answer directly. Reasons why you would want a REST API: 1. Communicating with another server 2. Communicating with a mobile application 3. Creating a single page application with a javascript framework like angular, react, jquery or the like. I

Django REST API

2017-05-22 Thread DEVENDRA BAJAJ
When is it best to build the Backed with Django's REST API -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to

Re: Django rest framework cannot deal with multple objects in model viewset

2017-04-20 Thread Xavier Ordoquy
> Le 21 avr. 2017 à 04:17, Robin Lery a écrit : > > I have a very simple model and its related serializer and views: > > class Page(models.Model): > user = models.ForeignKey(User) > title = models.CharField(max_length=255) > pub_date =

Django rest framework cannot deal with multple objects in model viewset

2017-04-20 Thread Robin Lery
I have a very simple model and its related serializer and views: class Page(models.Model): user = models.ForeignKey(User) title = models.CharField(max_length=255) pub_date = models.DateTimeField(default=timezone.now) class PageSerializer(serializers.ModelSerializer): class Meta:

Re: Creating multiple objects with one request in Django Rest Framework

2017-04-18 Thread Aamu Padi
exception text was: 'MovieTicket' object has no attribute 'seats'. What am I missing? On Tue, Apr 18, 2017 at 4:45 PM, Christian Ledermann < christian.lederm...@gmail.com> wrote: > maybe > https://github.com/marcgibbons/django-rest-framework-bulk > > HTH > > On 18 April 2017

Re: Creating multiple objects with one request in Django Rest Framework

2017-04-18 Thread Christian Ledermann
maybe https://github.com/marcgibbons/django-rest-framework-bulk HTH On 18 April 2017 at 11:29, Camilo Torres <camilotorr...@gmail.com> wrote: > Hi, > > May be you can create a new Serializer, including a ListField to get > multiple seat IDs: > > class Ma

Re: Creating multiple objects with one request in Django Rest Framework

2017-04-18 Thread Camilo Torres
ch(function (response) { > console.log(response); > });return; > > If the form was valid, this will create a new MovieTicket Object. > > Now, suppose if the user selected multiple seats, I can loop through each > selectedSeats array and get the seat ids. But wh

Re: Creating multiple objects with one request in Django Rest Framework

2017-04-17 Thread Aamu Padi
});return; > > If the form was valid, this will create a new MovieTicket Object. > > Now, suppose if the user selected multiple seats, I can loop through each > selectedSeats array and get the seat ids. But what I am confused is how > can I pass multiple seat.id if Django rest f

Re: Creating multiple objects with one request in Django Rest Framework

2017-04-16 Thread m712 - Developer
multiple seat.id if Django rest framework is only accepting one seat per request? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe

Creating multiple objects with one request in Django Rest Framework

2017-04-16 Thread Aamu Padi
m was valid, this will create a new MovieTicket Object. Now, suppose if the user selected multiple seats, I can loop through each selectedSeats array and get the seat ids. But what I am confused is how can I pass multiple seat.id if Django rest framework is only accepting one seat per request? -- Y

Re: How to create a new user with django rest framework and custom user model

2017-03-26 Thread Andréas Kühne
user(validated_data.get("email"), validated_data.get("password"), validated_data.get("first_name"), validated_data.get("last_name")) Regards, Andréas 2017-03-26 18:23 GMT+02:00 Aamu Padi <aamup...@gmail.com>: >

How to create a new user with django rest framework and custom user model

2017-03-26 Thread Aamu Padi
I have a custom user model and I am using django-rest-framework to create API models.py: class User(AbstractBaseUser, PermissionsMixin): email = models.EmailField( unique=True, max_length=254, ) first_name = models.CharField(max_length=15) last_name

Filtering using viewsets in django rest framework

2017-03-03 Thread Benjamin Smith
TimeTable objects (i.e. date list) by filtering all the Show objects by a specific movie object. This code seems to be the working and getting the list like I want it m = Movie.objects.get(id=request_id) TimeTable.objects.filter(show__movie=m).distinct() But I have no clue how to use this in d

Re: Django Channels alongside Django Rest Framework

2017-02-03 Thread adam . oxley
Hi Andrew, Thanks for the reply. I've managed to get it working running Daphne serving both HTTP and WebSocket requests. Your reply prompted me to look into what I was currently doing, and it crossed my mind that I was running via Gunicorn which from now reading the deployment documentation

Re: Django Channels alongside Django Rest Framework

2017-01-31 Thread Andrew Godwin
Hi Adam, The two should be able to coexist without any problem. If you put channels into INSTALLED_APPS then "runserver" is actually running Daphne already anyway, so it's worth noting if that's the case. You have two options: - Run everything via Daphne, which will serve both HTTP and

Django Channels alongside Django Rest Framework

2017-01-31 Thread adam . oxley
Hi everyone, We are currently considering using Django Channels for implementing WebSockets into a project. I am wondering if it is known that Django Channels runs perfectly within the same Django project as DRF? I have spent a little time investigating this myself and could manage to get

Re: Question Is Django Rest Framework only for APIs or can i Use it to create Users for a website?

2017-01-10 Thread Melvyn Sopacua
On Friday 06 January 2017 23:13:12 Robert librado wrote: > Thanks i guess i will go with djangi all auth instead kind of leaning > towards a social network Yeah, you should, cause it's the opposite of what Django Rest Framework does. Django All Auth connects an *external API* to

Re: Question Is Django Rest Framework only for APIs or can i Use it to create Users for a website?

2017-01-06 Thread Robert librado
Thanks i guess i will go with djangi all auth instead kind of leaning towards a social network On Jan 6, 2017 10:39 PM, "M Hashmi" wrote: > Django RestAPI is a layer that exposes part of your application or your > whole website to other platforms for connectivity. Once it

Re: Question Is Django Rest Framework only for APIs or can i Use it to create Users for a website?

2017-01-06 Thread M Hashmi
Django RestAPI is a layer that exposes part of your application or your whole website to other platforms for connectivity. Once it is integrated then whatever tasks you've specified for DjangoRestFramwork to carry to another platform will act for everything what that application tend to present.

Question Is Django Rest Framework only for APIs or can i Use it to create Users for a website?

2017-01-06 Thread djangorobert
Ya the question is what it means Ive gone through it and looks like you could but not sure I know its good for apis but wanted to see if it could be used for Authenticating User for a website that im building any responses would be appreciated thank you -- You received this message because

Re: Django REST Authenticate with Session in external app

2016-12-27 Thread Chris Bartos
Hello there! Although you COULD use Session Authentication <http://www.chrisbartos.com/articles/how-do-i-implement-session-authentication-in-django-rest-framework/> to authenticate users from external clients. I don't recommend it. It's going to be a pain. Instead what I recommend is

Re: Django Rest Framework Output as list of lists

2016-12-08 Thread GMail
Hi! Seems like more StackOverflow question to me, since it has nothing to do with Django. But anyway, you could use list comprehensions: >>> result = [[x['date'], x['price']] for x in source['navs']] Also, it looks like list of lists is overkill (list uses more memory than tupple), and

Django Rest Framework Output as list of lists

2016-12-08 Thread Artem Bernatskyy
Hello, How can i change this output

Re: Django REST Authenticate with Session in external app

2016-09-11 Thread flaudizio
Thank's James. Very clearly now. Em domingo, 11 de setembro de 2016 19:13:45 UTC-3, James Schneider escreveu: > > On Sep 11, 2016 2:19 PM, "flaudizio" <flau...@gmail.com > > wrote: > > > > Hi guys, > > > > I'm a doubt about Django RE

Re: Django REST Authenticate with Session in external app

2016-09-11 Thread James Schneider
On Sep 11, 2016 2:19 PM, "flaudizio" <flaudi...@gmail.com> wrote: > > Hi guys, > > I'm a doubt about Django REST auth and an external app's (mobile, desktop). > > When we work with django in browser we have a session auth. To use session it's possible using django

Django REST Authenticate with Session in external app

2016-09-11 Thread flaudizio
Hi guys, I'm a doubt about Django REST auth and an external app's (mobile, desktop). When we work with django in browser we have a session auth. To use session it's possible using django rest with an external app created in C sharp ? Or need to work with tokens in external app consulting my

Django Rest Create with a Writable Nested Serializer

2016-09-09 Thread Ronaldo Bahia
Hi everyone, I'm trying to perform a create in Django Rest Framework using a writable nested serializer. With the code bellow I can create a ScriptQuestion but I can't add a RecordedInterview into it. Django says OrderedDict is None. What am I doing wrong? Thanks in advance Thread

Re: Django Rest Framework inside of Django Project

2016-08-26 Thread John
I could make a website with > Django Rest Framework or if I have create a Django project for my > website and a Django Rest Framwork for my API > -- > You received this message because you are subscribed to the Google > Groups "Django users" group. > To unsubscribe from t

Django Rest Framework inside of Django Project

2016-08-26 Thread Sylvain Dégué
Hi, I am building a mobile application and I need a Rest API and a web version of my app. So I was wondering if I could make a website with Django Rest Framework or if I have create a Django project for my website and a Django Rest Framwork for my API -- You received this message because you

Re: Django REST - localization settings

2016-07-14 Thread monoBOT
If you want the django app to be timzone, localization and intentioanlization aware you have to set the propper settings in the settings.py 2016-07-14 11:07 GMT+01:00 Wequu A <tobi...@gmail.com>: > Hello, > > I am using django to create rest api with django-rest-framework. I wil

Django REST - localization settings

2016-07-14 Thread Wequu A
Hello, I am using django to create rest api with django-rest-framework. I will not use its template system. My database backend is PostgreSQL where I set client_encoding to UTF8 and timezone to UTC. In settings.py there are options like USE_I18N, USE_L10N and USE_TZ. Do I need them? I don't

Re: Django Rest Framework Custom Viewsets.

2016-06-24 Thread Tom Christie
Good stuff - make sure to add it to the django packages grid, here: https://www.djangopackages.com/grids/g/django-rest-framework/ You could also create a docs pull request to add a "Third Party Packages" to the viewsets section, here: http://www.django-rest-framework.org/api-guid

Django Rest Framework Custom Viewsets.

2016-06-24 Thread Malik Junaid
A very small library for extending the functionality of DRF ModelViewSet. Viewsets The first of out custom viewsets is the CustomSerializerViewSet that allows you to specify different serializers for different actions of a viewset.

django rest framework - request context key error

2016-06-21 Thread Aamu Padi
I have two models (Like and News). I am using django-rest-framework to make a web api out of it. class Like(models.Model): user = models.ForeignKey(User) content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() content_object = GenericForeignKey

django-rest-framework serializer for ContentType object

2016-06-20 Thread Aamu Padi
ignKey(settings.AUTH_USER_MODEL) title = models.CharField(max_length=150) To get this data I am making an API which will get me the required json data. I am using django-rest-framework <http://www.django-rest-framework.org/> for this and very new with it. class Act

django rest framework-haystack-elasticsearch

2016-05-06 Thread keba . diedhiou
Hello i have a problem with django rest framework-haystack-elasticsearch.when i execute http://example.com/api/v1/location/search/?city=Oslo i have a problem: "The model None is not registered" -- You received this message because you are subscribed to the Google Groups "Djan

<    1   2   3   4   5   >