Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Django NoReverseMatch -Reverse for 'index' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
I wand to render simple view, but not it working. "NoReverseMatch at /biobeta/ Reverse for 'index' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []" This is the urls.py under project directory. from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^biobeta/', include('biobeta.urls', namespace='biobeta', app_name='biobeta')), ] This is the views.py under app directory. from django.shortcuts import render, get_object_or_404 from .models import Category, MoleculeData, UserMolecule def index(request): """ Main index page. """ molecules = MoleculeData.objects.all() return render(request, 'index.html', {'molecules': molecules}) This is the urls.py under app directory. from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.index, name='index'), ] Finally, This is the template where my context is placed. {% extends "base.html" %} {% block title %}Welcome to ChemDB{% endblock %} {% block head %} {% load staticfiles %} {{ block.super }} {% endblock %} {% block content %} <div> Our DataBase has {{ molecules|length }} </div> {% endblock %} {% block body %} {% load staticfiles %} {{ block.super }} {% endblock %} What is the problem?? Please give me some advice . Thank you! -
Upload image file in Django REST framework with angularJS
I'm currently uploading images through an API created by with Django REST framework with angularJS. However, the problem is that it is stored as a media file but not stored in a database. Here is my ViewSet code. # views.py import time from rest_framework import viewsets from rest_framework.permissions import IsAdminUser from django.contrib.auth import get_user_model from .serializers import UserSerializer class UserViewSet(viewsets.ModelViewSet): permission_classes = (IsAdminUser,) serializer_class = UserSerializer queryset = get_user_model() def perform_update(self, serializer): serializer.save(profile_image=self.request.data.get('file')) But, when I added the code time.sleep(1) before serializer.save() function, it was mysteriously saved to the database successfully. def perform_update(self, serializer): time.sleep(1) # Delay 1s serializer.save(profile_image=self.request.data.get('file')) Why does this happen? I don't know if it would help, so I attached the angularjs code. .service('fileUpload', ['$http', function ($http) { this.uploadFileToUrl = function(file, uploadUrl){ var fd = new FormData(); fd.append('file', file); return $http.patch(uploadUrl, fd, { transformRequest: angular.identity, headers: {'Content-Type': undefined} }) } }]) -
How can I filter a Django child foreign key field?
So I've got the following models: SuggestedArticle: linked_article = models.ForeignKey('Article', blank=True, null=True, db_constraint=False) ... more fields which aren't relevant to this question ... Article: title=models.CharField(max_length=60) draft_state=models.BooleanField(default=True) ... More fields which aren't relevant to this questions ... In the article model there is a field, draft_state, which allows me to change the state of an article to published, draft, blocked (1, 2, 3). I'm fetching all the SuggestedArticle's and am wanting to filter the Foreignkey article's to make sure there draft_state === 1. Here is what I have at the moment with some pseudo code inside to what I think the bit of code to achieve this may look like: suggested_article = SuggestedArticle.objects\ .filter( is_active=1, Article.draft_state=1, # Something like this?! <~~~~~ state__in=[state, 'ALL'], )\ Am I able to do this with django? -
'create()' must be implemented
I'm quite new to Django and I'm using Apache Cassandra as my database. There's this one error I have when sending a form using jquery ajax. NotImplementedError at /chatdata/ create() must be implemented. Here's my serializers.py from rest_framework import serializers from .models import Chat import uuid from django.utils import timezone class ChatSerializer(serializers.Serializer): room_id = serializers.UUIDField() username = serializers.CharField() mac = serializers.CharField() message = serializers.CharField() created_at = serializers.UUIDField(default=uuid.uuid1()) ts_created = serializers.DateTimeField(default=timezone.now()) class Meta: fields = '__all__' and here's my views.py from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from .models import Chat, Bulletin from .serializers import ChatSerializer, BulletinSerializer class ChatList(APIView): @csrf_exempt def get(self, request): chats = Chat.objects(Chat.room_id == "bbbcb63c-027e-427b-a6e5-b575a79de797").order_by("-created_at") serializer = ChatSerializer(chats, many=True) return Response(serializer.data) @csrf_exempt def post(self, request): serializer = ChatSerializer(data=request.data) if serializer.is_valid(): serializer.save() return Response(serializer.data, status=status.HTTP_201_CREATED) return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) lastly, my jquery to send the form: $(document).ready(function () { $('#formchat').on('submit', function(e) { e.preventDefault(); $.ajax({ url : $(this).attr('action') || window.location.pathname, type: "POST", header: { 'Access-Control-Allow-Origin': '*' }, data: $(this).serialize(), dataType: 'json', success: function (data) { $("#chatinput").val(''); }, error: function (jXHR, textStatus, errorThrown) { alert(errorThrown); } }); }); }); -
What files/directories belong in a django repo?
So I have been working with a Django tutorial on a Windows Machine and now I'm trying to push that code onto Github. This is what my upper level directories look like: Envs/ myproject/ Include/ ... Lib/ ... Scripts/ ... tcl/ ... pip-selfcheck.json mysite/ polls/ ... mysite/ ... db.sqlite3 manage.py What directories should I be adding to the repo so that I could pull the repo from another Django-installed machine and be able to run the code? Which directory should be the root for my repo? -
form.is_valid is not validating
I'm trying to make register possible on the homepage (register box appears onclick), so I don't have a seperate URL to handle registration. I'm trying to send the form through get_context_data, however it's not working. Here's my code: forms.py class UserRegistrationForm(forms.ModelForm): password = forms.CharField(widget=forms.PasswordInput) confirm_password = forms.CharField(widget=forms.PasswordInput) class Meta: model = User fields = [ 'username', 'password', 'confirm_password', ] views.py class BoxesView(ListView): template_name = 'polls.html' def get_context_data(self): context = super(BoxesView, self).get_context_data() # login form = UserRegistrationForm(self.request.POST or None) context['form'] = form if form.is_valid(): username = form.cleaned_data['username'] password = form.cleaned_data['password'] user = User.objects.create_user(username, password) user.save() return redirect('/') return context return context def get_queryset(self): pass base.html <form action="" enctype="multipart/form-data" method="post">{% csrf_token %} <div class="registerBox"> {{ form.username }} {{ form.password }} <input type="submit" value="register"/> </div> </form> The fields show up but after submitting the form it doesn't create a User because my form.is_valid is False. Any idea? -
Migrating to ArrayField in django
I have created a basic model in django: class MenuItems(models.Model): name = models.CharField(max_length=50) description = models.CharField(max_length=500, blank=True, null=True) I am trying to introduce a new field in the model by the name of tags. It is an array field, after its addition the model is modified as: class MenuItems(models.Model): name = models.CharField(max_length=50) description = models.CharField(max_length=500, blank=True, null=True) tags = ArrayField(models.CharField(max_length=255), blank=True, null=True, size=255) On running the migration commands: python manage.py makemigrations pytohn manage.py migrate On running these commands I am getting the error: Operations to perform: Apply all migrations: admin, auth, contenttypes, ratatouille, sessions Running migrations: Applying ratatouille.0010_menuitems_tags...Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 367, in execute_from_command_line utility.execute() File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line 359, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:\Python27\lib\site-packages\django\core\management\base.py", line 294, in run_from_argv self.execute(*args, **cmd_options) File "C:\Python27\lib\site-packages\django\core\management\base.py", line 345, in execute output = self.handle(*args, **options) File "C:\Python27\lib\site-packages\django\core\management\commands\migrate.py", line 204, in handle fake_initial=fake_initial, File "C:\Python27\lib\site-packages\django\db\migrations\executor.py", line 115, in migrate state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial) File "C:\Python27\lib\site-packages\django\db\migrations\executor.py", line 145, in _migrate_all_forwards state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial) File "C:\Python27\lib\site-packages\django\db\migrations\executor.py", line 244, in apply_migration state = migration.apply(state, schema_editor) File "C:\Python27\lib\site-packages\django\db\migrations\migration.py", line 129, in apply operation.database_forwards(self.app_label, schema_editor, old_state, project_state) File "C:\Python27\lib\site-packages\django\db\migrations\operations\fields.py", line 84, in database_forwards field, … -
Django Help-Take Reg Number from Students & Find out their result
I want to build a simple Django app which take Registration number from students and search their result in database and find out their result.How can i do it.I can't write view.py file for this app.Plz help.I'm new in Django. models.py from django.db import models from django.utils.encoding import smart_text class ResultQuery(models.Model): name =models.CharField(max_length=150) dept_name =models.CharField(max_length=200) cgpa =models.CharField(max_length=50) reg_number =models.CharField(max_length=100) def __str__(self): return smart_text(self.name) forms.py from django import forms class ResultForm(forms.Form): Reg_No =forms.CharField(label="Registration Number") views.py from django.shortcuts import render from .forms import ResultForm from .models import ResultQuery def home(request): form=ResultForm(request.POST or None) if form.is_valid(): #How can write queryset here ? template_name="Result/home.html" context={ "form":form } return render(request,template_name,context) home.html <h1>Search Your Result</h1> <form method="POST" action=" "> {% csrf_token %} {{ form }} <input type="submit" value="Submit"/> </form> -
Django REST Framework custom permission class not working
In my attempt to troubleshoot an issue, I'm trying to force my custom permission class to return False and it's not. I'm still able to perform a successful GET and POST request via the DateListViewSet class below. I can't figure out why my custom permission class (IsUser) below isn't working Below is my custom permission class, view class and serializer. Please assist Custom Permission Class class IsUser(permissions.BasePermission): def has_permissions(self, request, view): return False Mixin and View Class class DateListMixin(object): serializer_class = SimpleDateSerializer permission_classes = (permissions.IsAuthenticated, IsUser) class DateListViewSet(DateListMixin, generics.BulkModelViewSet): def get_queryset(self): num = self.kwargs['rm'] num2 = self.kwargs['id'] r1 = Room.objects.get(pk=num) s1 = Schedule.objects.get(pk=num2) u = self.request.user.pk usr = User.objects.get(pk=u) if(s1.user.username == usr.username): queryset = r1.transactiondatetime_set.all() return queryset else: raise Http404("User does not exist") Serializer class class SimpleDateSerializer(BulkSerializerMixin, ModelSerializer, serializers.Serializer): start_dt = serializers.DateTimeField(format="%Y-%m-%d %H:%M:%S") class Meta(object): model = TransactionDateTime list_serializer_class = BulkListSerializer fields = ('pk', 'start_dt', 'room') -
Slow saving to Django database
I have created a custom manage.py command like this: from django.contrib.auth.models import User from django.core.management.base import BaseCommand from photos.models import Person class Command(BaseCommand): help = 'Pre-populate database with initial data' def _create_people(self, user): for i in range(0, 100): person = Person(first_name='FN', surname='SN', added_by=user) person.save() def handle(self, *args, **options): user = User.objects.get(username="user1") self._create_people(user) I've timed the handle() execution, it takes about 0.02 s if I don't do person.save() and about 0.1 s per Person if I do save. The database is sqlite, I believe it should be way faster. What could explain such poor performance and how can I improve it? -
make api calls from the front end
I made a django application that uses restful apis to access the database. the apis are up and look great on the django url. Now i want to use javascript on the frontend to access them. where can I find a tutorial to show me how to do this? I want to create a button that when I click it will render a picture to the screen. I want to use javascript only. meaning no help from django. This is a super simple process im sure. only I am so new to this I dont know how to go about it. I'm looking for either a solution, or an awesome tutorial to learn from. Thank you! -
Selenium from within a Django App
I am trying to create a web-scrapping tool with a Djnago app as a GUI. I have been able to get selenium up and running on my PythonAnywhere account by following the instructions on this thread . ie. When I open a python console from command line, and run my scripts it works fine. However when I try to run the exact same code from within a Django app running on PythonAnywhere I get the following error: WebDriverException: Message: The browser appears to have exited before we could connect. If you specified a log_file in the FirefoxBinary constructor, check it for details. -
Manually add files to Django's media folder and programmatically populate the database
I am trying to production-deploy a Django project for the first time. My pre-Django implementation contains quite a bit of data (thousands of images, thousands of entries in the database). I have written a custom manage.py populate_db command that parses the dump of the old database and creates the new Django database based on my models. However I am stuck with adding all the files. My initial deployment plan is to create the database locally once, sFTP-upload all images to the media folder on the server, do the same with the database and that's it. For this, I need the database to reference the image files in the media folder. As far as I understand, Django does it simply by filename. So far, I've been able to do this: def _add_image_files(self, user: str): i = 0 for f in local_files: i += 1 photo = Photo(album=1, number=i, back=False, added_by=user) from django.core.files import File photo.image.save(f.name, File(open(f.path, 'rb'))) where Photo is defined as class Photo(models.Model): album = models.IntegerField(null=True) number = models.IntegerField(null=True) image = models.ImageField(null=True, upload_to='photo_image_files') However Django obviously duplicates every file by reading and writing it to the media folder. I don't need this duplication, I only want to add a reference … -
Django Sitemap and Absolute URL
I have an issue setting up a sitemap with my models. I am getting the following error. Reverse for '5555155555' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []. I think I have to pass a slug to the location but not 100% sure how I would accomplish this task. #sitemap.py from django.contrib.sitemaps import Sitemap from django.contrib.flatpages.models import FlatPage from django.urls import reverse from phonenumbers.models import Phone class PhoneSitemap(Sitemap): changefreq = "always" priority = 0.5 def items(self): return Phone.objects.all() def location(self, obj): return reverse(obj) def lastmode(self, obj): return obj.created class FlatpageSitemap(Sitemap): changefreq = "always" priority = 0.5 def items(self): return FlatPage.objects.all() #models.py class Phone(models.Model): phone_number = models.CharField(blank=False, max_length=15) # validators should be a list name = models.CharField(max_length=50) message = models.TextField() caller = models.CharField(max_length=100, choices=CALLER_CHOICES, default="Unknown") created = models.DateTimeField(auto_now_add=True) slug = models.SlugField(max_length=250, unique=True) def save(self, *args, **kwargs): self.slug = slugify(self.phone_number) super(Phone, self).save(*args, **kwargs) def get_absolute_url(self): return reverse('phonenumbers:phone_details', args=[self.slug]) def __str__(self): return self.phone_number #urls.py from django.conf.urls import url, include from django.contrib import admin from django.contrib.flatpages import views from django.contrib.sitemaps.views import sitemap from .sitemap import PhoneSitemap, FlatpageSitemap from info.views import home sitemaps = { 'posts': PhoneSitemap, 'pages': FlatpageSitemap, } urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', home, name="home"), url(r'^privacy-policy/$', views.flatpage, … -
Django urls dispatcher error (urls.E004) Ensure that urlpatterns is a list of url() instances
I'm trying to add internationalization into my Django project. And wnen I add i18n_patterns() to my main urls.py I have folowing issue: ERRORS: ?: (urls.E004) Your URL pattern [<RegexURLResolver <module 'coffeebar.urls' from './coffee/coffeebar/urls.py'> (coffeebar:coffeebar) ^bar/>, <RegexURLResolver <RegexURLPattern list> (admin:admin) ^admin/>] is invalid. Ensure that urlpatterns is a list of url() instances. ./coffee/coffee/urls.py (main urls config) from django.conf.urls import include, url from django.conf.urls.i18n import i18n_patterns from django.contrib import admin urlpatterns = i18n_patterns([ url(r'^bar/', include('coffeebar.urls')), url(r'^admin/', admin.site.urls), ]) ./coffee/coffeebar/urls.py (included urls config) from django.conf.urls import url, include from django.contrib.auth import views as auth_views from . import views app_name = 'coffeebar' order = [ url(r'^$', views.order_details, name='index'), url(r'^(?P<order_id>[0-9]+)/$', views.order_details, name='details'), url(r'^add/$', views.order_add_item, name='add'), url(r'^remove/$', views.order_remove_item, name='remove'), url(r'^checkout/$', views.order_checkout, name='checkout'), url(r'^list/$', views.order_list, name='list'), ] admin = [ url(r'^$', views.admin, name='index'), url(r'^accounts/', include([ url(r'^$', views.admin_accounts, name='index'), url(r'^open/$', views.admin_accounts, {'action': 'open'}, name='open'), url(r'^close/$', views.admin_accounts, {'action': 'close'}, name='close'), ], namespace='accounts')), url(r'^orders/', include([ url(r'^$', views.admin_orders, name='index'), url(r'^update/', views.admin_orders, {'action': 'update'}, name='update'), ], namespace='orders')), url(r'^products/', include([ url(r'^$', views.admin_products, name='index'), url(r'^add/$', views.admin_products, {'action': 'add'}, name='add'), url(r'^(?P<product_id>[0-9]+)/', views.admin_products, {'action': 'edit'}, name='edit'), url(r'^(?P<product_id>[0-9]+)/toggle/$', views.admin_products, {'action': 'toggle'}, name='toggle'), url(r'^(?P<product_id>[0-9]+)/delete/$', views.admin_products, {'action': 'delete'}, name='delete'), ], namespace='products')), ] urlpatterns = [ url(r'^$', views.index, name='index'), url(r'order/', include(order, namespace='order')), url(r'admin/', include(admin, namespace='admin')), # django auth url(r'^login/$', auth_views.login, … -
Create View for Model With Foreign Key Django
I am trying to implement a create functionality for the Entry model shown below. I currently have a list of Project entries on my page and have a button next to each. How could I make it so this button takes me to a screen that will allow me to create an Entry? It would be neat if I could have 3 buttons instead for each type of container within the Entry model and clicking an appropriate button would automatically populate the proper container type. Here are the models: class Project(models.Model): project_title = models.CharField(max_length=200) project_description = models.CharField(max_length=200, default="") created_date = models.DateTimeField('date created') owner = models.ForeignKey(User) def __str__(self): return self.project_title class Entry(models.Model): project = models.ForeignKey('Project', on_delete=models.CASCADE, default=1) title = models.CharField(max_length=200) REFERENCE = 'reference' BACKBURNER = 'backburner-item' ACTION_STEP = 'action-step' CONTAINER_CHOICES = ( (REFERENCE, 'Reference'), (BACKBURNER, 'Backburner'), (ACTION_STEP, 'Action'), ) container = models.CharField(max_length=200, choices=CONTAINER_CHOICES, default=ACTION_STEP) def __str__(self): return self.title Appropriate views: class ActionCreateView(generic.edit.CreateView): model = Entry fields = ['title','container'] template_name = 'steps/entry-create.html' success_url = reverse_lazy('steps:index') class IndexView(LoggedInMixin, ProjectOwnerMixin, generic.ListView): template_name = 'steps/index.html' context_object_name = 'project_list' Lastly, my template looks like this: {% if project_list %} <div class="container"> <div class="row"> <a href="{% url 'steps:project-create' %}" class="btn btn-outline-info btn-sm">New Project</a> </div> <br> <ul class="list-group"> … -
Slicing in Django Template
I've a list ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']. In my django templates, I want the output as a b c d e f g h This is what I'm doing:- {% for i in list|slice:"::2" %} {{i}} {{}} // how do I get the second element? {% endfor %} What am I missing? -
Modifying Standard Authentication Templates Django
I am trying to modify the standard Login and Logout templates provided by Django. My understanding is that I need to copy the standard ones from somewhere, include them in the /templates directory and then add that path to the settings.py. However, I am lost in the details. Here is the urls.py of the project: app_name = 'action' urlpatterns = [ url(r'^steps/', include('steps.urls')), url(r'^admin/', admin.site.urls), url(r'^login/$', login, name='login'), url(r'^logout/$', logout, name='logout'), ] -
Getting Bad Request (400) error on Heroku
I have two Django apps created on Heroku. Staging app is setup with Git and auto deploy enabled. The app is working fine on staging site but after promoting latest commit into production app I am getting "Bad Request (400)". I have tried with ALLOWED_HOSTS = [] also ALLOWED_HOSTS = ['*'] and ALLOWED_HOSTS = [".herokuapp.com", ".example.com"] but nothing worked! Looking for some expert advice on this. -
SVG files Aren't Loading in my django admin on development server
I'm using Django 1.8 version, svg icons for admin is working perfectly on my local server, but on development server they are not loading and i got this error: -
django-pyodbc-azure is checking version on every request
Issue on GitHub: https://github.com/michiya/django-pyodbc-azure/issues/80 Every time a request is made, the django-pyodbc-azure backend is checking for the SQL version, resulting in a lot of additional latency. Is this the expected behavior? Is there a way to prevent it, or set the version ahead of time? -
Python encoding - error: 'latin-1' codec can't encode character
In my snippet below, I'm process a string of text thats: Déclaration.png I return the description as unicode: return self.render_json(request, {..."description": u''.join((instance.description)),..}) In another function, I use the description above as follows: if document.description: file_name = document.description.split(".") file_name = "{}.{}.{}".format( "_".join(file_name[:-1]), str(document.id), file_name[-1] ) file_name is: [u'De\u0301claration', u'png'] When I try .format() on file_name I get the following error: error: 'latin-1' codec can't encode character u'\u0301' in position 2: ordinal not in range(256) Any ideas? -
Can't take the list of users that belong to a group to the html form
I will really need your help over here. I think I have read all the relevant responses to my problem but I cannot figure out how it works. I would like to choose from the html form in django some users that belong to a specific group. I created my model "Task", which is below: class Task(models.Model): Taskdetails = models.CharField(max_length=500, null=True) asset = models.ForeignKey('Asset', null=True) failure = models.ForeignKey('Failure', null=True) Created_task_date = models.DateTimeField(default=timezone.now, null=True) employee = models.ForeignKey("auth.User", null = True) def __str__(self): return str(self.id) The django form is: class TaskForm (ModelForm): class Meta: model = Task fields = ('Taskdetails', 'asset', 'failure', 'employee',) The view is: def task_new(request): if request.method == "POST": task_form = TaskForm(request.POST) subtask_form=SubtaskForm(request.POST) task_form.employee = User.objects.filter(groups__name='supervisor') if task_form.is_valid() and subtask_form.is_valid(): task = task_form.save() subtask = subtask_form.save(commit=False) task.Created_task_date = timezone.now() task_form.employee = User.objects.filter(groups__name='supervisor') task.save() subtask.task=task subtask.Created_subtask_date = timezone.now() subtask.save() return redirect('great_job') else: task_form = TaskForm() subtask_form = SubtaskForm() return render(request, 'TaskTrace/task_new.html', {'task_form': task_form, 'subtask_form':subtask_form}) And the relative html is {% block content %} <div> <h1>New Task</h1> <form method="POST" class="task-form"> {% csrf_token %} Equipment with failure: {{ task_form.asset }}<br><br> Failure Description: {{ task_form.failure }} <br><br> Task Details: {{ task_form.Taskdetails }} <br><br> Employee: {{ task_form.employee }} <button type="submit" class="save btn btn-default">Open</button> </form> … -
How to get xml format in Django Rest Framework
I'm trying to get xml format in Django Rest FrameWork,I tried the tutorial provided by Django Rest Framework, I'm new to django, I did the following. urls.py from django.conf.urls import url from django.contrib import admin from books.views import * from users.views import * from rest_framework.urlpatterns import format_suffix_patterns urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^books/all/$', all_books), url(r'^user/', get_user) ] urlpatterns = format_suffix_patterns(urlpatterns, allowed=['json', 'html','xml']) views.py from rest_framework.response import Response from rest_framework.decorators import api_view from books.serializers import * from books.models import * # Create your views here. @api_view(['GET']) def all_books(request): books = Book.objects.all() serializers = BookSerializer(books,many=True) return Response(serializers.data) the tutorial link http://www.django-rest-framework.org/api-guide/format-suffixes/ -
How to post a tweet using django and python-social-auth
I'm new using django and APIs, so I hope you can help me. I'm using python-social-auth to get access to user's twitter, but right now I just finished this tutorial tutorial for oauth I would like to know what should I do to be able to post a tweet. Thank you guys.