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
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
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
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
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
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:
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,
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"
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
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
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
11 matches
Mail list logo