Re: Django admin base.html template

2017-04-27 Thread Mike Dewhirst
For example - see below On 28/04/2017 3:38 PM, Mike Dewhirst wrote: I would like to suggest a small change to contrib/admin/templates/admin/base.html ... 33{% block userlinks %} 34{% if site_url %} 35{% trans 'View site' %} / 36

Django admin base.html template

2017-04-27 Thread Mike Dewhirst
I would like to suggest a small change to contrib/admin/templates/admin/base.html ... 33{% block userlinks %} 34{% if site_url %} 35{% trans 'View site' %} / 36{% endif %} 37{% if user.is_active and user.is_staff %}

Decorator help

2017-04-27 Thread Dylan Reinhold
I need some views that the login_required is controlled via a setting, some deployments of the code are open and some are closed (Different sites). So I figured I could just write a quick decorator of my own and have it check the setting before then calling login_required. After trouble with that,

solve disallowedhost issue with AWS

2017-04-27 Thread M
Hi, Im trying to deploy my website using AWS, and I basically just follow the AWS tutorial at http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html. however when I run eb open, it gives me disallowedhost exception, trackback to get_host() call. Plz help. --

Re: Apply default filters in admin

2017-04-27 Thread Nate Granatir
That worked! Thanks!! Nate On Wednesday, April 26, 2017 at 6:37:32 AM UTC-5, Todor Velichkov wrote: > > I think `ModelAdmin.changelist_view > ` > > is the right place. > > class MyModelAd

Re: Channels, Websockets and 'Backpressure'

2017-04-27 Thread Andrew Godwin
Hi Luis, If you are getting ChannelFull exceptions under load it means that the channels are not being drained fast enough, which means you need more worker processes. This means you should run more worker instances. If you are using Docker to run worker instances, you would run multiple copies o

first q

2017-04-27 Thread Hussain Deikna
Hello I am a new in geodjango and I find this class Incidences(models.Model): name = models.CharField(max_length=50) location = models.PointField(srid=4326) objects = models.GeoManager() def __unicode__(self): return self.name class Meta: verbose_name_p

CSRF token missing or incorrect when uploading large file through admin interface

2017-04-27 Thread Duncan Mortimer
Hi, I've developed a software download site using Django 1.11 running on mod_wsgi. We are using the admin site to upload new software releases that are then indexed for download at a later date via Apache (not involving Django). Files are uploaded via the TemporaryFileHandler and then a post sa

Re: How to set mysql database in setting up django setup in eclipse ?

2017-04-27 Thread Pubudu Goonetilleke
I will try that. I thought better IDE would simplify the learning curve. But its true it may hide fundamental understanding with some automated support. On Monday, April 24, 2017 at 7:38:21 AM UTC-7, Derek wrote: > > I'd avoid a more complex tool like Eclipse when starting out - and try > usin

Re: How to set mysql database in setting up django setup in eclipse ?

2017-04-27 Thread Pubudu Goonetilleke
Thank you. Its my bad that I captured the windows with 1.1. Yes I am using 1.11. On Sunday, April 23, 2017 at 5:38:39 PM UTC-7, Vijay Khemlani wrote: > > I don't use Eclipse for development, but your screenshot says "Django > version 1.1 or earlier" which is awfully old, we are at 1.11, as in

RE: please im new to django.Need help understanding small code of django poll app.Highlighted with ******************

2017-04-27 Thread Matthew Pava
You are creating a dictionary with the name “context”. A dictionary is initialized by surrounding key-value pairs in braces. { } The key and the value is separated by a colon. : The pairs are separated from each other by a comma. , Example: dictionary = { key1: value1, key2: value2, key3: value3

Re: Channels, Websockets and 'Backpressure'

2017-04-27 Thread Luís Antonio De Marchi
First I need to ask for patience with my English, the translator is helping. We are creating an project with forecasts of millions of connections per second. We've never worked with websocket before, I heard that Crossbar.io was better. But I've been playing with Django Channels for some time an

Where is django-admin?

2017-04-27 Thread Pelle Pälsänger
Hi! I try to learn how to create web apps with django following https://pythonprogramming.net/django-web-development-with-python-intro/. I have done: c:\Python34\Lib\site-packages>git clone https://github.com/django/django.git c:\Python34\Lib\site-packages>py -m pip install Django==1.11 Then dj

Where is django-admin?

2017-04-27 Thread Pelle Pälsänger
Hi! I try to learn how to create web apps with django on windows10. I have downloaded django1.11 ($git clone https://github.com/django/django.git) and installed it ($py -m pip install Django==1.11). I follow https://pythonprogramming.net/django-web-development-with-python-intro/ Then I try to

please im new to django.Need help understanding small code of django poll app.Highlighted with ******************

2017-04-27 Thread Pachal Phillip
polls/views.py from django.http import HttpResponsefrom django.template import loader from .models import Question def index(request): latest_question_list = Question.objects.order_by('-pub_date')[:5] template = loader.get_template('polls/index.html') please Explain me this

p12 certs to pem etc

2017-04-27 Thread MikeKJ
Using this snippet from The Random Engineer from OpenSSL.crypto import load_pkcs12, FILETYPE_PEM, FILETYPE_ASN1 with open('cert.p12', 'rb') as f: c = f.read() p = load_pkcs12(c, 'passphrase') certificate = p.get_certificate() private_key = p.get_privatekey() # Where type is FILETYPE_PEM

Re: Multiplex results from (Django-Channels)

2017-04-27 Thread Avraham Serour
You should just get the room object attribute you need, like name or id, instead of concatenating the whole object On Apr 27, 2017 5:26 AM, "Yarnball" wrote: > I do appreciate the bit of direction youve provided. And if you're asking > to be paid, then sorry but I'm working free on a community p