pywintypes27.dll not found using Apache, Django, pywin32, Python2.7 and mod_wsgi

I have a Django application using django-mssql to communicate w/ SQL Server. This works just fine in the dev server (runserver) but under Apache/mod-wsgi, I get a error related to it trying to...

Getting a reference to a leafletjs instance from a django-leaflet form

Using django-leaflet I've created a form as follows class AnnotationForm(forms.ModelForm): <crispy forms stuff redacted from here for brevity> class Meta: model = Annotation...

python django - how to unittest endpoints

I'm trying to write django tests to ensure that the login page is available, then to retrieve a test_user, register it in the session and load the authenticated page. Here is my url.py urlpatterns...

python, Django - private media streaming and prevent hijacking

I'm using python 2.7 and Django 1.7 . I need private streaming for project medias such as video and image and preventing from any hijack. Do you know any modules or some thing else for this?

Celery+Django -- How to log non-task module

Currently, my Django+Docker-Compose project is able to use Celery to make the main uploading function, insertIntoDatabase, an asynchronous task that properly runs in the background. I run Celery...

Django API Post method returns 403 error

I am trying to setup the Django API (a POST API endpoint). I want to have the same URL path pointing to the same function that handle differently due to if it is POST or GET. Thus, I used the...

Rewrite `example.com/foo/bar` to `foo.example.com/bar` with nginx. Redirect loop

I have a django app that serves some user content in iframes. To avoid session hijacking I want to serve this up from a different subdomain. I currently have the site hosted at...

Style of hijack button missing

I have: In settings.py: INSTALLED_APPS = ( .. 'hijack', # django-hijack 'compat', .. } ... # django-hijack HIJACK_USE_BOOTSTRAP = True HIJACK_DISPLAY_ADMIN_BUTTON = False # Since we...

Install all packages from a folder with Ansible 2.0

I have a folder where I place unmaintained python packages, so I installed them from the zip rather than from their repository. I am using Ansible 2.0, so the find command seems to be the way to...

How to implement two different user models in Django?

My Django application has two types of users, each with their own authentication mechanism: regular users log in with a username and password, and employees log in via the company's SSO server...

Django runserver with DEBUG True serving the wrong static files

Trying to server staticfiles via runserver for development, with Django 1.10 I have 'django.contrib.staticfiles' in my INSTALLED_APPS and the following relevant settings: STATICFILES_FINDERS = ( ...

Django JWT auth: How to get user data?

I'm trying to desperately understand how to use JWT auth with Django. This page explains how to get a token against username and password: http://getblimp.github.io/django-rest-framework-jwt/ $...

Why am I receiveing 'no module named wagtail' error when I try to launch django app

I have an existing Django Project. I would like to use Wagtail with it. I have followed the instructions here: http://docs.wagtail.io/en/v1.9/getting_started/integrating_into_django.html However...

How do I resolve the "'mathfilter' tag 'addition' stopped working since replicating django project" error?

Recently I moved a Django Project to a new virtual environment. Everything appears to be working fine, with the exception of the following error: TemplateSyntaxError at /profile/ Invalid filter:...

Python Package Malware Ztz

When I try to do pip install requirements.txt of a basic requirements package for django, the following malware runs: Collecting requirements.txt Using cached...

Django/AngularJS: CSFR Token Error

I'm new to both Django and AngularJS and I've been struggling on this for hours. AngularJS Code (of my controller) to POST to Django Server: $http({ method: 'POST', url:...

How to ignore or handle django-hijack from the command line?

I'm writing some unit tests for an existing django project that has had no unit tests to date. When I run the tests from the command line using ./manage.py test I get Traceback (most recent...

Session Hijacking in Django 1.7.7 and python3

I have developed a small application for submitting some data to database server(Oracle 11g). When we are reviewing security of this small application, we observed as follows: 1. We have deployed...

Django user account creation confirmation email

I have a django project where I want to create users, and some time later be able to send a welcome email with a link inviting them to log in and set a password. I'm using django-allauth. I found...

Generate CSRF Token in Ionic Framework

How to generate csrf token in ionic.? i m using django framework as server and wish to post data to server. This are my error: Forbidden (403) CSRF verification failed. Request aborted. You are...

Checking if a string is a prefix of any URL pattern

Inadvisable or not, my Django site assigns each user a page at the root, e.g., /rgov. I use a character set whitelist, so creating index.html or something nefarious should be prevented. My URL...

Django admin returns 403 Forbidden error on Microsoft EDGE after consecutive POST savings or editings

I'm having 403 Forbidden error after saving or editing elements from Django admin, on Microsoft Edge. I'm logged in as superuser, so I have all the permissions for adding/editing elements through...

aerospike python not works under centos 7

What i have running aerospike, test sql go okay installed client lib on same machine via pip3 install aerospike python version default for centos 7 Python 3.4.9 Sample for this page...

Tags for relationship in Django

I'm working on an inventory tracking application. Barebones, just for learning. One issue I'm running into is how products can be related. Categories works fine, but a Logitech G35 Mouse could be...

Enable PK based filtering in Django Graphene Relay while retaining Global IDs

Problem I am using django-graphene with Relay on our GraphQL Server. The implementation imposes a Global ID requirement in the graphene.relay.Node class that overrides and hides Django's ID...

How to pass request over Django channels WebSocket and call Django view

I'm working on a single page application with Django, and would like to use WebSockets, and therefore Channels. To keep things simple, I think I want to handle all server communication over a...

ERROR: MySQL_python-1.2.5-cp27-none-win_amd64.whl is not a supported wheel on this platform

So I am setting up an old project it's Python 2 and Django 1 where I'm stuck with the installation of requirement.txt. This is the main error I'm getting while installing Building wheel for...

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-xaum7z8f/supervisor/

I'm setting up an existing project and when I am running pip install -r requirements.txt After every dependency is installed it gives this error: Command "python setup.py egg_info" failed with...

Django filtered Viewset, need to annotate sum over all filtered rows. Group by "all"?

There are hundreds of questions here on various django annotate/aggregate constructions and filters but I couldn't find this simple use-case asked (or answered). I have a "Payments" model and...

Docker Image > 1GB in size from python:3.8.3-alpine

I'm pretty new to docker and, although I've read lots of articles, tutorials and watched YouTube videos, I'm still finding that my image size is in excess of 1 GB when the alpine image for Python...