Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Is it possible to change the 'migrations' folder's location outside of the Django project?
what i'm trying to do is to change the default path for migrations for a specific application in a django project to put it outside the project itself but keeping it transparent, keeping use of makemigrations and migrate. Is it possible? if yes, how? -
Selecting a git workflow for my situation
I'm new to git. I've read the well-written intro book. But gee, it's still not a trivial topic. I've been bumbling around, experiencing various problems. I realized it might be because I'm unaware of workflow, and specifically, "what are the best practices for doing what I'm trying to do?" I started out developing a django project on my win7 with Pycharm. Great way to get the initial 95% written. But then I need to deploy it to my production machine at PythonAnywhere. So I created a private Github repository, pushed my win7 codebase to github. Then in pythonAnywhere, I cloned the github repository. For now, no others work on this project. It will not be released to the public. Now that the server is running on PythonAnywhere, I still need to tweak settings, which is best done on the PythonAnywhere codebase side. But there are other improvements (new pages, or views) that I'd rather do inside Pycharm IDE on my win7 than in vim on python anywhere. So I've been kind of clumsily pushing and fetching these changes. It's been kind of ham-handed, and I've managed to lose some minor changes through ignorance. So I'm wondering if anyone can point … -
Celery periodic tasks once in 2 weeks
I am having trouble setting a periodic task with Celery to run once in 2 weeks on Sunday nights. Does anyone have any idea how to configure that with day_of_month day_of_week options? -
not able to find the variables sqlite for django project
I am creating demo django project in PyCharm. So I keep closing and re-opening the PyCharm. But I have noticed that once I reopen my django project in PyCharm, and go to sqlite command prompt through python manage.py shell, and look for the previously created models, I get below error >>> b.id Traceback (most recent call last): File "<console>", line 1, in <module> NameError: name 'b' is not defined but when I execute the command Album.objects.all() I do get the details of previously created models >>> Album.objects.all() <QuerySet [<Album: yaad: Sonu Nigam>, <Album: : >, <Album: : Back Street Boys>, <Album: InComplete: Back Street Boys>, <Album: In The End: Linkin Park>]> Is this a kind of any defect, or it's just me who get to see such situation, or am I missing something? Python 3.6 django 1.11 pycharm 2017.2.3 -
Error in migrate after adding DateField in Django Model
This is my Django model, in which I want to add another field, in addition to pre-existent fields class Offerta(models.Model): #old pre-existent fields ... #the field I want to add date_rifiuto = models.DateField(null=True, blank=True) When I run 'makemigrations myapp' there are no problems, but when I run the 'migrate' command, console shows some errors: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 64, in execute return self.cursor.execute(sql, params) File "/usr/lib/python3/dist-packages/django/db/backends/sqlite3/base.py", line 337, in execute return Database.Cursor.execute(self, query, params) sqlite3.IntegrityError: NOT NULL constraint failed: myapp_offerta.data_rifiuto The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/opt/pycharm-2017.2.3/helpers/pycharm/django_manage.py", line 43, in <module> run_module(manage_file, None, '__main__', True) File "/usr/lib/python3.5/runpy.py", line 205, in run_module return _run_module_code(code, init_globals, run_name, mod_spec) File "/usr/lib/python3.5/runpy.py", line 96, in _run_module_code mod_name, mod_spec, pkg_name, script_name) File "/usr/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/santoryu/richiestaTesi/manage.py", line 22, in <module> execute_from_command_line(sys.argv) I think the main problem is here: sqlite3.IntegrityError: NOT NULL constraint failed: myapp_offerta.data_rifiuto But I have explicitly say null=True -
django window popup with table details
I want to create a button in the template that if i press View i want a popup to show up and in that popup i want to display my Table from models.py. Basically i want that popup to have all the columns names and the all the date of that tabled display. with pagination if its possible. This is part of my seaerch_table.html <script> $("#mytable").dialog({autoOpen: false}); $("#opener").click(function () { $("#mytable").dialog("open"); }); </script> <table class="table table-bordered sortable table-hover" id="mytable"> <thead> <tr> <th>Id</th> <th>Title</th> <th>Url</th> <th>View All Info</th> </tr> </thead> <tbody> {% for lists in details %} <tr> <td>{{ lists.id }}</td> <td>{{ lists.title }}</td> <td><a href="{{ lists.url }}" target="_blank">{{ lists.url }}</a></td> <td> <button id="opener">View</button> </td> </tr> {% endfor %} </tbody> </table> It only shows in the template only 3 fields...and i want to add 2 more field when i do the popup which will include the Createdat and Descriptions field. I don't want to do nothing special on that popup...just display the entire table from mysql (which include the column createdat and description) Can someone please help me ? Thank you -
How to avoid Django unit tests to cause MySQL aborted connection when running in parallel?
I'm trying to run Django tests in parallel by using: python manage.py test --keepdb --parallel But if a test fails, it caused an aborted SQL connection. In MySQL I can see it: SHOW GLOBAL STATUS LIKE 'Aborted_connects'; -- aborted_connects : 1 And because of that, I keep seeing this error in other tests: django.db.utils.OperationalError: (2013, "Lost connection to MySQL server at 'reading initial communication packet', system error: 102") What can I do to avoid this situation? This is an sample traceback of other tests failing: Using existing test database for alias 'default'... Traceback (most recent call last): File "/Applications/PyCharm.app/Contents/helpers/pycharm/django_test_manage.py", line 157, in <module> utility.execute() File "/Applications/PyCharm.app/Contents/helpers/pycharm/django_test_manage.py", line 132, in execute PycharmTestCommand().run_from_argv(self.argv) File "/Users/dio/.virtualenvs/athena/lib/python2.7/site-packages/django/core/management/commands/test.py", line 30, in run_from_argv super(Command, self).run_from_argv(argv) File "/Users/dio/.virtualenvs/athena/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv self.execute(*args, **cmd_options) File "/Users/dio/.virtualenvs/athena/lib/python2.7/site-packages/django/core/management/commands/test.py", line 74, in execute super(Command, self).execute(*args, **options) File "/Users/dio/.virtualenvs/athena/lib/python2.7/site-packages/django/core/management/base.py", line 399, in execute output = self.handle(*args, **options) File "/Applications/PyCharm.app/Contents/helpers/pycharm/django_test_manage.py", line 97, in handle failures = TestRunner(test_labels, **options) File "/Applications/PyCharm.app/Contents/helpers/pycharm/django_test_runner.py", line 256, in run_tests extra_tests=extra_tests, **options) File "/Applications/PyCharm.app/Contents/helpers/pycharm/django_test_runner.py", line 156, in run_tests return super(DjangoTeamcityTestRunner, self).run_tests(test_labels, extra_tests, **kwargs) File "/Users/dio/.virtualenvs/athena/lib/python2.7/site-packages/django/test/runner.py", line 532, in run_tests old_config = self.setup_databases() File "/Users/dio/code/athena/common/runner.py", line 12, in setup_databases result = super(CITestSuiteRunner, self).setup_databases() File "/Users/dio/.virtualenvs/athena/lib/python2.7/site-packages/django/test/runner.py", line 482, in setup_databases … -
AmoCrm - django convert QueryDict to json
I try to deal django with amocrm webhook. I'm getting in post QueryDict, but I want to have json. How can I get it? I dont know why the key is so full: 'contacts[note][0][note][attachement]' {'contacts[note][0][note][attachement]': ["''"], 'contacts[note][0][note][timestamp_x]': ["'2017-09-29 00:02:28'"], 'contacts[note][0][note][text]': ["'e'"], 'contacts[note][0][note][group_id]': ['0'], 'contacts[note][0][note][element_id]': ['9194307'], 'contacts[note][0][note][modified_by]': ['1760296'], 'contacts[note][0][note][account_id]': ['16500283'], 'account[subdomain]': ['xxxxxx'], 'contacts[note][0][note][main_user_id]': ['xxxxx'], 'contacts[note][0][type]': ['contact'], 'contacts[note][0][note][created_by]': ['xxxxx'], 'contacts[note][0][note][date_create]': ["'2017-09-29 00:02:29'"], 'contacts[note][0][note][element_type]': ['1'], 'contacts[note][0][note][note_type]': ['4']} -
How much time Django take to make a connection with PostgreSQL when both are on the same machine?
For my application, it is taking 14ms to make a connection between Django and PostgreSQL,my system is 40 core cpu and 16 GB ram, can we reduce this time? Thank you -
login doesn't work returh error (1)
hi why login doesn't work my views.py def login(request): if request.method == 'POST': password = request.POST['password'] username = request.POST['username'] user = authenticate(username=username, password=password) if user is not None: if user.is_active: login_auth(request, user) return redirect('account') else: context = {'message_error':'3'} return render(request, 'account/login.html',context) else: context = {'message_error': '2'} return render(request, 'account/login.html', context) else: context = {'message_error': '1'} return render(request, 'account/login.html', context) my login.html.tag form <form method="post" action="{% url 'blog:account' %}" > my urls.py url(r'^account/login/$', views.login, name='login'), in terminal whene submit detils [29/Sep/2017 08:20:46] "POST /account/ HTTP/1.1" 302 0 [29/Sep/2017 08:20:46] "GET /account/login/ HTTP/1.1" 200 5158 just return (1) How can I solve this? thanks -
Django restarts when file changes not belong to Django
The problem was the Django is restarting when i change the settings.py but that settings.py is not belongs to django project. Here is the folder structure. - project - django-conf - settings.py - urls.py - ... - apps - apps1 - ... - scrapy-setting - settings.py <------- file to be updated When i update the scrapy-setting/settings.py the django will reload. I dont know why. In my django config, there is no relation between that folder. -
Save multiple objects with a unique attribute using Django formset
TL;DR: How do you save/validate multiple objects with a unique attribute using a formset? Let's say I have a Machine which has multiple Settings (see models below). These settings should have a unique ordering within the machine. This can be accomplished by defining a unique_together attribute in the Meta class of the Setting model: unique_together = (('order', 'machine'), ) However, I'm using an inline formset to update all the Settings of a Machine. Assume I have the following info in my formset: Setting 1: machine=1; order=1 Setting 2: machine=1; order=2 If I were to switch the order on the two Settings: Setting 1: machine=1; order=2 Setting 2: machine=1; order=1 and save the form using the following piece of code: self.object = machine_form.save() settings = setting_formset.save(commit=False) for setting in settings: setting.machine = self.object setting.save() Then I get a Unique Constraint Error since I'm trying to save Setting 1 with order=2, but Setting 2 still has that order. I can't seem to find a clean solution for this problem. I would like to keep the unique_together constraint to ensure the correctness of my data. I know how to solve this in the frontend using Javascript, but I want a check in my … -
Django-admin forgot password
login.html {% url 'admin_password_reset' as password_reset_url %} {% if password_reset_url %} <div class="password-reset-link"> <a href="{{ password_reset_url }}">{% trans 'Forgotten your password or username?' %}</a> </div> {% endif %} urls.py from django.conf.urls import url from . import views from django.contrib.auth import views as auth_views app_name = 'Web' urlpatterns = [ url(r'^password_reset/$', auth_views.password_reset, name='password_reset'), url(r'^password_reset/done/$', auth_views.password_reset_done, name='password_reset_done'), url(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', auth_views.password_reset_confirm, name='password_reset_confirm'), url(r'^reset/done/$', auth_views.password_reset_complete, name='password_reset_complete'), ] as you can see pasword_reset_url included but i'm not able to see this href in my login page how can i configure ? -
hvad translation error __str__ returns NoneType
I am trying to localize some of my models and adopted hvad. It works fine but not when in related models. I have the following two models: class Family(TranslatableModel): sciencename=models.CharField(max_length=50,verbose_name='Scientific Name',blank=True,null=True) translations=TranslatedFields( name=models.CharField(max_length=50, unique=True), note=models.TextField(null=True,blank=True) ) def __str__(self): return self.safe_translation_getter('name',) And child: class Child(TranslatableModel): sciencename=models.CharField(max_length=50,verbose_name='Scientific Name',blank=True,null=True) family=models.ForeignKey(Family,related_name="child_family") translations=TranslatedFields( name=models.CharField(max_length=50) ) def __str__(self): return 'Dude'#' , '.join([self.family.name,self.safe_translation_getter('name',)]) class Meta: #ordering=('family','name',) unique_together=(('name','language_code')) Now I want to access this from the admin page and have this in admin.py, which generates TypeError. Without languages, it was listing families so I can chose one when adding a child: class cHILDAdmin(TranslatableAdmin): # ... other admin stuff def get_fieldsets(self, request, obj=None): return ( (_('Common fields'), { 'fields': ('sciencename','family' ), }), (_('Translations'), { 'fields': ('name',), }), ) change_form_template = 'change_form.html' list_display = ('__str__','family','sciencename', ) def apply_select_related(self, qs): return qs.prefetch_related('family') def get_family(self, obj): return obj.family def get_name(self,obj): return obj.name get_name.short_description = _('Name') -
How does django rqworker notify the browser that job has been done?
I have to create a major feature of my system. Here are the spec Software Versions: python3.6.2 Django1.11 Requirements: 1. Upload an Excel file with the correct format. Correct sheetname, columns all are set. 2. Dispatch the data processing to child-process. 3. Notify whether the error occur or not and summarize the error all at once to the user. 4. If the error occur. Rollback all the transactions. Planning: 1. Upload File and validate sheetname, and column is not difficult. I had done this before 2. Dispatch with rqworker is very easy 3. Hard part is here 4. Deal with Rollback by using decorator @transaction.atomic Question: 1. How can I let child-process notify the browser that the assigned job has been done? -
Django i18n_patterns with non-standard language codes
I am trying to use django's i18n_patterns in my root URL config to do automatic switching of the page language based on the URL. From looking at the related LocaleMiddleware code code, it does indeed look like hitting the server with a language prefix in the URL it switches the language. The issue I am facing though is that the translations we have in our system all have a country specific code, i.e. en-us instead of en or fr-be instead of fr. For the URLs themselves however we require the short form to be used. Our current solution is to run our custom locale middleware, mapping the current short form language code to the long form language code for activating the translations. I would like to know however if there would be another way around this, such that we could use this standard django implementation. -
I wanna send type1 of select tag
I wanna send type1 of select tag to test.html. I wrote in index.html <body> <form method="post" action=""> <select id="mainDD" data-placeholder="Choose" class="chzn-select" style="width:600px;"> {% for i in json_data.items.values %} <option value="{{forloop.counter}}">{{ i }}</option> {% endfor %} </select> {% for key, values in preprocessed %} <select name="type" id=type{{forloop.counter}}> {% for counter, value in values %} <option value="{{forloop.counter}}">{{ value }}</option> {% endfor %} </select> {% endfor %} <select name="type1" id=type6> {% for value1 in preprocessed1 %} <option value="{{forloop.counter1}}">{{ value1 }}</option> {% endfor %} </select> </form> <script type="text/javascript"> $(document).ready(function () { $('#mainDD').on('change', function() { var thisType = "type" + $(this).val(); for(i=1; i<6; i++) { var thisId = "type" + i; if(thisType !== thisId) { $("#"+thisId).hide(); } else { $("#"+thisId).show(); } } }).trigger('change'); }); </script> <form id="postform" action="http://localhost:8000/app/test_view" method="POST"> {% csrf_token %} <input type="submit" value="SEND"> </form> <script type="text/javascript"> $('[name=type]').change(function() { var key; var value; $('select[name="main"] option:selected').each(function(index, option) { key = $(option).text(); }); $('select[name="type"] option:selected').each(function(index, option) { value = $(option).text(); }); $('select[name="type1"] option:selected').each(function(index, option) { value1 = $(option).text(); console.log(value1); }); document.querySelector("input[type=submit]").onclick = e => { const test = window.open(`test_view?${key}=${value}`, "_blank"); } }); $(document).ready(function () { $('#mainDD').on('change', function() { var thisType = "type" + $(this).val(); for(i=1; i<6; i++) { var thisId = "type" + i; if(thisType !== … -
How can I get the data passed from the ajax in Django?
How can I get the data passed from the ajax in Django? In the js, I use ajax to pass the data: $.ajax({ type:'post', url:'/app_admin/myServerDetail/', data:JSON.stringify({'server_id':server_id}), // I want to pass the server_id to views.py dataType:'json', success:success_func }) In my views.py, I print the request.POST, and server_id: server_id = request.POST.get("server_id") print (server_id, request.POST) The result is bellow: (None, <QueryDict: {u'{"server_id":"f55dbe56-7fa8-4d13-8e1e-2dc67499b6ac"}': [u'']}>) So, how can I get the server_id in my views.py ? -
Form has been tampered with - django form validation
I have a formset that I am working with right now of a model form that has other forms included in the html template. I am submitting the form into the views.py file in order to process the form. It is saying that the form has been tampered with and I have no idea why it is saying that. I will include all of the related code below: error: ValidationError at /17/hello/update_expense_individual/ ['ManagementForm data is missing or has been tampered with'] here is the form template: {% extends "base.html" %} {% block content %} <h2>Add expense - {{ currentGroup.name }}</h2> {% if message %} <p>{{message}}</p> {% endif %} <form action="." method="POST"> {% csrf_token %} {% for f in form %} {% for expense in expenses %} {% if forloop.parentloop.counter == forloop.counter %} <p>{{ expense.user.username }}</p> {% endif %} {% endfor %} {{ f.as_p }} {% endfor %} <p> Tax: <input type="number" name="tax" value="0.00"> </p> <p> Tip: <input type="number" name="tip" value="0.00"> </p> <input type="submit" name="submit" value="submit"> </form> {% endblock %} here is the views.py that is processing the form: the error referenced the if form.is_valid() def updateExpenseIndividual(request, groupId, groupName): currentUser = loggedInUser(request) currentProfile = Profile.objects.get(user = currentUser) currentGroup = Group.objects.get(id = … -
Django - customize admin site's login with additional features
I'm trying to override the default login used in Django 1.10 when logging in to the admin site. I need to add the following features to my django-admin login: -> 2 factor authentication. -> dashboard can't be logged in more than 2 browser or duplicate within the same browser at the same time. ->Auto session expire after 15 minutes of inactivity. My question: how can i make this work ,best way to override default admin login? -
I cannot get javascript's value
I cannot get javascript's value.I wrote in index.html <body> <form method="post" action=""> <select id="mainDD" data-placeholder="Choose" class="chzn-select" style="width:600px;"> {% for i in json_data.items.values %} <option value="{{forloop.counter}}">{{ i }}</option> {% endfor %} </select> {% for key, values in preprocessed %} <select name="type" id=type{{forloop.counter}}> {% for counter, value in values %} <option value="{{forloop.counter}}">{{ value }}</option> {% endfor %} </select> {% endfor %} </form> <script type="text/javascript"> $(document).ready(function () { $('#mainDD').on('change', function() { var thisType = "type" + $(this).val(); for(i=1; i<6; i++) { var thisId = "type" + i; if(thisType !== thisId) { $("#"+thisId).hide(); } else { $("#"+thisId).show(); } } }).trigger('change'); }); </script> <form id="postform" action="http://localhost:8000/app/test_view" method="POST"> {% csrf_token %} <input type="submit" value="SEND"> </form> <script type="text/javascript"> $('[name=type]').change(function() { var key; var value; $('select[name="main"] option:selected').each(function(index, option) { var key = $(option).text(); console.log(key); //A }); $('select[name="type"] option:selected').each(function(index, option) { var value = $(option).text(); console.log(value); //A }); console.log(key); //B console.log(value); //B document.querySelector("input[type=submit]").onclick = e => { const test = window.open(`test_view?${key}=${value}`, "_blank"); } }); </script> </body> I wanna get i& value variables console.log(key); & console.log(value); with //B,but now undefined is shown.console.log(key); & console.log(value); with //A is shown ideal values I really cannot understand why I can not get these values in last console.log.How should I fix this? What should … -
AttributeError: 'Resume' object has no attribute 'prefetch_related'
I am trying to understand the use of prefetch_related and select_related for optimization. I learned somewhere in the blog that one of the where to use prefetch and select is, prefetch_related is used for reverse relation and select_related for the forward relation. In my case there is Resume model and Education Model. Education model has FK of resume with the related_name for reverse relation instead of writing additional _set when querying. I need to list all the education of an requested user with the requested user resume. I could do this without those optimization techniques as follow education_instance = Resume.objects.get(applicant=request.user).educations.all() When I tried to use the following instead, I get the error I stated in the title education_instance = Resume.objects.filter(applicant=request.user).prefetch_related('educations') Here is my model class Resume(models.Model): applicant = models.OneToOneField(User, on_delete=models.CASCADE) name = models.CharField(max_length=100, blank=False, null=False, help_text="Full Name") class Education(models.Model): resume = models.ForeignKey(Resume, related_name='educations') name = models.CharField(max_length=100, blank=False, null=False, help_text="Name of an institution") Can anyone make me clear on select_related and prefetch_related with simple layman terms ? I could not understand the issue I am getting -
Can't add a choice form field on custom usercreateform
I've been trying to create a custom signup form using an extended user model in django. One of the custom fields I've been trying to add is a user type which can only be either "Employee" or "Admin". My signUpForm class looks like this from .models import EMPLOYEE_TYPE_CHOICES class SignUpForm(UserCreationForm): usertype = forms.CharField( max_length=10, choices=EMPLOYEE_TYPE_CHOICES, ) userID = forms.CharField(label="User ID") class Meta: model = User fields = ('username', 'first_name', 'last_name', 'email', 'password1', 'password2', 'userID', 'usertype') EMPLOYEE_TYPE_CHOICES comes from my models.py which look like this EMPLOYEE_TYPE_CHOICES = ( ('admin', 'Admin'), ('employee', 'Employee'), ) class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) ADMIN = 'Admin' EMPLOYEE = 'Employee' EMPLOYEE_TYPE_CHOICES = ( (ADMIN, 'Admin'), (EMPLOYEE, 'Employee'), ) usertype = models.CharField( max_length=10, choices=EMPLOYEE_TYPE_CHOICES, ) userID = models.CharField( max_length=10, ) When running the server, I receive the error TypeError: init() got an unexpected keyword argument 'choices' Is there a different method for adding the choices to my form field? -
Reverse for 'post_draft_list' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
I'm working on DjangoGirls Django Extensions Tutorial and I'm hitting an error. The web app runs perfect locally, but isn't running on when pulled on pythonanywhere. I don't know what's wrong. Here is the error message: Environment: Request Method: GET Request URL: -- Django Version: 1.10 Python Version: 3.5.2 Installed Applications: ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'blog'] Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware'] Template error: In template /home/vivianphung/my-first-blog/blog/templates/blog/post_list.html, error at line 0 Reverse for 'post_draft_list' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: [] 1 : {% extends 'blog/base.html' %} 2 : 3 : {% block content %} 4 : {% for post in posts %} 5 : <div class="post"> 6 : <div class="date"> 7 : {{ post.published_date }} 8 : </div> 9 : <h1><a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a></h1> 10 : <p>{{ post.text|linebreaksbr }}</p> Traceback: File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/exception.py" in inner 39. response = get_response(request) File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py" in _get_response 187. response = self.process_exception_by_middleware(e, request) File "/usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py" in _get_response 185. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/vivianphung/my-first-blog/blog/views.py" in post_list 11. return render(request, 'blog/post_list.html', {'posts': posts}) File "/usr/local/lib/python3.5/dist-packages/django/shortcuts.py" in render 30. content = loader.render_to_string(template_name, context, request, using=using) File "/usr/local/lib/python3.5/dist-packages/django/template/loader.py" in render_to_string 68. return … -
How to do remote authentication in dpahne server
Currently I am using Django channels, so to run the web server I have used daphne and run worker. How please help me how to do remote authentication ? or any reverse proxy Please help