Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
How to resolve django rest framework login issue
I want to login a user but i don't know what is happening. Anytime i create a new user it shows that the user has been saved but anytime i try to authenticate the user with the django authenticate method i keep getting that the user has provided invalid credentials here is my LoginAPIView. class LoginView(GenericAPIView): serializer_class = LoginSerializer def get(self, request, format=None): return Response() def post(self, request): serializer = self.serializer_class(data=request.data) serializer.is_valid(raise_exception=True) here is my login serializer. class LoginSerializer(serializers.ModelSerializer): email = serializers.EmailField(max_length=255, min_length=4) password = serializers.CharField(max_length=68, min_length=6, write_only=True) username = serializers.CharField(max_length=255, min_length=3, read_only=True) tokens = serializers.CharField(max_length=255, min_length=3, read_only=True) # def get_tokens(self, obj): # user = User.objects.get(email=obj['email']) # return { # "refresh": user.tokens()['refresh'], # "access": user.tokens()['access'] # } class Meta: model = User fields = ["email", "password", "username", "tokens"] def validate(self, attrs): email = attrs.get("email", "") password = attrs.get("password", "") user = auth.authenticate(email=email, password=password) if not user: raise AuthenticationFailed("Invalid credentials, try again") if not user.is_active: raise AuthenticationFailed("Your account is disabled contact admin") if not user.is_verified: raise AuthenticationFailed("Your account is not verified") return { "email": user.email, "username": user.username, "tokens": user.tokens() } return super().validate(attrs) What do i do? -
How t return a json response in GET request?
Looking for some help as i am new to python and django ,I am trying to return a response in JSON of an API GET request as the data is to be returned is dictionary made from different instances of different model. but few things are not getting converted in JSON like datetime amount in decimal throwing an error saying not serializable.Also how can i get all the transfer for that perticular order in a list and each instance in a dictionary like[{},{}] views.py @api_view(['GET']) def details(request,id): if request.method=='GET': order = get_object_or_404(Orders,id=id,applications=application) collection = get_object_or_404(Payments,orders=id,direction='COLLECTION',is_active=True) transfer = get_object_or_404(Payments,orders=order,direction='TRANSEFER',is_active=True) content = { 'orders': { "id":id, "purpose_code":order.purpose_code, "amount":order.amount, 'collection_payments':{ "id":collection_payments.id, "amount":collection_payments.amount, "datetime":collection_payments.datetime, 'transfer': [ { "id":transfer.id, "amount":transfer.amount, "datetime":transfer.datetime, } ] } } } return Response(content, status=status.HTTP_200_OK) models.py class Orders(models.Model): id= models.AutoField(primary_key=True) applications = models.ForeignKey(Applications, on_delete=models.CASCADE) amount = models.DecimalField(max_digits=19, decimal_places=4) class Payments(models.Model): id = models.AutoField(primary_key=True) orders = models.ForeignKey(Orders, on_delete=models.CASCADE) direction = models.CharField(max_length=20,choices=[('COLLECTION','COLLECTION'), ('TRANSFER','TRANSFER')]) amount = models.DecimalField(max_digits=19, decimal_places=4, verbose_name='Price in INR') datetime = models.DateTimeField(auto_now=False,auto_now_add=False) is_active = models.BooleanField(default=True) -
How to store taken date input in SQlite3 database in Django?
I have a sqlite3 database table with a Datefield, the format of the date trying to store is 2012-01-01, though it's not storing the date and returning None when I am showing the table information in the template, what is the best method to fix this? -
How to extract a method from Django HTML?
My website (built with django) has pagination to not have to load too much content at once. The buttons to jump between the pages should always look the same. I found the following code on the internet which works great: {% if is_paginated %} {% if page_obj.has_previous %} <a class="btn btn-outline-info mb-4" href="?page=1">First</a> <a class="btn btn-outline-info mb-4" href="?page={{ page_obj.previous_page_number }}">Previous</a> {% endif %} {% if page_obj.has_next %} <a class="btn btn-outline-info mb-4" href="?page={{ page_obj.next_page_number }}">Next</a> <a class="btn btn-outline-info mb-4" href="?page={{ page_obj.paginator.num_pages }}">Last</a> {% endif %} {% endif %} Unfortunately I have to put this in each of my HTML files and have duplicated code. Is there a way to extract these few lines somewhere else and then only link to them in the respective HTML files? -
Django session not available on different view
Description: I can't access a session cookie set in one view from another one: views.py class Login(APIView): def post(self, request): request.session["user"] = "admin" print(request.session.get("user")) #outputs 'admin' return Response() class Files(APIView): def get(self, request): print(request.session.get("user") #outputs None return Response() How can I make session cookies available between requests? -
update object with pre_save signal subquery django
i need to display previous balance of users , i have used pre save signal to assign to the old balance before the transaction happens class Payment(models.Model): admin = models.ForeignKey(User,on_delete=models.CASCADE) client_seller = models.ForeignKey(ClientSeller,on_delete=models.CASCADE,blank=True) type_of_payment = models.CharField(choices=type_of_payment,max_length=60,default=retrieve) price = models.DecimalField(max_digits=20,decimal_places=2) previous_balance = models.DecimalField(max_digits=20,decimal_places=3,blank=True,default=0) class ClientSeller(models.Model): admin = models.ForeignKey(User,on_delete=models.CASCADE) name = models.CharField(max_length=40,unique=True) balance = models.DecimalField(decimal_places=3,max_digits=30,default=0) i need to assign previous_balance in Payment to balance in ClientSeller , balance in ClientSeller i change every time , but i need to show the users what was previous balance when a transaction happens def pre_save_balance(sender,instance,*args,**kwargs): if not instance.pk: Payment.objects.update( previous_balance = Subquery( Payment.objects.filter(client_seller__name=instance.client_seller.name).annotate( pre_balance=F('client_seller__balance') ).values('pre_balance')[:1] ) ) pre_save.connect(pre_save_balance,sender=Payment) but it only show the default previous_balance value which is 0 !? is there something i have missed ? or not understanding in pre_save signal good ?! thank you for helping -
error code=H10 desc="App crashed" method=GET I Have Installed Gunicorn But Its Showing Error
S:\commerce>heroku logs --tail 2021-05-21T10:25:33.854236+00:00 heroku[web.1]: Starting process with command gunicorn commerce.wsgi 2021-05-21T10:25:43.278367+00:00 app[web.1]: bash: gunicorn: command not found 2021-05-21T10:25:43.400110+00:00 heroku[web.1]: Process exited with status 127 2021-05-21T10:25:43.568812+00:00 heroku[web.1]: State changed from starting to crashed 2021-05-21T14:59:02.000000+00:00 app[api]: Build started by user sasikiran9008@gmail.com 2021-05-21T14:59:24.997986+00:00 app[api]: Deploy 87eb2006 by user sasikiran9008@gmail.com 2021-05-21T14:59:24.997986+00:00 app[api]: Release v7 created by user sasikiran9008@gmail.com 2021-05-21T14:59:25.349888+00:00 heroku[web.1]: State changed from crashed to starting 2021-05-21T14:59:29.813084+00:00 heroku[web.1]: Starting process with command gunicorn commerce.wsgi 2021-05-21T14:59:32.842749+00:00 app[web.1]: bash: gunicorn: command not found 2021-05-21T14:59:32.923810+00:00 heroku[web.1]: Process exited with status 127 2021-05-21T14:59:33.030602+00:00 heroku[web.1]: State changed from starting to crashed 2021-05-21T14:59:33.034357+00:00 heroku[web.1]: State changed from crashed to starting 2021-05-21T14:59:34.000000+00:00 app[api]: Build succeeded 2021-05-21T14:59:37.919248+00:00 heroku[web.1]: Starting process with command gunicorn commerce.wsgi 2021-05-21T14:59:41.312865+00:00 app[web.1]: bash: gunicorn: command not found 2021-05-21T14:59:41.391741+00:00 heroku[web.1]: Process exited with status 127 2021-05-21T14:59:41.491046+00:00 heroku[web.1]: State changed from starting to crashed 2021-05-21T14:59:42.648833+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=bidnow.herokuapp.com request_id=8e722e31-cb06-464b-97e5-93ee64ca52cc fwd="183.82.159.32" dyno= connect= service= status=503 bytes= protocol=https 2021-05-21T14:59:43.208695+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=bidnow.herokuapp.com request_id=a5875b3e-c7e1-475a-938b-f5d919302466 fwd="183.82.159.32" dyno= connect= service= status=503 bytes= protocol=https 2021-05-21T15:00:34.201010+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=bidnow.herokuapp.com request_id=e4e5f718-dace-4847-b085-94339c7eb82b fwd="183.82.159.32" dyno= connect= service= status=503 bytes= protocol=https 2021-05-21T15:00:34.827530+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=bidnow.herokuapp.com request_id=7069f835-7bcd-40d6-a5df-5ef5a5e34582 fwd="183.82.159.32" dyno= connect= service= … -
How to get the action name, and the new value in django singals
Goal: I am trying to get the new value and the name of the fields after changing a field and the new values of all the fields after changing multiple fields and the new values of all the fields after creating a new model from the instance variable in the signal receiver @receiver(signals.post_save) def __init__(instance, sender, signal, *args, **kwargs): print('======================') print({'actoin':instance.<somthings.somthigs>}) # get the action type like, change, create, delete print({'field/s':instance.<somthings.somthigs>}) # when you change a field value it returns to me the new value of the field print({'model':instance.<somthings.somthigs>}) # get the model that has beend changed print({'user':instance.user}) # I already now how to do this I can get the user how made the changes print({'final model':sender.objects.all()}) #I know how to do this as welll -
http python youtube video downloader error
File "C:\Users\dilkh\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 641, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 404: Not Found -
How to loop over Chart.js with Django list view
I am using a Django List View, and I am trying to iterate through multiple objects and display percentage values in a Chart.JS gauge. However, although I am iterating the names of the gauge id's by using a for loop counter, I am only ever getting the first iteration of the chart.js object rendering on my screen. My initial thoughts are that similar to how I am dynamically creating new canvas ids for the chart.js objects, I should be doing a similar thing for the variable I am trying to pass into the chart object e.g. reduction overall, but I am not having any luck. Your feedback is welcome. Views.py class PerformanceDetailView(ListView): template_name = 'performance_detail.html' model = Performance context_object_name = 'performance' def get_queryset(self, **kwargs): code = self.kwargs.get('code') return Performance.objects.filter(code=code) Performance_detail.html <section class="projects pt-4 col-lg-12"> {% for item in performance %} <div class="container-fluid pt-2 col-lg-12"> <!-- Project--><div class="project" > <div class="row bg-white has-shadow" style="height: 14rem"> <div class="left-col col-lg-2 d-flex align-items-center justify-content-between"> <div class="project-title d-flex align-items-center"> <div class="has-shadow"><img src="{% static 'img/avatar-2.jpg' %}" alt="..." class="img-fluid"></div> </div> </div> <div class="right-col col-lg-2 align-items-center vertical-center"> <div class="text"> <h3 class="h2 pt-2">{{item.brand}} {{item.style}}</h3> <p class="text-muted">{{item.package_type| capfirst}} package, round {{item.testing_round}}</p> <p class="text-muted">Item size: {{item.size}}</p> </div> </div> <div class="right-col col-lg-8 … -
DJANGO DATABASE AND PRODUCT DETAILS
HI, I'm walking with django creating ecommerce store, I have created a a product list page called index.html, now I'm trying to create a detail page so than when a customer click on the product the detail page will open...One one to help I cant view the database of my project -
How can I disable inline css input at WYSIWYG editor created with iframe?
I have created simple WYSIWYG editor with javascript execCommand. It works fine for me. But what if user edit the content before submitting form through elements section in browser. How to protect this these html elements before submitting? If user add inline style to some of the elements like position fixed? Then it will save the post with these changes in database which will cause problem in showing the data. I am working with django. -
Got django.db.utils.OperationalError: could not connect to server: Connection refused
I found a Django project and failed to get it running in Docker container in the following way: git clone git clone https://github.com/NAL-i5K/django-blast.git $ cat requirements.txt in this files the below dependencies had to be updated: psycopg2==2.8.6 I have the following Dockerfile: FROM python:2 ENV PYTHONUNBUFFERED=1 RUN apt-get update && apt-get install -y postgresql-client WORKDIR /code COPY requirements.txt /code/ RUN pip install -r requirements.txt COPY . /code/ RUN mkdir -p /var/log/django RUN mkdir -p /var/log/i5k For docker-compose.yml I use: version: "3" services: dbik: image: postgres volumes: - ./data/dbik:/var/lib/postgresql/data - ./scripts/install-extensions.sql:/docker-entrypoint-initdb.d/install-extensions.sql environment: - POSTGRES_DB=django_i5k - POSTGRES_USER=django - POSTGRES_PASSWORD=postgres ports: - 5432:5432 web: build: . command: python manage.py runserver 0.0.0.0:8000 volumes: - .:/code ports: - "8000:8000" depends_on: - dbik links: - dbik $ cat scripts/install-extensions.sql CREATE EXTENSION hstore; I had to change: $ vim i5k/settings_prod.py DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'postgres', 'USER': 'postgres', 'PASSWORD': 'postgres', 'HOST': 'db', 'PORT': '5432', } } Next, I ran docker-compose up --build web_1 | System check identified no issues (0 silenced). web_1 | Unhandled exception in thread started by <function wrapper at 0x7f9bd41d26d0> web_1 | Traceback (most recent call last): web_1 | File "/usr/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 229, in wrapper web_1 | fn(*args, **kwargs) web_1 | … -
How to filter SUM(flag) OVER (...) with having in sqlite
WITH cte AS ( SELECT Q.Question_id, Q.Question, PMA.part_model_ans, QP.part_total_marks, MA.answer_mark, Q.rowid, Q.Question <> LAG(Q.Question, 1, '') OVER (PARTITION BY Q.Question_id ORDER BY Q.rowid) flag FROM QUESTIONS Q LEFT JOIN QUESTIONS_PART QP ON QP.question_id = Q.question_id LEFT JOIN PART_MODEL_ANSWER PMA ON PMA.part_id = QP.part_id LEFT JOIN MODEL_ANSWER MA ON MA.question_id = Q.question_id ) SELECT Question_id, Question, part_model_ans, part_total_marks, answer_mark, SUM(flag) OVER (PARTITION BY Question_id ORDER BY rowid) part FROM cte having part = 1 ORDER BY question_id What i would like to do is filter the part so that it only shows the rows with 1 in it however after using having part == 1 the expected result is still the same i do not know why it does not filter, where clause cannot be used due to misuse of aggregate -
Order_by the First Value in a Many to Many Field without duplicate entries
I have seen similar questions being asked for the same like Django order_by many to many relation and order_by on Many-to-Many field results in duplicate entries in queryset. But both of them and many more can't seem to answer my question.I have my models as follows. class TeamMember(common_models.CreateModifyModel): user_id = models.CharField(max_length=50, validators=[validate_ObjectId]) lms_user = models.OneToOneField(User, null=True, on_delete=models.CASCADE) team = models.ManyToManyField(Team) class Team(common_models.CreateModifyModel): name = models.CharField(max_length=50) team_type = models.IntegerField(choices=team_type_choices, null=True, blank=True) is_active = models.BooleanField(default=True) The team variable has a many-to-many relationship with my model. I want to order_by the users where name inside the Team model is empty. My first approach was a naive one i.e queryset = self.get_queryset().filter(lms_user__email__in=[item.get('email') for item in email_res['response']]).order_by('team__name') the order_by in the end is not working and is giving duplicate entries for a user with multiple teams as it should. I came across Annotate and Subquery methods in Django and some of them introduced the Case-When to deal with this problem. The only thing that I NEED is to list the users with empty team names on the top AND for users that are assigned to multiple teams I want to get the first_instance of their team object which will avoid the duplicate user entries that … -
How to pass my data frame from one function to another function
I need to pass my dataframe from my panddf function to graphview function..How can i achieve this?? Am getting chart for all values from my db,I filtered out my data and i need to pass my data to graphview function!!!! from django.http import JsonResponse from django.shortcuts import render from board.models import userboard from.utils import get_plot import pandas as pd from sqlalchemy import create_engine def graphview(request): qs = userboard.objects.all() x=[x.Month for x in qs] y=[y.Bp_Values for y in qs] chart = get_plot(x,y) return render(request, 'piechart.html' ,{'chart':chart}) def panddf(request): username = None if request.user.is_authenticated: username = request.user.username print(username) engine=create_engine('postgresql+psycopg2://postgres:xxxxxx@localhost/vijay') df = pd.read_sql_query('SELECT * FROM public."board_userboard"',con=engine) filt = (df['User_name'] == username) print(df[filt]) return render(request, 'abc.html') -
i want to Show a "Thanks for voting" message after a user votes for all the positions and then it will show that message
after a user votes for all the available positions then its just redirecting to the Position page , and i want to show a Message or a alert that "the user has voted for all the positions". help me out how to do that? view.py: def home(request): return render(request, 'home.html') def registration(request): if request.method == "POST": form = RegistrationForm(request.POST, request.FILES) if form.is_valid(): cd = form.cleaned_data if cd['password'] == cd['confirm_password']: obj = form.save(commit=False) obj.set_password(obj.password) obj.save() messages.success(request, 'You have been registered.') return redirect('home') else: return render(request, "registration.html", {'form':form,'note':'password must match'}) else: form = RegistrationForm() return render(request, "registration.html", {'form':form}) def login(request): if request.method == "POST": usern = request.POST.get('username') passw = request.POST.get('password') user = authenticate(request, username=usern, password=passw) if user is not None: dj_login(request, user) return redirect('dashboard') else: messages.success(request, 'Invalid username or password!') return render(request, "login.html") else: return render(request, "login.html") @login_required def candidate(request, pos): obj = get_object_or_404(Position, pk = pos) if request.method == "POST": temp = ControlVote.objects.get_or_create(user=request.user, position=obj)[0] if temp.status == False: temp2 = Candidate.objects.get(pk=request.POST.get(obj.title)) temp2.total_vote += 1 temp2.save() temp.status = True temp.save() return HttpResponseRedirect('/position/') else: messages.success(request, 'Thanks for voting, you have already been voted this position.') return render(request, 'candidate.html', {'obj':obj}) else: return render(request, 'candidate.html', {'obj':obj}) HTML: this is my HTML HOME Template {% load … -
Django Error "django.core.exceptions.ValidationError: ['“h” value has an invalid format. It must be in YYYY-MM-DD HH:MM[:ss[.uuuuuu]][TZ] format.']"
I added a DateTimeField to one of my models but forgot to provide a default value in my models. When I ran the command python manage.py makemigrations it asked for a default value and I mistakenly gave 'h' as my default value, completely forgetting that it was a datetime field. Now I am getting this error. I deleted that line and also deleted the dbsqllite3 file, but the problem still persists. What can I do now to get rid of this error? -
I want to display those images on next page :Django
i want to open those images on next pagebut showing me this error : page not found -
Es mi primer proyecto con django y me aparece este error Not Found: /serviceworker.js
este es el views enter image description here y este el urls.py enter image description here -
Flutter google sign in authenticate django social auth for google
I am creating a flutter android app which uses google sign in. Once logged in, I recieve accesstoken and idtoken. I want to use this token to authenticate my backend which uses django social auth and Login and return the authoken, if the user has already signed up, or Register the user , login and return the user id and authtoken. Is this possible ? If so please suggest any documents online or please explain how should I approach this. -
Error Showing whenever I try to post without img Django
I'm trying to create a social media but whenever I try to post some post without an image field it's throwing me an Error saying "The 'post_img' attribute has no file associated with it.". It works fine when I post something with the image but I want it to be like Twitter where you can post a blog and Image. So I don't know what's going on. Models.py from django.db import models from django.utils import timezone from django.contrib.auth import get_user_model User = get_user_model() from PIL import Image # Create your models here. class PostTag(models.Model): tag = models.CharField(max_length=10) def __str__(self): return self.tag class Post(models.Model): title = models.CharField(max_length=200) content = models.TextField(null = True, blank=True) post_img = models.ImageField(upload_to = "posts_img", null = True, blank = True) pub_date = models.DateTimeField(default = timezone.now) post_tag = models.ForeignKey(PostTag, on_delete=models.SET_NULL, null= True,blank=True) author = models.ForeignKey(User, on_delete= models.CASCADE) def __str__(self): return f"{self.title} / {self.author}" if post_img: def save(self,*args, **kwargs): super().save(*args, **kwargs) img = Image.open(self.post_img.path) if img.height > 600 or img.width > 600: output_size = (600, 600) img.thumbnail(output_size) img.save(self.post_img.path) views.py from django.shortcuts import render,redirect from django.contrib.auth.decorators import login_required from .forms import PostCreateForm from django.contrib import messages # Create your views here. @login_required(login_url="users:index") def posts_view(request): form = PostCreateForm(request.POST or None, request.FILES … -
Django cumulative value displayed in template
I’m new to Django and Python and have been plugging through Python Crash Course. I have finished that and now have been making my own Django project, adding some extra bits in. Currently, I have a table of entries from my model which I am displaying with a template, each entry in the table has a time and some other data. What I would like is the value for the cumulative time in a column, next to each entries time ie Lesson Lesson time cumulative time Lesson1 0.5 0.5 Lesson2 1 1.5 Lesson3 1.3 2.8 I’m just really stuck on how to get this done, I have looked at lot’s of stack overflow and tried various ways that I just can’t get to work correctly. Looking at other examples they use annotate() and cumsum, but I’ve not been able to get that to work. I’ve done count and sum of other values but this has got me stuck. I think I need to loop over it in my view, but not sure how to associate each value to a cumulative time. Any help would be greatly received. Also, sorry this isn't very well written or succinct, programming doesn't come naturally … -
Error when deploying python app on heroku
I am trying to deploy my Python app on Heroku, but have been unsuccessful. It seems that a problem is occurring with the PyICU package, which I'm unsure how to correct. But that is probably not the only error. Here is an excerpt from the log: -----> Building on the Heroku-20 stack -----> Using buildpack: heroku/python -----> Python app detected -----> Using Python version specified in runtime.txt -----> Installing python-3.7.10 -----> Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2 -----> Installing SQLite3 -----> Installing requirements with pip .... WARNING: The candidate selected for download or install is a yanked version: 'python-Levenshtein' candidate (version 0.12.0 at https://files.pythonhosted.org/packages/42/a9/d1785c85ebf9b7dfacd08938dd028209c34a0ea3b1bcdb895208bd40a67d/python-Levenshtein-0.12.0.tar.gz#sha256=033a11de5e3d19ea25c9302d11224e1a1898fe5abd23c61c7c360c25195e3eb1 (from https://pypi.org/simple/python-levenshtein/)) Reason for being yanked: Insecure, upgrade to 0.12.1 Collecting python-Levenshtein==0.12.0 Downloading python-Levenshtein-0.12.0.tar.gz (48 kB) Collecting python-monkey-business==1.0.0 Downloading python_monkey_business-1.0.0-py2.py3-none-any.whl (5.5 kB) Collecting python-utils==2.4.0 Downloading python_utils-2.4.0-py2.py3-none-any.whl (12 kB) Collecting pytz==2019.3 Downloading pytz-2019.3-py2.py3-none-any.whl (509 kB) Collecting PyYAML==5.3.1 Downloading PyYAML-5.3.1.tar.gz (269 kB) Collecting regex==2020.6.8 Downloading regex-2020.6.8-cp37-cp37m-manylinux2010_x86_64.whl (661 kB) Collecting requests==2.24.0 Downloading requests-2.24.0-py2.py3-none-any.whl (61 kB) Collecting rutermextract==0.3 Downloading rutermextract-0.3.tar.gz (8.1 kB) Collecting six==1.13.0 Downloading six-1.13.0-py2.py3-none-any.whl (10 kB) Collecting soupsieve==2.0 Downloading soupsieve-2.0-py2.py3-none-any.whl (32 kB) Collecting sqlparse==0.3.1 Downloading sqlparse-0.3.1-py2.py3-none-any.whl (40 kB) Collecting tablib==2.0.0 Downloading tablib-2.0.0-py3-none-any.whl (47 kB) Collecting tqdm==4.46.1 Downloading tqdm-4.46.1-py2.py3-none-any.whl (63 kB) Collecting unicodecsv==0.14.1 Downloading unicodecsv-0.14.1.tar.gz (10 kB) … -
django deployment on-premise with license
I've developed a Django webapp that I have hosted on Azure. Now, my customer wants to deploy it in his customer environment at enterprise level. So, I want to add a license to this on-premise webapp. The problem is that since I've to deploy the python code itself adding a license check is almost useless. I could not find a way to compile the Django python code either. Does anybody have a solution to this licensing issue and, on-premise Django webapp deployment experience/suggestions? Can using docker be a solution?