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 %} {% block content

Best way to consume the own API to serve both a frontend for non API users and pure API access?

2015-11-11 Thread lnzy35en
Hi guys,   Following the API first mindset I created my first API with Django rest-framework. Using generic-views helps a lot and makes that a piece of cake, especially with the support of the community.   The challenge is now to create a nice UI for the API. Normally I would create the

Searching for the best way to provide temporary access on resources for non-registered users with the rest-framework

2015-11-11 Thread lnzy35en
  Hi,   At the moment I am trying to figure out the best way to provide non-authenticated and non-registered users temporary (read and update) access to objects.   The first Idea I had was storing a token = models.CharField(max_length=64,unique=True) for every instance of the model which I

Aw: Re: Django-Restframework adding and accessing a user to a model / adding an owner?

2015-11-09 Thread lnzy35en
Hi Xavier,   You are an angel! Thank you very much, the link to the API helped so much   Best Regards, Mike   Gesendet: Sonntag, 08. November 2015 um 08:43 Uhr Von: "Xavier Ordoquy" An: django-users@googlegroups.com Betreff: Re: Django-Restframework adding and

Aw: Re: How to make database queries that “filters” results according to tuples of values?

2014-11-26 Thread lnzy35en
Hi Vijay,   thank you very much. I have not known, that |= also could be used on Q(). Thought Q is only there for making "or" "not" and so stuff of calls! Great!   Best Regards, Mike   Gesendet: Mittwoch, 26. November 2014 um 20:30 Uhr Von: "Vijay Khemlani" An: 

How to make database queries that “filters” results according to tuples of values?

2014-11-26 Thread lnzy35en
Hi, let’s assume I have the following model:   class Ingredient(models.Model):     ingredient= models.CharField(max_length=255) class Dish(models.Model):     BREAKFAST = 'bf'     LUNCH = 'l'     DINNER = 'D'     DISH_CHOICES = (     (BREAKFAST, 'Breakfast'),     (LUNCH,

Aw: Re: Beginner: ManyToManyFields error creating the model / adding values by the Admin Module or the Shell

2014-11-06 Thread lnzy35en
  Hey Erik,   you are total right. the __str__ method was chausing the error! Thank you so much! Now I can try to make progress!   I very much appreached your help! Best Regards, Mike   Gesendet: Mittwoch, 05. November 2014 um 11:06 Uhr Von: "Erik Cederstrand"

Aw: Re: Beginner: ManyToManyFields error creating the model / adding values by the Admin Module or the Shell

2014-11-04 Thread lnzy35en
  Hi Erik,   the idea was, that one Author can write in more than one language (eg. en and de), or no one at all. This was the background to use the ManyToManyField.  But the "error" Message must have an other reason?   Best Regards, Mike Gesendet: Dienstag, 04. November 2014 um 22:42 Uhr

Beginner: ManyToManyFields error creating the model / adding values by the Admin Module or the Shell

2014-11-04 Thread lnzy35en
Hi, Sorry, via the admin interface (Web-GUI) I have inserted the following values: My Actions en Language mike.test // t...@test.de User   Dan Brown Author   If I now try to add an Interest (“Dan Brown” and “en”) via the GUI selection I get: TypeError at

Beginner: ManyToManyFields error creating the model / adding values by the Admin Module or the Shell

2014-11-04 Thread lnzy35en
Hi, Unfortunately I have not found any Intel at the django documentation, in the Getting Started With Django book or the Two Scoops of Django book.  So I hope someone in the community will sacrifice his nerves and time, and gives me a hint / explanation of my misunderstanding.   I have the