Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
why the form elements are not loading in popup modal form
I am building the subscribe form with valid name and email in django using bootstrap3,but my elements from form are not loading in popup,empty pop is showing.here is that form. here is my urls.py from django.urls import path from . import views from django.conf import settings from django.conf.urls.static import static app_name='basic' urlpatterns = [ path('index',views.index,name='index'), path('subscribe/',views.Subscribeview.as_view(),name='subscribe'), ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) views.py from django.shortcuts import render, get_object_or_404 from django.http import HttpResponse, HttpResponseNotFound from .models import * from django.http import HttpResponseRedirect from django.contrib import messages from django.urls import reverse_lazy from django.views import generic from .forms import * from django.views.generic import CreateView class Subscribeview(CreateView): form_class = SubsriberForm template_name="subscribe/suscribe.html" success_message = "successfully subscribed !!" success_url = reverse_lazy('basic:index') def index(request): return render(request, 'subscribe/index.html') index.html <!DOCTYPE html> <html> <head> <title></title> {% load static%} <link rel="stylesheet" type="text/css" href="{% static 'subscribe/css/style.css' %}"> <link rel="stylesheet" type="text/css" href="{% static 'subscribe/css/bootstrap.css' %}"> <link rel="stylesheet" type="text/css" href="{% static 'subscribe/css/font-awesome.min.css' %} "> {% block scripts %} <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <script type="text/javascript" src="{% static 'subscribe/js/frontend.js' %}"></script> <script type="text/javascript" src="{% static 'subscribe/js/modals.js' %}"></script> <!-- You can alternatively load the minified version --> <!-- <script src="{% static 'subscribe/js/jquery.bootstrap.modal.forms.js' %}"></script> --> <!-- <script src="{% static 'subscribe/js/bootstrap.bundle.js' %}"></script> <script src="{% static 'subscribe/js/bootstrap.js' … -
Django ORM FieldError in query of some calculation
This is my model for Purchase: class Purchase(models.Model): amount = models.DecimalField( max_digits=6, decimal_places=2, default=0.00 ) entry_by = models.ForeignKey( User, on_delete=models.SET_NULL, related_name='ledger_entry_by', ) and this is my model of Consume: class Consume(models.Model): amount = models.FloatField(default=1) consumed_by = models.ForeignKey( User, on_delete=models.SET_NULL, related_name='consume_entry_for', ) I am trying to find out user who how much consumed more than he purchases and who how much consumed less than he purchases this is my query for this: purchase_vs_consume = User.objects.annotate( purchase_vs_consume=Coalesce(Sum('ledger_entry_for__amount'), Value(0)) - Coalesce(Sum('consume_entry_for__amount'), Value(0)) ) It throws following error: Expression contains mixed types: DecimalField, FloatField. You must set output_field later my query was it: purchase_vs_consume = User.objects.annotate( purchase_vs_consume=Coalesce(Sum('ledger_entry_for__amount'), Value(0)) - Coalesce(Sum('consume_entry_for__amount'), Value(0)), output_field=FloatField() ) it throws the following error: QuerySet.annotate() received non-expression(s): <django.db.models.fields.FloatField>. I am not getting what's wrong with this. I want: for example, A user Purchased 500 USD and he consumed 550 USD, that is mean, he needs to pay another 50 USD another user purchased 440 USD but he consumed 400 USD, that is mean, you will get refund 40 USD. another user example can be: a user didn't purchase anything but he consumed 300 USD, so he needs to pay 300 USD I am trying to achieve above this calculation but … -
How can I integrate Agora in my Django Project?
I never used agora before, I went through agora doc, there I didn't find How to add agora APIs in the python project. anyone who has done work on Django and agora, please let me know how to do? -
Create Frontend Django client for Dialogflow Tutorial No Input Text
I've been following the tutorial on https://github.com/priyankavergadia/Django-Dialogflow-Appointment-Scheduler, but I'm experiencing a problem where I can't find the input textbox. Can anyone see why this may be the case? -
How to Implement Video streaming on my Website?
I need to implement Video streaming in my Website. I Preferer using Djnago for Back-end and React.js is using for front-end. Database is postgres. -
django.db.utils.OperationalError: foreign key mismatch - "orders_suborder" referencing "orders_sub"
I have a parent class Sub (concrete) and a child class SubOrder. One Sub can "have" (i.e. be in ) many SubOrders and one SubOrder can "have" (contain) many Subs. Now when I try to create a Sub-object, I get the error: django.db.utils.OperationalError: foreign key mismatch - "orders_suborder" referencing "orders_sub" What's the issue here? Do I need to use ManyToManyField (if so, why and where?) and why am I getting this error? These are my classes in models.py: class Sub(Dish): dish = models.OneToOneField(Dish, on_delete=models.CASCADE, related_name="dish_id_sub", parent_link=True) def __str__(self): return f"{self.name}, Price: ${self.price}" class SubOrder(Sub): sub_id = models.ForeignKey(Sub, related_name="sub_id", parent_link=True) item_id = models.ForeignKey(Item, on_delete=models.CASCADE, primary_key=True, related_name="sub_item_id") extra_count = models.IntegerField(default=0, validators=[MaxValueValidator(4), MinValueValidator(0)]) MUSHIES = 'M' PEPPERS = 'P' ONIONS = 'O' XTRCHEESE = 'C' EXTRA_CHOICES = ((MUSHIES, 'Mushrooms'), (PEPPERS, 'Peppers'), (ONIONS, 'Onions'), (XTRCHEESE, 'Extra Cheese'),) extra_1 = models.CharField(max_length=1, choices=EXTRA_CHOICES, blank=True) extra_2 = models.CharField(max_length=1, choices=EXTRA_CHOICES, blank=True) extra_3 = models.CharField(max_length=1, choices=EXTRA_CHOICES, blank=True) extra_4 = models.CharField(max_length=1, choices=EXTRA_CHOICES, blank=True) def __str__(self): extras = [] for i in range(extra_count): str = "extra_"+i extras.append(str) return f"Sub Order: Item {self.item_id}, {self.name}, size: {self.size}. {self.extra_count} Extras: {extras}" If it matters, here's the Sub's parent class Dish, but I don't think that's the issue: class Dish(models.Model): PIZZA = 'PIZZA' SUB = … -
Django - Saving in multiple models from single API
I have two models, "Blog_model" and "File_model" where "blog_id" of "Blog_model" is the foreign key for "File_Model". The concept is to save multiple files for a single blog. Here is the model structure for reference. class Blog_model(models.Model): type = models.CharField(max_length = 50, default = "FOOD") count = models.PositiveIntegerField(default = 0) title = models.CharField(max_length = 500, unique = True) substance = models.CharField(max_length = 5000, default = "") thumbnail = models.ImageField(upload_to = get_media_file_name, default = "") text = models.TextField() create_time = models.DateTimeField(auto_now_add = True) update_time = models.DateTimeField(auto_now = True) class File_model(models.Model): blog_id = models.ForeignKey(Blog_model, on_delete = models.CASCADE) file_name = models.FileField(upload_to = get_media_file_name) upload_time = models.DateTimeField(auto_now_add = True) def __str__(self): return str(self.file_name) Now, I want to create a new blog using a single API that will have details of blogs, as well as file names. I am imagining the API structure something like - { "type": "FOOD", "title": "Some Blog", "Substance": "Some blog about food", "text": "This is some blog about food", "thumbnail": <InMemoryUploadedFile: Capture.PNG (image/png)> "files": [<InMemoryUploadedFile: food1.jpg (image/jpeg)>, <InMemoryUploadedFile: food2.jpg (image/jpeg)>, <InMemoryUploadedFile: food3.jpg (image/jpeg)>] } Please suggest how to achieve the goal. You may suggest a correct API structure also if above mentioned seems to be wrong. Any suggestion is appreciated. … -
__init__() got an unexpected keyword argument 'allow_null'
I ran into this error in drf. This came when i added it to date and gender field in my model here is my models.py class Users(AbstractBaseUser, PermissionsMixin): username = models.CharField(max_length = 100, blank = True, unique=True) email = models.EmailField(max_length = 100, blank=False) first_name = models.CharField(max_length = 100, blank = False) last_name = models.CharField(max_length = 100, default='',blank=True) dob = models.DateField(allow_null=True, blank=True) gender = models.CharField(null=True,max_length = 10,blank=True) class Meta: indexes = [models.Index(fields=["first_name"])] USERNAME_FIELD = "username" EMAIL_FIELD = "email" REQUIRED_FIELDS = ["first_name"] objects = UserManager() def get_absolute_url(self): return "/users/%i/" % (self.pk) I wanted to give null values to dob and gender while registering user. -
Create authentication system for model other than User in Django
I have a model called Company. I want to add the functionalities of User model such as password field and register and login for that Company model. I know to extend built-in User model for the purposes of User model. How can I get the similar authentication and other User model functionalities to the Company model in Django? -
Unique Integer Field and offset when replaced Django Models
Simply put I want to make a model in Django which will be priority = IntegerField(unique=True) class Meta: ordering = ['priority'] to make the item have a number priority and then have it order by the priority but here is the issue. I want to be able to put in a new value for #1 priority and push all the other down so 1 becomes two and 2 becomes 3 and so on, for any number I replace priority wise. Is there an easy way to do this? Any Django tips for this? If not where I get started to do this? -
django update() must be implemented
I am a beginner to python/django and trying to update a record. Here's url.py: path('scheme/<int:pk>/', ProjectSchemeDetail.as_view(), name='schemedetail'), And view: class ProjectSchemeDetail(APIView): def get_object(self, pk): try: return ProjectScheme.objects.get(pk=pk) except ProjectScheme.DoesNotExist: raise Http404 def get(self, request, pk, format=None): scheme = self.get_object(pk) serializer = SchemeDetailSerializer(scheme) return Response(serializer.data) def put(self, request, pk, format=None): project_scheme = self.get_object(pk) serializer = ProjectSchemeInputSerializer(project_scheme, data=request.data) if serializer.is_valid(): serializer.save() return Response(serializer.data) return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) def delete(self, request, pk, format=None): scheme = self.get_object(pk) scheme.delete() return Response({'status':'Deleted'}) And serializer: class ProjectSchemeInputSerializer(serializers.Serializer): name = serializers.CharField(allow_blank=False, max_length=250) parent_scheme_id = serializers.IntegerField(validators=[validate_id]) rule = serializers.CharField(allow_blank=True, max_length=5000) When trying to PUT update a post, I get this error: NotImplementedError at /scheme/scheme/5/ `update()` must be implemented. How do I fix this? -
Multiple form submission using ajax-django
I wanted to submit multiple forms using ajax. actually I was trying to build a single page with the Name of the existing users in my DB with a option to send a friend request. so obviously the page cannot be refreshed after each request sent. I am using django. and after searching i found a way to submit a single form not multiple. this is the code. can someone help me? <form id="{{user.id}}" > {% csrf_token %} name:<input type="text" id="name{{user.id}}"><br> <input type="submit" value="Send Request"> </form> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script type='text/javascript'> $(document).on('submit','#{{user.id}}',function(e){ e.preventDefault(); $.ajax({ type:'POST', url:'', data:{ name:$('#name{{user.id}}').val(), csrfmiddlewaretoken:$('input[name=csrfmiddlewaretoken]').val() }, success:function(){ alert("this is the user id{{user.id}}") } }); }) </script> even if I pass different user id from the views..and loop through it.its still not happening. Thanks -
django how do I add fields in the UserCreationForm class?
I am trying to add fields to my UserCreationForm fields = ["username", "email", "password1", "password2"] works fine but when try to add field, I get fields = ["username", "email", "password1", "password2", "first_name", "last_name", "date_of_birth"] I get Exception Value: Unknown field(s) (date_of_birth) specified for User How do I add fields to UserCreationForm class? $ cat register/forms.py from django import forms from django.contrib.auth import login, authenticate from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User class RegisterFrom(UserCreationForm): email = forms.EmailField() class Meta: model = User fields = ["username", "email", "password1", "password2", "first_name", "last_name", "date_of_birth"] $ cat register/views.py from django.shortcuts import render, redirect from .forms import RegisterForm #from django.contrib.auth import login, authenticate #from django.contrib.auth.forms import UserCreationForm # Create your views here. def register(response): if response.method == "POST": form = RegisterForm(response.POST) if form.is_valid(): form.save() return redirect("/home") else: form = RegisterForm() return render(response, "register/register.html", {"form":form}) $ cat register/templates/register/register.html {% extends 'userdash/base.html' %} {% block title %} Registration page {% endblock %} {% block content %} <h3>Register Page</h3> <form method="POST" class="form-group"> {% csrf_token %} {{form}} <button type="submit" class="btn btn-success">Register</button> </form> {% endblock %} error: FieldError at /register/ Unknown field(s) (date_of_birth) specified for User Request Method: GET Request URL: http://192.168.42.14:8081/register/ Django Version: 3.0.5 Exception Type: FieldError Exception Value: … -
Las claves que generadas en el formato que brinda import uuid
¿Se puede transformar en algo legible las claves que generadas en el formato que brinda import uuid? enter image description here -
how to find IDs of forms generated by Allauth
I'm writing tests for my django site and am wanting to select the login form generated by allauth using something like: login_form = self.browser.find_element_by_id('login_form') but I don't know how to find its class/id or any other way to select it. I'm asking not so much for the answer to this specific question, but more asking how I can find the id's of things generated by allauth and similar packages so I can write tests for them in the future. Thank you. -
How do I fix Attributes not shown correctly in the Django Notes
I have made notes (which is supposed to include the size) added to orderitems class which derived from variation to an Item class in models.py and I think i got the template syntax right for one part but there is problem that appeared in the HTML value, i am doubting the views.py might have something wrong but I can't figure it out. I have also attached the part which is not correct showing in the checkout page Here is the model class Item(models.Model): title = models.CharField(max_length=100) description = models.TextField() price = models.FloatField() slug = models.SlugField(unique=True) image = models.ImageField(blank=False, upload_to='approved designs') def __str__(self): return self.title class Meta: unique_together = ('title', 'slug') class Variation(models.Model): item = models.ForeignKey(Item, on_delete=models.CASCADE) title = models.CharField(max_length=120) image = models.ImageField(null=True, blank=True) price = models.FloatField(null=True, blank=True) def __str__(self): return self.title class OrderItem(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) ordered = models.BooleanField(default=False) item = models.ForeignKey(Item, on_delete=models.CASCADE) quantity = models.IntegerField(default=1) notes = models.TextField(null=True, blank=True) def __str__(self): return f"{self.quantity} of {self.item.title}" and here is the template {% if item.variation_set.all %} {% if item.variation_set.sizes%} <select class='form-control' name='size' style="margin-bottom:20 px"> {% for item in item.variation_set.sizes %} <option value="{{item.title|capfirst}}">{{item.title|capfirst}}</option> {% endfor %} </select> {% endif %} {% endif %} the views is the part which I am … -
my tag isn't working with my if statement in my template
So I am trying to display a badge notifier on my inbox only if I have > 0 messages. For some reason, my if statement isn't working. I'm not sure if it's a syntax issue or if my logic is wrong. I am returning a count of my messages, which is displaying and working correctly. I simple want to run my if statement on that count. base.html/ message counter part {% if unread_messages > 0 %} <li> <a ref = 'stylesheet' href="{% url 'dating_app:conversations' user.id %}" type="text/css" class="notification"> <span>Inbox</span> <span class="badge">{% unread_messages request.user %}</span> </a> </li> {% else %} <li> <a ref = 'stylesheet' href="{% url 'dating_app:conversations' user.id %}"> <span>Inbox</span> </a> </li> {% endif %} unread_messages_counter.py @register.simple_tag def unread_messages(user): return user.receiver.filter(viewed=False).count() -
How to make an API call with user input from Django template
I want to make a call to the Yelp API using zip code that the user inputs. I do not need to save this zip code in a database or anything, simply use it to make the call. yelp.py (the "location" parameter would be the zip code) def get_name(location): """ makes call to Yelp API and returns list of establishments within the given zip code """ restaurants = [] url = 'https://api.yelp.com/v3/businesses/search' params = { 'location': f'{location}' } headers = {'Authorization': f'Bearer {YELP_KEY}'} response = requests.get(url, params=params, headers=headers).json() for business in response['businesses']: restaurants.append(business['name']) return restaurants homepage.html <form method="POST" action="{% url 'homepage' %}"> {% csrf_token %} {{ new_zip_form }} <button type="submit">Add</button> </form> {% for city in cities %} <div> {{ city.zipCode }} </div> {% empty %} <p>There are no cities</p> {% endfor %} forms.py from django import forms class get_zip(forms.Form): zip_code = forms.CharField(required=True, label='Zip Code', max_length=5) views.py import requests from django.shortcuts import render from .forms import get_zip def homepage(request): new_zip_form = get_zip() return render(request, 'restroom_rater/homepage.html', { 'new_zip_form': new_zip_form}) models.py from django.db import models class Establishment(models.Model): name = models.CharField(max_length=200, blank=False) city = models.CharField(max_length=200, blank=False) state = models.CharField(max_length=2, blank=False) def __str__(self): return f'Establishment name: {self.name} in {self.city}, {self.state}' I feel like I have … -
How to fix pip in terminal?
Hello everyone I just started a Django tutorial today and and in order for me to follow along i had to update the version of python on my computer, sadly after updating it the pip command in the terminal no longer works, when trying to use the pip freeze command an error occurs, I have done some research on how to fix the problem but, it seems that i must have a wrong path or I might have installed something i should not have as, just starting out it would be grateful if someone could help me solve this problem so I could get back to work as soon as possible. Bellow is the error message that appears on the terminal. ERROR:root:code for hash md5 was not found. Traceback (most recent call last): File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module> globals()[__func_name] = __get_hash(__func_name) File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type md5 ERROR:root:code for hash sha1 was not found. Traceback (most recent call last): File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module> globals()[__func_name] = __get_hash(__func_name) File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor raise ValueError('unsupported hash type ' + name) ValueError: unsupported hash type sha1 ERROR:root:code … -
Django Polls Project: Reverse for 'polls.index' not found
I'm trying to finish my Django Polls Project from the Django Documentation but I ran into the "Reverse for 'polls.index' not found. 'polls.index' is not a valid view function or pattern name." error. The full error details can be seen here The following are my files. base.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous" /> <title>Pollster {% block title %}{% endblock %}</title> </head> <body> <div class="container"> <div class="row"> <div class="col-md-6 m-auto"> {% block content %}{% endblock %} </div> </div> </div> </body> </html> index.html {% extends 'base.html' %} {% block content %} <h1 class="text-center mb-3">Poll Questions</h1> {% if latest_question_list %} {% for question in latest_question_list %} <div class="card mb-3"> <div class="card-body"> <p class="lead">{{ question.question_text}}</p> <a href="{% url 'polls:detail' question.id %}" class="btb btn-primary btn-sm">Vote Now</a> <a href="{% url 'polls:results' question.id %}" class="btb btn-secondary btn-sm">Results</a> </div> </div> {% endfor %} {% else %} <p>No polls available</p> {% endif %} {% endblock %} mysite.urls from django.contrib import admin from django.urls import include, path urlpatterns = [ path('polls/', include('polls.urls')), path('admin/', admin.site.urls), ] polls.urls from django.urls import path from . import views #from ALL import views app_name = 'polls' urlpatterns = [ path('', views.index, name='index'), … -
I am trying to delete a user from the django database but there ir a IntegrityError at /admin/auth/user/ error occurs
I want to delete a user from the database that django comes with, i entered the admin site using my superuser but when i try to delete any user manually, which i created for testing purposes, it gives the error y mentioned above. These is my model from django.db import models from django.contrib.auth.models import User # Create your models here. class UserRegister(models.Model): user = models.OneToOneField(User,on_delete=models.CASCADE) first_name = models.CharField(max_length=256, default='', blank=False,) last_name = models.CharField(max_length=256, default='', blank=False) email = models.EmailField(unique=True, blank=False,default='') def __str__(self): return self.user.username This is my form from django import forms from .models import * from django.contrib.auth.models import User #Create your forms here! class UserRegisterForm(forms.ModelForm): password = forms.CharField(widget=forms.PasswordInput()) class Meta(): model = User fields = ('username','password') class UserRegisterInfoForm(forms.ModelForm): class Meta(): model = UserRegister fields = ('first_name','last_name','email') This is my view def UserRegisterFormView(request): registered = False if request.method == 'POST': userform = UserRegisterForm(data=request.POST) userinfoform = UserRegisterInfoForm(data=request.POST) if userform.is_valid() and userinfoform.is_valid(): user = userform.save() user.set_password(user.password) user.save() profile = userinfoform.save(commit=False) profile.user = user profile.save() registered = True else: print(userform.errors, userinfoform.errors) else: userform = UserRegisterForm userinfoform = UserRegisterInfoForm return render(request,'register/register.html'{'userform':userform,'userinfoform':userinfoform,'registered':registered}) -
How to deploy multi Django projects with same IIS 80 port?
I have a Django project running with IIS8 on 80 port. Now, i am going to deploy another Django projects. May i know how could i deploy multi Django projects with same IIS 80 port? -
Django : How can i set editable = False all field with empty value
How can i hide field with empty value in change view. i have groupe of permission goup1 and group 2 and group 3 group 1 : permission = can edit + can add + can view + can delete group 2 : permission = can edit + can dd group 3 permission = can view the problem is in group3 , i have empty field (file field or charfield ...) i need to hide theme to group3 so the group can see juste field with value and not the empty (se image example) i need to hide the empty field ,it's dynamic field , id'ont have the same fields always ,maybe one maybe more file field also , if no file , so they must be hiden Admin.py class AnnexeCooperationBilateraleInline(admin.StackedInline): model = Annexe extra = 1 #formset = RequiredInlineFormSet exclude =["cooperationMultilaterale",'am','calip'] class InstrumentJuridiqueDocCooperationBilateraleInline(admin.StackedInline): model = InstrumentJuridiqueDoc extra = 1 max_num = 1 #formset = RequiredInlineFormSet exclude =["cooperationMultilaterale",'am','calip'] class CooperationBilateraleAdmin(ManyToManyAdmin): fieldsets = [ ( '', { 'fields': ['paysPartenaires', 'instrumentJuridique',('partenaire','gouvernement','paysP','etat','adefinir'),'objet', 'axeCooperation'] }), ('Autres élements à rajouter ?', { 'fields': ['infoPlus', ] }), ('', { 'fields': [ 'acteJuridique',('dateSignature','dateEntreeVigueur' ),('duree','dureeplus5ans', 'renouvellement'), ('pays', 'villeSignature')] }), ('Base Documentaire', { 'fields': [], 'description': 'Joindre le(s) fichier(s) '}), … -
How to implement session idle timeout in DRF
I am using Django==2.2.7, djangorestframework==3.10.3 and django-oauth-toolkit==1.2.0. Below is the config for limiting age of access token, I want to know how can I timeout idle session from server side. I tried using django-session-timeout but it did not work. Please help. LOGIN_TOKEN_EXPIRE_SECONDS = 3600 * 24 * 365 OAUTH 2 PROVIDER OAUTH2_PROVIDER = { 'ACCESS_TOKEN_EXPIRE_SECONDS': LOGIN_TOKEN_EXPIRE_SECONDS, 'OAUTH_DELETE_EXPIRED' : True, 'OAUTH2_BACKEND_CLASS': 'oauth2_provider.oauth2_backends.JSONOAuthLibCore' } -
Which is the best route for becoming a Full Stack Developer?
I'm in a position where I can study full-time for the rest of 2020 but by 2021 I would need a job. My goal is to become a Full-Stack Developer. Although I'd be happy with just being a Back-End Developer. I'm more interested in Back-end Development than Front-end but I feel it's better to learn both because there are more opportunities for a Full-Stack Developer and more money. I recently completed the Python Bootcamp course Zero to Hero from Udemy and I just started the Python and Django Full Stack Web Developer Bootcamp which teaches HTML, CSS, Bootstrap, JavaScript, jQuery, Python 3, and Django. I recently came across a YouTube video from Software Engineer saying that it takes a couple years to learn HTML, CSS, JavaScript, Python 3, Django, and SQL. The guy said a better route to become a Full-Stack Developer is to fist learn SQL because it will only take 3 months to learn it and then you can get as a SQL Developer and learn the other languages will you're making my working with SQL. He mentioned that there are more SQL Developer jobs than any other of the languages. What do you guys think? Is this …