Re: errors while trying to add extra context (detailview, __getitem__)

2016-02-26 Thread James Schneider
On Feb 26, 2016 5:55 PM, "Malik Rumi" wrote: > > And here is the code from the original error: > > #!/usr/bin/python > # -*- coding: utf-8 -*- > from django.conf.urls import include, url, patterns > from . import views > from django.views.generic.base import TemplateView > from essell.models impor

empty request object

2016-02-26 Thread Larry Martell
I just integrated a broken django setup, 1.9, python 2.7, nginx, uWSGI, RHEL 6. First thing I observed, the views are not receiving anything in the request object, e.g.: (Pdb) print request Other django systems I've worked with I always get something, e.g.: (Pdb) print request , POST:, COOKIES:

Re: errors while trying to add extra context (detailview, __getitem__)

2016-02-26 Thread Malik Rumi
*OK, so maybeMAYBE I've got this figured out. The problem is here:* https://docs.djangoproject.com/en/1.9/ref/urls/#django.conf.urls.url *I knew this, but note the examples still use the parens()* https://docs.djangoproject.com/en/1.9/ref/urls/#patterns *but that's what patterns is. It i

Re: errors while trying to add extra context (detailview, __getitem__)

2016-02-26 Thread Malik Rumi
JAMES wrote: >>> Can you post the entire section for your urls.py, as well as the entire traceback? Nothing is immediately jumping out at me. Do you get this error when you start the Django server, or when you visit the page that matches this URL? *This error comes when I try to start the serv

Re: errors while trying to add extra context (detailview, __getitem__)

2016-02-26 Thread Malik Rumi
And here is the code from the original error: #!/usr/bin/python # -*- coding: utf-8 -*- from django.conf.urls import include, url, patterns from . import views from django.views.generic.base import TemplateView from essell.models import Code from essell.views import CodeListViewAll #from essell.vi

Re: errors while trying to add extra context (detailview, __getitem__)

2016-02-26 Thread Malik Rumi
Hi James, thanks for replying and I hope you are still online tonight, because I just got this same error again, but this time for my admin: I've been working on this particular project for weeks and it has never complained about this config. File "/home/malikarumi/Projects/cannon/jamf/jamf/u

Re: Parsing PHP-style GET parameters for lists and dicts in Django

2016-02-26 Thread James Schneider
On Fri, Feb 26, 2016 at 2:49 AM, Remco Gerlich wrote: > Hi James, > > I agree with the general dirtyness of PHP and I have used Django > exclusively for years. > > Ah, the way you posed the question I took you to be a recent convert. Sorry about that. ;-) The type of parameter I mean is where,

Re: errors while trying to add extra context (detailview, __getitem__)

2016-02-26 Thread James Schneider
On Fri, Feb 26, 2016 at 2:27 PM, Malik Rumi wrote: > File "/home/malikarumi/Projects/cannon/jamf/essell/urls.py", line 23, in > > url(r'^code/(?P)/', CodeDetailView.as_view(), name='family'), > TypeError: 'function' object has no attribute '__getitem__' > > I understand that DetailView does

Re: bootstrap django crispy forms

2016-02-26 Thread Mike Dewhirst
This is probably wrong for your case but occasionally I have had success overriding (or is that cascading?) style sheets by adding "!important" to the pertinent item in my .css file. On 27/02/2016 2:39 AM, clarksonchri...@gmail.com wrote: A simple upload button is proving difficult to implemen

errors while trying to add extra context (detailview, __getitem__)

2016-02-26 Thread Malik Rumi
File "/home/malikarumi/Projects/cannon/jamf/essell/urls.py", line 23, in url(r'^code/(?P)/', CodeDetailView.as_view(), name='family'), TypeError: 'function' object has no attribute '__getitem__' I understand that DetailView does not have __getitem__. I also understand that __getitem__ is us

Default Site

2016-02-26 Thread dhall
Hi, Shouldn’t django.contrib.sites.models.SiteManager.get_current() first check the given request to determine the current site and then look at the SITE_ID setting? I would like to have multiple Sites and choose the current site based on the context of the request, but fall back to the c

Re: Debugging DJango app on production for High CPU Usage

2016-02-26 Thread Nikolas Stevenson-Molnar
What sort of load are you experiencing in production? Is it possible that you're simply running into a hardware limitation and need to scale? On Thursday, February 25, 2016 at 9:29:22 PM UTC-8, Web Architect wrote: > > Hi Nikolas, > > Cache backend is Redis. The CPU usage is directly proportional

bootstrap django crispy forms

2016-02-26 Thread clarksonchris81
A simple upload button is proving difficult to implement bootstrap and css on My attempt is as follows: class DocumentForm(forms.Form): docfile = forms.FileField(label='Choose') def __init__(self, *args, **kwargs): # don't particularly know or care about this and the bel

Re: How can I use tika in python 3.4

2016-02-26 Thread C. Kirby
If you are using the tika-python package then it has an outstanding but report that it doesn't work with python3 https://github.com/chrismattmann/tika-python/issues/73 Kirby On Friday, February 26, 2016 at 2:20:06 AM UTC-6, Allison wrote: > > The python binding for tika is not working on python

Re: a question about django admin and language

2016-02-26 Thread Will Harris
Hi Paul, If you want the admin site to behave differently than the main site, you could consider running two instances, one with the i18n activated for the main site, and one for admin users with it disabled. In production, from a security standpoint, it's a good idea to have the admin site run

Re: CommonMiddleware ETag processing doesn't work as expected

2016-02-26 Thread Oleksiy Ivanenko
Hi Denis, I'm using django 1.9 Thanks for issue and PR links. It seems reasonable now to upgrade to django 1.9.2 :) On Friday, February 26, 2016 at 2:19:23 PM UTC+2, Denis Cornehl wrote: > > Hi Oleksiy, > > what version of Django are you using? > > There was a bug: > https://code.djangoproject

3 level nested prefetch is not working on Django 1.8.x

2016-02-26 Thread Dheerendra Rathor
Three level nested prefetch with custom queryset throws an Attribute Error. It works perfectly fine on Django 1.9 but I was unable to find release notes or bug fix notes of the same. To reproduce: 1. Install Django 1.8.6+ 2. Add models from https://github.com/DheerendraRathor/Django-bugs/blo

Re: CommonMiddleware ETag processing doesn't work as expected

2016-02-26 Thread Denis Cornehl
Hi Oleksiy, what version of Django are you using? There was a bug: https://code.djangoproject.com/ticket/26024 fixed here https://github.com/django/django/commit/186b6c61bfe85afa4d6bf213d04a28dd2853fed2 which was released in Django 1.9.2 -- Freundliche Grüße Denis Cornehl Sonntagstr.

CommonMiddleware ETag processing doesn't work as expected

2016-02-26 Thread Oleksiy Ivanenko
Hello! I'm trying to use django.middleware.common.CommonMiddleware to set ETags and it seems to me, that I found a bug. if settings.USE_ETAGS: if not response.has_header('ETag'): set_response_etag(response) if response.has_header('ETag'): return get_conditional_response(

Re: Parsing PHP-style GET parameters for lists and dicts in Django

2016-02-26 Thread Remco Gerlich
Hi James, I agree with the general dirtyness of PHP and I have used Django exclusively for years. The type of parameter I mean is where, say a list of two elements [1,2] is sent as http://example.com/?list[0]=1&list[1]=2 So instead of two parameters with the same name, this has two parameters w

Re: Parsing PHP-style GET parameters for lists and dicts in Django

2016-02-26 Thread James Schneider
On Feb 26, 2016 1:21 AM, "Remco Gerlich" wrote: > > I need to work with DataTables, a jQuery-plugin for sortable HTML tables. > > It sends Ajax GET requests with parameters like the following (but urlencoded, of course): > > columns[0][data]=0 > columns[0][name]= > columns[0][searchable]=true > co

Re: Running a Django site on a standalone Windows laptop

2016-02-26 Thread Remco Gerlich
Thank you all for the comments and links! We are going to try to simply run Apache/WSGI on Windows, as that seems to be the most normal and best supported option. I hadn't thought of Cygwin, if we run into trouble maybe we can use something that is part of that. And as a third option there are d

Parsing PHP-style GET parameters for lists and dicts in Django

2016-02-26 Thread Remco Gerlich
I need to work with DataTables, a jQuery-plugin for sortable HTML tables. It sends Ajax GET requests with parameters like the following (but urlencoded, of course): columns[0][data]=0 columns[0][name]= columns[0][searchable]=true columns[0][orderable]=true columns[0][search][value]= columns[0][se

How can I use tika in python 3.4

2016-02-26 Thread Allison
The python binding for tika is not working on python 3.4. How can I use tika in 3.4? Have anyone installed and use it? Thanks. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, s