Django rest registration

2016-04-26 Thread nitish patkar
I am using Django-rest-auth (https://github.com/Tivix/django-rest-auth) in my django project for login and registration. I see a default registration form as in attached file. Currently I am being able to register a new user with email instead of username. The default auth_user table in my

Re: Built a API with django rest framework how do i get a key for people or is it open to them

2016-04-11 Thread Amandeep Singh
n Tue, Apr 12, 2016 at 8:22 AM, djangorobert wrote: > Hello fellow django users I recently built a api for just a small sprint > board where tasks can be set its built with django and django rest > framework what i see though is most apis have like a key that others can > use do i hav

Built a API with django rest framework how do i get a key for people or is it open to them

2016-04-11 Thread djangorobert
Hello fellow django users I recently built a api for just a small sprint board where tasks can be set its built with django and django rest framework what i see though is most apis have like a key that others can use do i have to offer api keys or is mine able just able to be free thats where

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Bernardo Garcia
http://stackoverflow.com/questions/19669376/django-rest-framework-absolute-urls-with-nginx-always-return-127-0-0-1 my /etc/nginx/sites-enabled/myproject file I stayed so: server { server_name yourdomainorip.com; access_log off; location / { proxy_pass http://127.0.0.1:8000;

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread James Schneider
On Tue, Feb 23, 2016 at 6:03 AM, Bernardo Garcia wrote: > Hi everyone Djangonauts > :) > > Currently I am exposing a Django application (for the momento is just > thier users schema) with Django Rest Framework and happen that each > serialized model, in the url attribute, I hav

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Bernardo Garcia
s://www.digitalocean.com/community/tutorials/how-to-install-and-configure-django-with-postgres-nginx-and-gunicorn > > python manage.py runserver is used just in my local development machine > > On Tuesday, February 23, 2016 at 9:25:36 AM UTC-5, Avraham Serour wrote: > > are you

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Avraham Serour
ord to this tutorial >>> https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-django-with-postgres-nginx-and-gunicorn >>> >>> python manage.py runserver is used just in my local development machine >>> >>> On Tuesday, February 23,

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Fellipe Henrique
w-to-install-and-configure-django-with-postgres-nginx-and-gunicorn >>> >>> python manage.py runserver is used just in my local development machine >>> >>> On Tuesday, February 23, 2016 at 9:25:36 AM UTC-5, Avraham Serour wrote: >>>> >>

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Bernardo Garcia
e >> >> On Tuesday, February 23, 2016 at 9:25:36 AM UTC-5, Avraham Serour wrote: >>> >>> are you running django using manage.py runserver? >>> >>> >>> On Tue, Feb 23, 2016 at 4:03 PM, Bernardo Garcia >>> wrote: >>> >&

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Avraham Serour
:) >>> >>> Currently I am exposing a Django application (for the momento is just >>> thier users schema) with Django Rest Framework and happen that each >>> serialized model, in the url attribute, I have is the localhost machine >>> address development a

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Bernardo Garcia
gt; Hi everyone Djangonauts >> :) >> >> Currently I am exposing a Django application (for the momento is just >> thier users schema) with Django Rest Framework and happen that each >> serialized model, in the url attribute, I have is the localhost machine >> address

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Avraham Serour
are you running django using manage.py runserver? On Tue, Feb 23, 2016 at 4:03 PM, Bernardo Garcia wrote: > Hi everyone Djangonauts > :) > > Currently I am exposing a Django application (for the momento is just > thier users schema) with Django Rest Framework and happen that ea

API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Bernardo Garcia
Hi everyone Djangonauts :) Currently I am exposing a Django application (for the momento is just thier users schema) with Django Rest Framework and happen that each serialized model, in the url attribute, I have is the localhost machine address development and don't take the hostname

Aw: React.js with django-rest-framework using SessionAuthentication: How to include CSRF-Token documentation has not helped me :/

2015-12-28 Thread lnzy35en
Solution was to use: csrfmiddlewaretoken insteed of csrftoken. I hope that will save someones days, that run into the same issues.     Gesendet: Sonntag, 27. Dezember 2015 um 13:29 Uhr Von: lnzy3...@gmx.de An: django-users@googlegroups.com Betreff: React.js with django-rest-framework using

React.js with django-rest-framework using SessionAuthentication: How to include CSRF-Token documentation has not helped me :/

2015-12-27 Thread lnzy35en
  Hi, I am getting crazy finding out how to submit data to the django-rest-api via react.js to include a valid CSRF token by using SessionAuthentication. My template is very basic: {% extends "base.html" %} {% load staticfiles %} {% block title %} ToDo List {% endblock %} {% blo

Re: Django rest framework - error 'TokenAuthentication' object has no attribute 'has_permission

2015-11-29 Thread Shekar Tippur
My bad. This was due to the permissions I had set on my class based view. I took out the tokenauthentication and it now works well. - Shekar -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emai

Django rest framework - error 'TokenAuthentication' object has no attribute 'has_permission

2015-11-28 Thread Shekar Tippur
Hello, I am trying to use oauth2 provider as described in http://django-oauth-toolkit.readthedocs.org/en/latest/rest-framework/getting_started.html#step-1-minimal-setup 'TokenAuthentication' object has no attribute 'has_permission. Curl - curl -H "Authorization: Bearer $access_token" -H "Con

Re: Why should we use Django Rest Framework?

2015-10-03 Thread Scot Hacker
Just a quick tip: Sometimes you need a little JSON endpoint for some feature of your site or project, and a full REST framework like DRF is completely overkill. Django makes this incredibly easy, out of the box: from django.http import JsonResponse def some_view(request): my_dict = {'foo'

Re: Why should we use Django Rest Framework?

2015-10-02 Thread James Schneider
> > From what ive seen when i use it its like django admin but with more > features. > Django Admin is not an API, nor can it be used that way. If you need API functionality, you would write the interface yourself, or use a package such as DRF. DRF and the Django Admin perform the same functional

Re: Why should we use Django Rest Framework?

2015-10-02 Thread Andreas Kuhne
Hi Robert, The main reason for using django rest framework is if you need a backend to communicate with one or more rich frontends. An example could be if you have a website running django and you want to create a mobile application for iOS or android. You can then create an API that will

Why should we use Django Rest Framework?

2015-10-02 Thread Robert librado
>From what ive seen when i use it its like django admin but with more features. I also noticed that it has the serializers are those for like using it with a machine ot translatign code? I also have question on why its needed i understand that the api is for client and users to collect data is

django rest framework - access token user

2015-10-01 Thread Shekar Tippur
Hello, I am trying to get the user name from a token request. Here is what I have so far: from rest_framework.authtoken.models import Token class getTokenl(generics.RetrieveDestroyAPIView): permission_classes = [permissions.IsAuthenticated, TokenHasReadWriteScope] queryset = Parcel.obj

Re: Any good tutorials for django-rest-framework and React.Js?

2015-09-11 Thread ThomasTheDjangoFan
ation with checking out >> https://github.com/HorizonXP/react-tutorial-django, >> which is an implementation if it with running django 1.6. >> >> I'm having problems getting the connection to django-rest-framework >> running for CRUD Stuff. >> >> Are there any

Re: Any good tutorials for django-rest-framework and React.Js?

2015-09-11 Thread Derek
into how to use React.Js with Django. > > I did the tutorial http://facebook.github.io/react/docs/tutorial.html > in combination with checking out > https://github.com/HorizonXP/react-tutorial-django, > which is an implementation if it with running django 1.6. > > I'm

Any good tutorials for django-rest-framework and React.Js?

2015-09-10 Thread ThomasTheDjangoFan
I'm having problems getting the connection to django-rest-framework running for CRUD Stuff. Are there any more *tutorials* available on how to implement an application *with React.js and Django-Rest-Framework?* Kind regards Thomas -- You received this message because you are subscribed to

Re: django-rest-framework-recursive view not returning ID

2015-08-23 Thread Shekar Tippur
James, My bad. Sorry an obvious mistake from my side. Yes, I had forgotten ID in the serializer field. - Shekar > > -- 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 ema

Re: django-rest-framework-recursive view not returning ID

2015-08-23 Thread James Schneider
On Aug 23, 2015 10:05 AM, "Shekar Tippur" wrote: > > Hello, > > I am using https://github.com/heywbj/django-rest-framework-recursive and it works great. > > > I seem to have a small issue with it. When I try a GET operation on it, I dont seem to get the ID in the

django-rest-framework-recursive view not returning ID

2015-08-23 Thread Shekar Tippur
Hello, I am using https://github.com/heywbj/django-rest-framework-recursive and it works great. I seem to have a small issue with it. When I try a GET operation on it, I dont seem to get the ID in the result. I want ID to be part of the result so that I can filter further on parent_id

django rest framework with mongoengine login

2015-08-20 Thread Selva sundar raj
currently i am doing application in DRF with mongoengine , in that how to do login with mongoengine user any can help 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 e

Django REST Framework : Serializer field level validation of OneToOne fields

2015-08-18 Thread Ankit Agrawal
The code corresponding to my query is rather big hence I posted it on Stack Overflow - http://stackoverflow.com/questions/32063427/django-rest-framework-serializer-field-level-validation-of-onetoone-fields -- You received this message because you are subscribed to the Google Groups "D

Where does django-rest-framework-social-oauth2 create Django user accounts?

2015-07-05 Thread Daniel Grace
Where in the source code does django-rest-framework-social-oauth2 (which uses django-oauth-toolkit and python-social-auth) auto create Django user accounts? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: How to restrict update of a record to the record owner in Django REST?

2015-07-04 Thread Daniel Grace
I found a solution based on the example in REST API guide: http://www.django-rest-framework.org/api-guide/permissions/#examples -- 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, sen

How to restrict update of a record to the record owner in Django REST?

2015-07-04 Thread Daniel Grace
I want to restrict update of a record to the record owner in an UpdateAPIView with Django REST, but I don't know how to code the method. For example, something like this: from rest_framework import generics from testapp.serializers import UserProfileSerializer from rest_framework.rend

Django REST Cross Domain Request to Download a File

2015-06-30 Thread Garry D Thompson
So I am trying to download a file via Django REST (referred to as the Back End from now on) instance through my web page. The web page and the Back End are currently installed on two different servers so this is a cross domain request. Now, I have no problem making cross domain requests to any

How to protect a REST API view with token authentication using django-rest-framework-social-oauth2?

2015-06-27 Thread Roman Onosovski
Thats about the most appropriate way to do it, just make sure its over https. -- 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...@googlegrou

How to protect a REST API view with token authentication using django-rest-framework-social-oauth2?

2015-06-27 Thread Daniel Grace
I have installed and setup the django-rest-framework-social-oauth2 package. Now I need to protect my REST API views with the appropriate token authentication. Do I follow the method at: http://www.django-rest-framework.org/api-guide/authentication/#tokenauthentication or is another method

Re: Error when adding application record for django-rest-framework-social-oauth2

2015-06-25 Thread Daniel Grace
OK, I sussed this. I entered "1" for the user field, the form was then valid and the record saved to the database. -- 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

Error when adding application record for django-rest-framework-social-oauth2

2015-06-25 Thread Daniel Grace
I am following the instructions for django-rest-framework-social-oauth2 at https://pypi.python.org/pypi/django-rest-framework-social-oauth2/0.0.4 When I attempt to add an application record via "Home › Oauth2_Provider › Applications › Add application", I get the error message "

Re: Error using django-rest-framework-social-oauth2

2015-06-23 Thread Daniel Grace
OK, my mistake, I ran migrate again and got the neccessary tables. -- 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

Error using django-rest-framework-social-oauth2

2015-06-23 Thread Daniel Grace
I have installed and set up django-rest-framework-social-oauth2, as per instructions on: https://pypi.python.org/pypi/django-rest-framework-social-oauth2/0.0.4 I did makemigrations and migrate, but there were no extra tables... when I go to "Django administration - Site administration

django-rest-auth with django-allauth not what I was expecting

2015-06-23 Thread Daniel Grace
I am trying to write a Django / REST API back end with Facebook authentication, for use with a phone app front end. I installed and configured both django-rest-auth and django-allauth. When testing I can log into Facebook and authorise my app to access my Facebook account, OK. But then I am

Re: Errors with django-rest-auth and django-allauth

2015-06-20 Thread Luis Zárate
As say Stephen Butler you need to install django.contrib.sites (it not enable by default) and set SITE_ID = 1 in your settings. Here is the reference: https://docs.djangoproject.com/en/1.8/ref/contrib/sites/#enabling-the-sites-framework -- "La utopía sirve para caminar" Fernando Birri -- Yo

Re: Errors with django-rest-auth and django-allauth

2015-06-20 Thread Stephen J. Butler
rted before its application was loaded. And here: Field defines a relation with model 'Site', which is either *not installed*, or is abstract On Sat, Jun 20, 2015 at 2:53 AM, Daniel Grace wrote: > I have installed Django (1.8), django-allauth (0.20.0) django-rest-auth > (0.4.0)

Errors with django-rest-auth and django-allauth

2015-06-20 Thread Daniel Grace
I have installed Django (1.8), django-allauth (0.20.0) django-rest-auth (0.4.0). I added to INSTALLED_APPS in settings.py: 'rest_framework', 'rest_framework.authtoken', 'rest_auth' 'allauth', 'allauth.account', &#

Re: Preferred way of adding social authorization to a Django / REST app?

2015-06-19 Thread aRkadeFR
I like JWT authentication coupled with AngularJS: https://github.com/GetBlimp/django-rest-framework-jwt On 06/18/2015 08:00 PM, Daniel Grace wrote: What is the preferred way of adding social authorization to a Django / REST app? I see that there are at least two packages: django-rest

Re: Preferred way of adding social authorization to a Django / REST app?

2015-06-18 Thread Vijay Khemlani
ed way of adding social authorization to a Django / > REST app? > > I see that there are at least two packages: > django-rest-framework-social-oauth2 (see > https://pypi.python.org/pypi/django-rest-framework-social-oauth2/0.0.4) > and django-rest-auth (see > http:

Preferred way of adding social authorization to a Django / REST app?

2015-06-18 Thread Daniel Grace
What is the preferred way of adding social authorization to a Django / REST app? I see that there are at least two packages: django-rest-framework-social-oauth2 (see https://pypi.python.org/pypi/django-rest-framework-social-oauth2/0.0.4) and django-rest-auth (see http://django-rest

Re: How to serialize one record with Django / REST?

2015-06-14 Thread James Schneider
Instead of using .get(), try using .filter() instead, since get_queryset() needs to return a query set and not the actual object (even though the query set will only contain a single result). Your code for the get_queryset() override is actually better suited as an override for get_object() in the

How to serialize one record with Django / REST?

2015-06-14 Thread Daniel Grace
I can serialize all objects using the following. In views: class ProductDetail(generics.ListAPIView): serializer_class = ProductSerializer def get_queryset(self): return Product.objects.all() In serializers: class ProductSerializer(serializers.ModelSerializer): class Meta:

Django rest framework and endpoints to use

2015-06-08 Thread Shekar Tippur
Hello, I am trying to use OAuthSwift to get authenticated to my app running using rest framework. I am following instruction from https://django-oauth-toolkit.readthedocs.org/en/0.3.2/tutorial/rest_framework_integration.html . Can you please indicate what URL I should be using to get myself va

User defined API for Django Rest-Framework

2015-05-14 Thread SUBHABRATA BANERJEE
Dear Group, I am trying to design API on Rest framework on Django. I could make one Browsable API as given in http://www.django-rest-framework.org/tutorial/quickstart/. I am looking to change the views, to user defined views. If anyone may kindly suggest how may I do it? I am pretty new in

Re: Alternatives to Django REST Framework

2015-04-09 Thread François Schiettecatte
le. > > If you are going to use Django anyway, just use a Django view that return > JSON, XML or whatever you want. > > On Thursday, April 9, 2015 at 6:25:21 PM UTC+5:30, amit.p...@gmail.com wrote: > Hi, > > while Django REST Framework seems wonderful to me, it is a heayw

Re: Alternatives to Django REST Framework

2015-04-09 Thread Vijay Khemlani
> If you are going to use Django anyway, just use a Django view that return > JSON, XML or whatever you want. > > On Thursday, April 9, 2015 at 6:25:21 PM UTC+5:30, amit.p...@gmail.com > wrote: >> >> Hi, >> >> while Django REST Framework seems wonderful to me,

Re: Alternatives to Django REST Framework

2015-04-09 Thread graeme
If you do not need Django at all, Flask or Bottle. If you are going to use Django anyway, just use a Django view that return JSON, XML or whatever you want. On Thursday, April 9, 2015 at 6:25:21 PM UTC+5:30, amit.p...@gmail.com wrote: > > Hi, > > while Django REST Framework seems

Re: Alternatives to Django REST Framework

2015-04-09 Thread Lucas Klassmann
make. I did make my own REST api with CBV (Class Based Views) and django authentication. Cheers. On Thu, Apr 9, 2015 at 9:54 AM, Amit Prahesh wrote: > Hi, > > while Django REST Framework seems wonderful to me, it is a heayweight > option for a little project of mine. I wonder if

Re: Alternatives to Django REST Framework

2015-04-09 Thread François Schiettecatte
You could try Flask, I have used it in the past when I did not need all the infrastructure that Django provides: http://flask.pocoo.org François > On Apr 9, 2015, at 8:54 AM, Amit Prahesh wrote: > > Hi, > > while Django REST Framework seems wonderful to me, it is a he

Re: Alternatives to Django REST Framework

2015-04-09 Thread Andrew Farrell
Someone I met at the Austin python user group told me they'd built their company's backend using Falcon <http://falconframework.org/> and were very happy with it. On Thu, Apr 9, 2015 at 7:54 AM, Amit Prahesh wrote: > Hi, > > while Django REST Framework seems wonderful

Re: Alternatives to Django REST Framework

2015-04-09 Thread Jorge Andrés Vergara Ebratt
I love DRF, but if you want to check something else, there is also Tastypie! Here you can find the docs: https://django-tastypie.readthedocs.org/en/latest/ On Thu, Apr 9, 2015 at 7:54 AM Amit Prahesh wrote: > Hi, > > while Django REST Framework seems wonderful to me, it is a h

Alternatives to Django REST Framework

2015-04-09 Thread Amit Prahesh
Hi, while Django REST Framework seems wonderful to me, it is a heayweight option for a little project of mine. I wonder if there are simpler alternatives for publishing a simple API? TIA, AP. -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Use django rest framework with dynamoDB

2015-01-16 Thread Tom Christie
Maybe take a look at this... https://github.com/gtaylor/django-dynamodb-sessions > > > -- 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...

Use django rest framework with dynamoDB

2015-01-15 Thread victor . garcia
I need to create an api-rest with django-rest-framwork for bring data from a database DynamoDB. -- 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 dj

Re: Django REST Framework: How to add prefix in URL for versioning

2014-11-05 Thread Lee Hinde
Swap the urls: url(r'^v1/', include(v1_urls, namespace="v1")) url(r'^', include(default_urls, namespace="default")), On Wed, Nov 5, 2014 at 5:01 AM, Shoaib Ijaz wrote: > I am trying to create version for REST application. Here is my URL Examle > > www.myapi.com/foo [default version] > www.my

Django REST Framework: How to add prefix in URL for versioning

2014-11-05 Thread Shoaib Ijaz
I am trying to create version for REST application. Here is my URL Examle www.myapi.com/foo [default version] www.myapi.com/v1/foo [version one] This is the project structure ├── __init__.py├── settings.py├── urls.py├── default_app│ ├── __init__.py│ ├── serializer.py│ ├── models.py│ ├── views

Re: Django REST Framework

2014-10-23 Thread Max Nathaniel Ho
n the web, but rather > for > >> connecting to your backend via javascript or connecting 2 different > projects > >> over the Internet. > >> > >> Regards, > >> > >> Andréas > >> > >> 2014-10-23 10:14 GMT+02:00 Max Nathaniel Ho

Re: Django REST Framework

2014-10-23 Thread Lachlan Musicman
s I am fairly new to django and programming in >>> general, do you mind sharing what REST APIs actually do? Thank you! >>> >>> On Thu, Oct 23, 2014 at 11:51 AM, Russell Keith-Magee >>> wrote: >>>> >>>> Hi Max, >>>> >>

Re: Django REST Framework

2014-10-23 Thread Max Nathaniel Ho
u mind sharing what REST APIs actually do? Thank you! >> >> On Thu, Oct 23, 2014 at 11:51 AM, Russell Keith-Magee < >> russ...@keith-magee.com> wrote: >> >>> Hi Max, >>> >>> Django ReST Framework, as the name suggests, is a framework for buildi

Re: Django REST Framework

2014-10-23 Thread Andreas Kuhne
t; > Thanks for your reply. As I am fairly new to django and programming in > general, do you mind sharing what REST APIs actually do? Thank you! > > On Thu, Oct 23, 2014 at 11:51 AM, Russell Keith-Magee < > russ...@keith-magee.com> wrote: > >> Hi Max, >> >&

Re: Django REST Framework

2014-10-23 Thread Max Nathaniel Ho
Hi Russell, Thanks for your reply. As I am fairly new to django and programming in general, do you mind sharing what REST APIs actually do? Thank you! On Thu, Oct 23, 2014 at 11:51 AM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > Hi Max, > > Django ReST Framewo

Re: Django REST Framework

2014-10-22 Thread Russell Keith-Magee
Hi Max, Django ReST Framework, as the name suggests, is a framework for building ReST APIs in Django. It's not officially part of the Django framework, but it's creator and principle maintainer - Tom Christie - is a member of the Django core team. Tom recently held a Kickstarter to

Django REST Framework

2014-10-22 Thread Max Nathaniel Ho
Hi all, I just came across Django REST Framework. From what I have read up so far, its a Web API framework. What does it do and what is the difference between this and the regular Django Web Framework? Thanks! -- You received this message because you are subscribed to the Google Groups

Django REST framework 3 Kickstarter.

2014-07-17 Thread Tom Christie
Hi all, I've just launched a Kickstarter project aimed at funding development for a major new version of Django REST framework. There's a whole bunch of really exciting stuff that I'd like to be able to work on, including: - Faster, simpler and easier-to-use seria

Re: Django Rest Framework create api-root ???

2014-06-20 Thread Glyn Jackson
The documentation explains this very well: http://www.django-rest-framework.org/tutorial/5-relationships-and-hyperlinked-apis -- 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

Django Rest Framework create api-root ???

2014-06-20 Thread Carlos Perche
Using DjangoRestFramework, how can I create api-root with all urls for my apps Like this e.g. I have following apps core_api views models serializers urls equipments views models serializers urls companies views models serializers urls contacts views models seriali

Security release for Django REST framework: 2.3.14.

2014-06-12 Thread Tom Christie
Cross-posting this <https://groups.google.com/forum/#!topic/django-rest-framework/gwAHf3MjyPs> for the benefit of any Django REST framework users who aren't on the REST framework mailing list... The 2.3.14 version of REST framework has just been released to PyPI. Most impor

Django rest framework api versioning

2014-05-07 Thread Стас Медведев
I'm new to the DRF. I tried to write an example by description on links: http://james.lin.net.nz/2014/02/18/django-rest-framework-api-versioning/ django-rest-framework: api versioning<http://stackoverflow.com/questions/14269719/django-rest-framework-api-versioning> and shar

How to use Database Views in Django Rest Framework

2014-04-18 Thread Shoaib Ijaz
I am using Django Rest Framework for serialize data. I came across a scenario where I have to use Database Views as Model. *My Model* class A(models.Model): name = models.CharField(max_length=240, blank=True) value = models.CharField(max_length=240, blank=True) class Meta

Relation in Django REST Framework?

2014-04-08 Thread Shoaib Ijaz
I am using serializers.GeoFeatureModelSerializer to serialize Model. I have a queryset that is creating Left Outer Join. I want to serialize related Model fields Here is my Model class LookupTiming(models.Model): day = models.CharField(max_length=7) time_1 = models.TimeField() tim

Re: how to make https work in django REST framework

2014-02-13 Thread zhenwu he
Thanks all for your help. Finally we figured out how to do it from the doc link Kirby provided. Really appreciated your help. thanks. /zhenwu On Thursday, February 13, 2014 11:20:53 AM UTC-8, zhenwu he wrote: > > > Thank you! working on it. thanks. > > /zhenwu > > On Thursday, February 13, 20

Re: how to make https work in django REST framework

2014-02-13 Thread zhenwu he
Thank you! working on it. thanks. /zhenwu On Thursday, February 13, 2014 11:06:55 AM UTC-8, C. Kirby wrote: > > Use the django deployment docs for a howto: > https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/ > > On Thursday, February 13, 2014 12:58:53 PM UTC-6, zhenwu he wrote: >> >>

Re: how to make https work in django REST framework

2014-02-13 Thread C. Kirby
Use the django deployment docs for a howto: https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/ On Thursday, February 13, 2014 12:58:53 PM UTC-6, zhenwu he wrote: > > > Thanks Kirby. > > You meant merge django into apache? ok, let me see what I can do. thanks. > > /zhenwu > > On Thursday

Re: how to make https work in django REST framework

2014-02-13 Thread zhenwu he
Thanks Kirby. You meant merge django into apache? ok, let me see what I can do. thanks. /zhenwu On Thursday, February 13, 2014 10:18:03 AM UTC-8, C. Kirby wrote: > > Zhenwu, > > You only mentioned it in passing in the last post, but did you say you are > running django in production via the ma

Re: how to make https work in django REST framework

2014-02-13 Thread C. Kirby
Zhenwu, You only mentioned it in passing in the last post, but did you say you are running django in production via the manage.py runserver command? You _really_ shouldn't use runserver in production. You should be using a webserver (I guess apache in your case) and wsgi to serve up django.

Re: how to make https work in django REST framework

2014-02-13 Thread zhenwu he
Hi, Eric: After thinking further, I am a little lost. :( Here is my understanding. 1, I need have django run server running, for example, listen to port 1234 2, I enable https on apache, which is listening to 443. then I redirect all connections to 443 to port 1234 using config you provided.

Re: how to make https work in django REST framework

2014-02-13 Thread zhenwu he
Thanks Luca. Yeah, I have https setup, but that is for UI, not for REST, the REST is purely handled by django run server port. Based on Eric's comment, it seems that I need change user to send request to apache using https, and then I need config redirect on apache to django. then django will

Re: how to make https work in django REST framework

2014-02-13 Thread zhenwu he
Thanks Eric for your help. Basically, user has to send REST API to apache using https, and then apache redirect this call to django using http. Should I config anything on django besides configuration redirect on apache. Based on what you are saying, I do not need config anything on django sid

Re: how to make https work in django REST framework

2014-02-13 Thread Luca Corti
Il 2014-02-13 06:16 zhenwu he ha scritto: Thanks for your help, Luca. Could you elaborate a little bit? I am kind of new to this kind of thing. What I am doing is that, I am using django to redirect all url calls to python API to handle something and then return as response. you want me to redir

Re: how to make https work in django REST framework

2014-02-13 Thread Erik Cederstrand
Den 13/02/2014 kl. 06.16 skrev zhenwu he : > > Thanks for your help, Luca. > > Could you elaborate a little bit? I am kind of new to this kind of thing. > What I am doing is that, I am using django to redirect all url calls to > python API to handle something and then return as response. you

Re: how to make https work in django REST framework

2014-02-12 Thread zhenwu he
Thanks for your help, Luca. Could you elaborate a little bit? I am kind of new to this kind of thing. What I am doing is that, I am using django to redirect all url calls to python API to handle something and then return as response. you want me to redirect this http call to where? and where

Re: how to make https work in django REST framework

2014-02-11 Thread Luca Corti
On 12/feb/2014, at 00:36, zhenwu he wrote: > Currently I am using Python Django as my REST framework and it could take all > the calls through http. If I want to switch from http to https, what should I > do to make this work? Just issue a redirect to the equivalent HTTPS url from your web serv

how to make https work in django REST framework

2014-02-11 Thread zhenwu he
Hi, There: Currently I am using Python Django as my REST framework and it could take all the calls through http. If I want to switch from http to https, what should I do to make this work? thanks in advance. /zhenwu -- You received this message because you are subscribed to the Google Grou

Re: Geo support with Django Rest Framework

2013-10-21 Thread Sanjay Bhangar
Hi Rok, Thank you so much for the reply and code snippets. I think I managed to implement the stuff I needed using the hooks provided by Django-Rest-Framework -- not 100% sure why I picked that over Tastypie for this, but its treating me well, so I'll stick to it .. Since we're sh

Re: Geo support with Django Rest Framework

2013-10-21 Thread Sanjay Bhangar
Hey Tom, On Mon, Oct 21, 2013 at 1:50 PM, Tom Christie wrote: > Hi Sanjay, > > I would take a look at these two repos: > > https://github.com/dmeehan/django-rest-framework-gis > https://github.com/mjumbewu/django-rest-framework-gis > This is EXACTLY what I was looking for.

Re: Geo support with Django Rest Framework

2013-10-21 Thread rok
t; > Hi all, > > I'm developing an app using GeoDjango that requires me to create an > API. Ideally, I would output GeoJSON at various API end-points and > support a few geo-queries like "within bounding box", etc. > > I have done something similar before without Dj

Re: Geo support with Django Rest Framework

2013-10-21 Thread Tom Christie
Hi Sanjay, I would take a look at these two repos: https://github.com/dmeehan/django-rest-framework-gis https://github.com/mjumbewu/django-rest-framework-gis You might also try searching the REST framework issue list as it's likely either or both of these were at some point discussed

Geo support with Django Rest Framework

2013-10-20 Thread Sanjay Bhangar
Hi all, I'm developing an app using GeoDjango that requires me to create an API. Ideally, I would output GeoJSON at various API end-points and support a few geo-queries like "within bounding box", etc. I have done something similar before without Django Rest Framework and just

Re: ANN: Django REST framework 2 released.

2012-10-30 Thread Nikolas Stevenson-Molnar
+1 On 10/30/2012 9:55 AM, Mário Neto wrote: > Amazing! Good work! :) > > 2012/10/30 Tom Christie <mailto:christie@gmail.com>> > > Hi all, > > I'm incredibly pleased to announce the release of Django REST > framework 2. > > REST fra

Re: ANN: Django REST framework 2 released.

2012-10-30 Thread Mário Neto
Amazing! Good work! :) 2012/10/30 Tom Christie > Hi all, > > I'm incredibly pleased to announce the release of Django REST framework 2. > > REST framework 2 is a comprehensive reworking of the original project. > Because this is a major re-design, rather than an incre

ANN: Django REST framework 2 released.

2012-10-30 Thread Tom Christie
Hi all, I'm incredibly pleased to announce the release of Django REST framework 2. REST framework 2 is a comprehensive reworking of the original project. Because this is a major re-design, rather than an incremental release, we've skipped 1.x entirely, and called this version 2. S

Re: Django REST

2012-03-04 Thread Piotr Zalewa
On 03/04/12 20:06, Daniel Hilton wrote: On 4 March 2012 18:35, Jani Tiainen wrote: I've been very happy with django-rest-framework. I think there exists at least django-piston to do the same. The other one to look at is django-tastypie - I've used it twice now in anger and been re

Re: Django REST

2012-03-04 Thread Mo Mughrabi
I recommend django-piston, we've been using it and it's great and highly capable On Sun, Mar 4, 2012 at 9:13 PM, Bharath Mundlapudi wrote: > Dear Django Users and Authors, > > I am wondering if there are any best practices or better way to write REST > based apps on top of Django. I was using ver

<    1   2   3   4   5   >