Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
DRF IntegrityError: null value in column "quiz_inst_id" violates not-null constraint
models.py class Quiz(models.Model): admin = models.ForeignKey(get_user_model(), on_delete=models.CASCADE) title = models.CharField(max_length=255) def __str__(self): return self.title class Question(models.Model): quiz_inst = models.ForeignKey("Quiz", related_name="questions", on_delete=models.CASCADE) body = models.TextField() def __str__(self): return self.body serializers.py class QuizSerializer(serializers.ModelSerializer): questions = serializers.PrimaryKeyRelatedField( many=True, queryset=Question.objects.all(), ) class Meta: model = Quiz fields = ('id', 'admin', 'title', 'questions') read_only_fields = ('id', 'admin') class QuestionSerializer(serializers.ModelSerializer): quiz_title = serializers.ReadOnlyField(source='quiz_inst.title') class Meta: model = Question fields = ('id', 'quiz_title', 'body') read_only_fields = ('id', 'quiz_title') views.py class QuizViewSet(viewsets.ModelViewSet): queryset = Quiz.objects.all() serializer_class = QuizSerializer def perform_create(self, serializer): serializer.save(admin=self.request.user) class QuestionViewSet(viewsets.ModelViewSet): queryset = Question.objects.all() serializer_class = QuestionSerializer error app_1 | django.db.utils.IntegrityError: null value in column "quiz_inst_id" violates not-null constraint app_1 | DETAIL: Failing row contains (2, wefwerfwe ewfw ef, 1, null, null). Why does foreignkey not getting assigned? Would be appreciated if someone could explain or link me a documentation to read. I've read some other similar questions but i still can't figure out what shoud i do. -
How to compress the new uploaded images using PIL before saving to AWS S3 Bucket?
PIL has really good image processing abilities, It allows me to shrink the size by over 90% and the quality still remains, But in order to shrink an image you have to convert it to jpeg, But AWS is saying set it to "png" or we will ignore your "jpeg" code Any idea why is Amazon like this? And is there a way to shrink Image on the Django backend with AWS without using services such as AWS Lambda? The code is provided below: from django import forms from .models import Card from django.core.files.storage import default_storage as storage from PIL import Image class CardForm(forms.ModelForm): class Meta: model = CARD fields = ('photo1',......) def save(self, *args, **kwargs): card = super(cardForm, self).save() image = Image.open(card.photo1) storage_path = storage.open(card.photo1.name, "wb") image.save(storage_path, "jpeg", quality=10, optimize=True) # set to png or aws ignores the code storage_path.close() return card -
I can't migrate on heroku. Using Django MySQL
I can't migrate on Heroku. Using Django and MySQL. I don't what wrong with it. There are some wrongs on setting_mysql.py? I got an error like this. (base) mypc@mypc website % heroku run python manage.py migrate Running python manage.py migrate on ⬢ myapp... up, run.3308 (Free) Traceback (most recent call last): File "/app/.heroku/python/lib/python3.9/site-packages/django/db/backends/base/base.py", line 217, in ensure_connection self.connect() File "/app/.heroku/python/lib/python3.9/site-packages/django/db/backends/base/base.py", line 195, in connect self.connection = self.get_new_connection(conn_params) File "/app/.heroku/python/lib/python3.9/site-packages/django/db/backends/mysql/base.py", line 227, in get_new_connection return Database.connect(**conn_params) File "/app/.heroku/python/lib/python3.9/site-packages/MySQLdb/__init__.py", line 130, in Connect return Connection(*args, **kwargs) File "/app/.heroku/python/lib/python3.9/site-packages/MySQLdb/connections.py", line 185, in __init__ super().__init__(*args, **kwargs2) MySQLdb._exceptions.OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)") -
Auto calculate and return a field based on request in Django rest framework
I have a list of books with pincode of the location it was added from. I am getting a post request with pincode of user who wants to get such list. The list needs to be sorted according to the distance from the user. Although I have a function to calculate the distance, I want to return a dynamic field named 'distance' in response. My Book models is like:- class Book(TimestampedModel): user = models.ForeignKey( settings.AUTH_USER_MODEL, on_delete=models.SET_NULL, null=True ) name = models.CharField(max_length=20, blank=True) desc = models.CharField(max_length=140, blank=True) is_active = models.BooleanField(default=True, blank=False) price = models.IntegerField(null=True) pincode = models.IntegerField(null=False) My serializer is like:- class BookSerializer(serializers.ModelSerializer): """Serializer for book object""" class Meta: model = Book fields = ('id', 'user', 'name', 'desc', 'is_active', 'sold_to', 'is_sold', 'age', 'price', 'created_at', 'updated_at', 'pincode') and my view looks like:- class BookViewSet(viewsets.ModelViewSet): serializer_class = serializers.BookSerializer queryset = Book.objects.all() query_params = self.request.query_params def get_queryset(self): queryset = Book.objects.all() if('pincode' in query_params): pincode = query_params['pincode'] try: for counter, instance in enumerate(queryset): **instance.distance = dist.query_postal_code( pincode, instance.pincode)** queryset = sorted(queryset, key=**attrgetter('distance')**) except Exception as ex: print(ex) return queryset As you can see, I am able to calculate the distance in the view, I am not sure how to send this in response. Please help … -
Can beginners really help to any python or django open source project?
I've been studying Flask, Django, and Selenium Webdriver for more than 6 moths. I'am actually developing personal projects but i was wondering if with my limited knowledge I could really help an open-source project too. Check my Github account if you want -
How to pronounce django machina?
I was working with my team on a Django project. But in a regular stand-up meeting, I don't know how to pronounce "Machina". -
How can I get the value of the last column taking the first column as a reference?
I want to get the value depending on the code that is, if it is the number 10 that I get the value of TYPE Query: This query return the parameter cod this table is on mysqlserver sentencia ="exec [PR].[dbo].[PT_GET_PR]" + "'" + m + "','" + str(rec) + "','" + orden + "'" + ",'" + str(fecha_i) + "'," + "'" + str(fecha_f) + "'" Model: this table is on postgre and i want to get the value cod same of the last query and take the value type on my table on postgre class items(models.Model): COD_= models.CharField('COD', max_length=200) Descripcion= models.CharField('Descripcion', max_length=200) TAB= models.CharField('TAB_Sistrade', max_length=200) TIPO= models.CharField('TIPO', max_length=200) -
Try except in django admin panel
I have a function in my models.py that adds the news I pass to it via a URL using OpenGraph. This process works fine, but there are some websites that give me an error, how can I use a try except to control this error and the application does not crash? When the error occurs, I would like the application in the admin panel to return me to the same place where it was before, but indicating the error. Best regards and thank you very much! My models.py: class Post(models.Model): title = models.CharField(max_length=200, verbose_name="Título", null=True, blank=True) content = RichTextField(verbose_name="Contenido", null=True, blank=True) published = models.DateTimeField(verbose_name="Fecha de publicación", default=now, null=True, blank=True) image = models.ImageField(verbose_name="Imagen", upload_to="blog", null=True, blank=True) author = models.ForeignKey(UserManegement, verbose_name="Autor", on_delete=models.CASCADE) categories = models.ManyToManyField(Category, verbose_name="Categorias", related_name="get_posts") url_web = models.URLField(verbose_name="URL", null=True, blank=True) created = models.DateTimeField(auto_now_add=True, verbose_name='Fecha de creacion') updated = models.DateTimeField(auto_now=True, verbose_name='Fecha de ediccion') class Meta: verbose_name = "entrada" verbose_name_plural = "entradas" ordering = ['-created'] def __str__(self): return self.title The function in which I want to insert the try except. It is in the same models.py: @receiver(pre_save, sender=Post) def url_processor(sender, instance, *args, **kwargs): if instance.url_web: title, description, image = web_preview(instance.url_web) instance.title = title instance.content = description path = 'blog/' + uuid.uuid4().hex + … -
How do i append an array of objects inside an array of objects
@require_http_methods(["GET"]) @login_required def get_questions(request): res = {} questions = models.Questions.objects.raw( """ SELECT SELECT Q.question_id,Q.question,Q.description,Q.qn_total_mark,QP.part_desc, QP.part_total_marks, PMA.part_model_ans,PMA.part_answer_mark,PMA.part_answer_id 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 """ ) for question in questions: if question.question_id not in res: res[question.question_id] = { "key": question.question_id, "question": question.question, "description": question.description, "qn_total_mark": question.qn_total_mark, "question_parts": [ { "part_desc": question.part_desc, "part_model_ans": question.part_model_ans, "part_guided_answer":[ { "part_answer_id":question.part_answer_id, "part_model_ans": question.part_model_ans, "part_answer_mark": question.part_answer_mark, } ], "part_total_marks": question.part_total_marks, } ] } else: res[question.question_id]["question_parts"].append( { "part_desc": question.part_desc, "part_model_ans": question.part_model_ans, #part guided answer is appended in here i think "part_total_marks": question.part_total_marks, } ) return success({"res": list(res.values())}) What am i trying to do is to append the array inside the array of objects for use but i do not think this is a good idea, is it possible to do it like this and if so how could it be done? Also is there a better alternative for it -
Angular web application codebase for mobile apps?
I want to build a website the following way: Backend: Django REST Framework Frontend: Angular I do not want to discard the idea to build mobile apps for Android and IOS in the future as well. I found out that Ionic is a possibility to use an Angular codebase easily for Android and IOS mobile apps. Now my questions: Is that correct and are there alternatives? Can I build my web application with Angular without thinking in mobile apps or do I have to write specific Angular code from the beginning such that I can use the codebase for Android and IOS mobile apps later? Thank you! -
type and select multiple items
models.py: class Category(models.Model): slug = models.CharField(max_length=300) def __str__(self): return self.slug class News(models.Model): category = models.ManyToManyField(Category, default='cryptocurrency',related_name='category') forms.py: class NewsForm(forms.ModelForm): class Meta: model = News fields = ('title', 'header_image', 'body', 'category') widgets = { 'title' : forms.TextInput(attrs={'class':'form-control'}), 'body' : forms.Textarea(attrs={'class':'form-control'}), 'category' : forms.SelectMultiple(attrs={'class':'form-control'}), } from django.contrib import admin from .models import News,Category from easy_select2 import select2_modelform class NewsAdmin(admin.ModelAdmin): form = select2_modelform(News, attrs={'width':'250px'}) admin.site.register(News, NewsAdmin) admin.site.register(Category) There are many cases and it is very difficult to find a specific case among all these cases. I wanted to know how to make the desired field so that it can be typed and selected like the following: In the admin panel, like the image above. I want it to be the same in the template, but it is displayed as follows: -
External url in Django template
I got receipt url from stripe like: "receipt_url": "https://pay.stripe.com/receipts/acct_1FpzDdEHHOJvKiFZ/ch_1IsB5REHHOJvKiFZGxagDBoQ/rcpt_JVBS4giqfp3YUoHcqzjQAwMHWq",. I added to template as: <div class="status-message">{{ transID.receipt_email }}<br/><a href="{{ transID.receipt_url }}" target="_blank">Find your Receipt here:</a></div> When i click on the link i'm redirected to the same page. view storing fields from stripe: transID = stripe.PaymentIntent.retrieve(session.payment_intent) context = { 'customer': customer, 'transID': transID, } Is there a way when clicking on the link to redirected to the stripe's receipt_url? Many thanks. -
How to start Zendesk chat after receiving a coin base webhook?
I hope you all are well. Currently, I'm working on a website where I'm selling game items like gold and characters. I'm receiving payment through Coinbase. I want to send a message in Zendesk chatbox from the user who paid, after successful payment on Coinbase. Tech I'm using Django for backend HTML, CSS and JS for front-end Things I've done so far I've managed to receive money in my Coinbase account and Coinbase redirects to my website after successful payment. I'm doing all this by the following code. def buy_osrs(request): obj = Setting.objects.first() osrs_price = getattr(obj, "osrs_price") osrs_fee = getattr(obj, "osrs_fee") form = OSRSForm() site = get_current_site(request).domain payment_success = f"https://{site}/payment/" if request.method == "POST": form = OSRSForm(request.POST) if form.is_valid(): form.save() total = float(form.cleaned_data.get("osrs_numbers")) * osrs_price + osrs_fee charge_info = { "name": "My Website", "description": "My Website Description", "local_price": {"amount": total, "currency": "USD"}, "pricing_type": "fixed_price", "metadata": {"rsn": form.cleaned_data.get("rsn"), "email": form.cleaned_data.get("email")}, "redirect_url": payment_success, } charge = client.charge.create(**charge_info) return redirect(charge.get("hosted_url")) context = { "form": form, "osrs_price": osrs_price, "osrs_fee": osrs_fee, } return render(request, "main/buy_osrs.html", context) I've managed to set up and receive webhooks, which change my database according to the response it gets from Coinbase. @csrf_exempt def coinbase_webhook(request): if request.method == "POST": # event … -
Django form two input box went into one but it should be separate due to option value box
You can see pictures of that purpose and term label there is a missing purpose input box and it got a term input box. I want to have a purpose input box appear. The option value should show a list of options pick from model.py before I add loan_purpose with list of option the input box was there till I added loan_purpose update with makemigrations then it missing inputbox. model.py from django.db import models from django.contrib.auth.models import User Loan_Purpose = ( ("car","Car"), ("home","Home Renovation"), ("travel","Travel"), ("wedding","Wedding"), ("education","Education"), ("boat","Boat"), ("medical","Medical"), ("business","Business"), ("other","Other"), ) class Loan(models.Model): id = models.AutoField(primary_key=True) purpose = models.CharField(choices=Loan_Purpose, max_length=30) term = models.DecimalField(max_digits=5, decimal_places=2) amount = models.DecimalField(max_digits=10, decimal_places=2) interest = models.DecimalField(max_digits=5, decimal_places=2) class Meta: db_table = 'loan' create.html <body> <div class="main_content"> <div class="info"> {% if submitted %} <p class="success"> Your venue was submitted successfully. Thank you. 11 </p> 12 {% else %} <form method="POST" class="post-form" action="{% url "loan" %}"> {% csrf_token %} {{ form.as_table }} <button type="submit" class="save btn btn-default">Save</button> </form> </div> </div> </body> {% endif %} {% endblock %} </body> view.py from django.shortcuts import render, redirect from django.http import HttpResponse, HttpResponseRedirect from .forms import LoanForm from .models import Loan def home(response): return render(response, "lend/home.html", {}) def loan(request): submitted … -
403 Permission 'aiplatform.endpoints.predict' denied on resource '//aiplatform.googleapis.com/projects/... (or it may not exist)
I am getting below when executed predict on endpoint: 403 Permission 'aiplatform.endpoints.predict' denied on resource '//aiplatform.googleapis.com/projects/23377928208/locations/us-central1/endpoints/7952107896727142400' (or it may not exist). Please let me know the resolution. Regards, Amar -
How to check if a requested user has a specific custom permission in Django Rest Framework?
I want to check with a boolean answer of True/False if a requested user has a permission defined in permissions.py. More in particular, I want to check if the requested user has the permission of IsDriver. Is somehow possible? class ExampleViewSet(viewsets.ModelViewSet): permission_classes = [IsChargingStationOwner |IsDriver | IsReadOnlyStations] serializer_class = ExampleSerializer def get_queryset(self): # get the request user requested_user = self.request.user if requested_user.is_anonymous : print('1') elif requested_user .... : print('2') My question has to do with the elif statement. -
Shadows built-in name 'format' in class-based-views, Django rest_framework
I am getting the error Shadows built-in name 'format' in my def post is there a reason for this to happen because I am using the free Pycharm and not professional? from django.shortcuts import render from rest_framework import generics, status from .serializers import RoomSerializer, CreateRoomSerializer from .models import Room from rest_framework.views import APIView from rest_framework.response import Response Create your views here. class RoomView(generics.ListAPIView): queryset = Room.objects.all() serializer_class = RoomSerializer class CreateRoomView(APIView): serializer_class = CreateRoomSerializer def post(self, request, format=None): if not self.request.session.exists(self.request.session.session_key): self.request.session.create() serializer = self.serializer_class(data=request.data) if serializer.is_valid(): guest_can_pause = serializer.data.get('guest_can_pause') votes_to_skip = serializer.data.get('votes_to_skip') host = self.request.session.session_key queryset = Room.objects.filter(host=host) if queryset.exists(): room = queryset[0] room.guest_can_pause = guest_can_pause room.votes_to_skip = votes_to_skip room.save(update_fields=['guest_can_pause', 'votes_to_skip']) return Response(RoomSerializer(room).data, status=status.HTTP_200_OK) else: room = Room(host=host, guest_can_pause=guest_can_pause, votes_to_skip=votes_to_skip) room.save() return Response(RoomSerializer(room).data, status=status.HTTP_201_CREATED) return Response({'Bad Request': 'Invalid data...'}, status=status.HTTP_400_BAD_REQUEST) -
Setup Django With Apache+Supervisor
I have always worked with C panel setup Django app but now i have purchased one code and the developer of that code is saying you cant do that normally . I have used many features in that such as Django celery and channels.So, it will be done with Apache+supervisor only. So can i get any docs or terminal commands that i will have to use to get it working on my server.I also want to setup many domains using that code so can i get any bash code available that will do it automatically. -
How to Use Dynamic variable for Django forms textinput value?
I am working on project1 cs50w wiki, I have created a form in forms.py. it is textinput and I am trying to pass dynamic value for thistext input "{{ pagetitle }}". but it prints "{{ pagetitle }}" as it is in the textinput when rendered. this all works if I am using HTML forms but when I try Django forms I can not figure out how to pass variable to the display. forms.py from django import forms class newTitle(forms.Form): q = forms.CharField(label='New Page Title', max_length=100, widget=forms.TextInput( attrs={ 'id': 'titleCheck', 'class': 'search', 'type': 'text', 'placeholder': 'Type Topic Title Here...', 'onblur': 'blurFunction()', 'value': '{{ pagetitle }}' })) views.py def new_topic(request): newTitle_form = newTitle() context = { "newTitle_form": newTitle_form, } return render(request, "encyclopedia/CreateNewPage2.html", context) def new_topic_t(request, entry): newTitle_form = newTitle() return render(request, "encyclopedia/CreateNewPage2.html", { "newTitle_form": newTitle_form, "pagetitle": entry.capitalize() }) def myCheckFunction(request): searchPage = request.GET.get('q','') if(util.get_entry(searchPage) is not None): messages.info(request, 'The Page '+ searchPage + ' Already Exists, Do You Want To Change It Or Edit It!') return HttpResponseRedirect(reverse("new_topic_t", kwargs={'entry': searchPage})) else: return HttpResponseRedirect(reverse("new_topic_t", kwargs={'entry': searchPage})) createNewPage2.html {% csrf_token %} <div class="form-group" style="margin-right: 20%"> <form id="newTitle" action="{% url 'check' %}" method="GET"> {% block newTitle %} {{ newTitle_form }} {% endblock %} </form> </div> <script> … -
django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are not configured
I am facing problem testing my User model Which is defined as AUTH_USER_MODEL = "accounts.User" and the accounts.models that is the code import os from django.contrib.auth.models import AbstractUser from django.contrib.auth.models import UnicodeUsernameValidator from django.core.validators import MinLengthValidator from django.db import models from django.utils.translation import gettext_lazy as _ class Avatar(models.Model): photo = models.ImageField(upload_to="avatars") def __str__(self): return os.path.basename(self.photo.name) class User(AbstractUser): username = models.CharField( _("username"), max_length=150, unique=True, help_text=_( "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only." ), validators=[UnicodeUsernameValidator(), MinLengthValidator(3)], error_messages={"unique": _("A user with that username already exists."),}, ) avatar = models.ForeignKey( "Avatar", null=True, blank=True, on_delete=models.PROTECT ) is_guest = models.BooleanField(default=False) class Meta: ordering = ["-id"] When I am testing this in test_models.py using $ python -m pytest with following code in the file from django.conf import settings def test_custom_user_model(): assert settings.AUTH_USER_MODEL == "accounts.User" These are the errors on terminal $ python -m pytest ========================================================================= test session starts ========================================================================== platform win32 -- Python 3.9.1, pytest-6.2.3, py-1.10.0, pluggy-0.13.1 rootdir: C:\ProjectCode\Main-Project\Django-REST-Framework-React-BoilerPlate plugins: cov-2.11.1, django-4.2.0 collected 1 item accounts\tests\test_models.py F [100%] =============================================================================== FAILURES =============================================================================== ________________________________________________________________________ test_custom_user_model ________________________________________________________________________ def test_custom_user_model(): > assert settings.AUTH_USER_MODEL == "accounts.User" accounts\tests\test_models.py:5: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ … -
How do I use Geolocation in python
I first started using geopy but it seems that the location is not precise. So I encountered this API https://w3c.github.io/geolocation-api/#example-1-a-one-shot-position-request but problem is that it works only with javascript, and I am working on Django Project. I tried using Beautiful soup to load javascript web page with this content but its not loading <!DOCTYPE html> <html> <body> <p>Click the button to get your coordinates.</p> <button onclick="getLocation()">Try It</button> <p id="demo"></p> <script> var x = document.getElementById("demo"); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); //console.log(navigator.geolocation.getCurrentPosition) } else { x.innerHTML = "Geolocation is not supported by this browser."; } } function showPosition(position) { //console.log(position) x.innerHTML = "Latitude: " + position.coords.latitude + "<br>Longitude: " + position.coords.longitude; } </script> </body> </html> I tried using js2py but that too isn't supporting I just need to have precise current position in longitude and latitude of the device and use it in my django project. Anyone please help. -
How to store HTML content in databse in Django [closed]
I'm using DJango to save some html designs in my db. For example But I'm not able to use it like a html content Here is my Model file Model.py -
Override save model Django save method with return
I have this function, I want to make it a method of a Message model class. def save_message_to_db(message, message_id): mex = Message( message_id=message_id, subject=message.subject, sender=message.sender.address, has_attachments=message.has_attachments, sent_date=message.sent, received_date=message.received ) mex.save() return mex I've tried various ways, but still get errors. I need to return, expecially the id of the object saved. -
How to connect RabbitMQ into a Django project without Celery?
What do I need to setup in the Django Project to connect RabbitMQ with my application? I don't want to use celery. I will work with the pika library. -
Django App running until login attempt 'Truncated or oversized response headers received from daemon process'
Just promoted my django app to test env from dev. On this host there is php app which is also served by apache. We had to create Virtual Host config for both apps. Both apps are up and reachable. But I have problem with my django app. I reach the login/start/index page in browser, but after login attempt i get **500 Internal Server Error** In httpd logs i can see: [Tue May 18 09:41:21.366459 2021] [wsgi:error] [pid 94832] [client 10.111.12.135:56920] Truncated or oversized response headers received from daemon process 'xxxxx.srv.pl.net': /opt/xip/itP/api/api/wsgi.py, referer: https://xxxxx.srv.pl.net:8443/accounts/login/ wsgi.py: #!/opt/xip/itP/venv/bin/python import os import sys from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cftapi.settings') sys.path.append('/opt/xip/itP/api/') application = get_wsgi_application() ssl.conf: LoadModule wsgi_module /etc/httpd/modules/mod_wsgi.so WSGIPythonHome /opt/xip/itPassed/venv WSGIApplicationGroup %{GLOBAL} <VirtualHost 10.111.21.5:8443> ServerAdmin xxxxx.@net.com DocumentRoot "/opt/xip/itP/api" #Alias /itP "/opt/xip/itP/api" ServerName xxxxx.srv.pl.net:8443 WSGIScriptAlias / /opt/xip/itP/api/api/wsgi.py WSGIDaemonProcess xxxxx.srv.pl.net python-home=/opt/xip/itP/venv python-path=/opt/xip/itP/api header-buffer-size=80000 WSGIProcessGroup xxxxx.srv.pl.net Alias /static/ /opt/xip/itP/api/static/ <Directory /opt/xip/itP/api/static> Require all granted </Directory> <Directory /opt/xip/itP/api/api> <Files wsgi.py> Require all granted </Files> </Directory> <Directory /opt/xip/itP/api/*/> Require all granted </Directory> ErrorLog logs/ssl_error_log TransferLog logs/ssl_access_log LogLevel warn any ideas? App works until i try to login. all WSGIApplicationGroup %{GLOBAL} and header-buffer-size didn't work for me.