Re: Weird issue with transaction.atomic in django 1.6

2014-02-26 Thread tapan pandita
Also there is no other view that could possibly be writing to the same row. 
There are 5 rows in 5 different tables that get affected showing symptoms 
similar to a rollback without any exception being raised. It's really hard 
to imagine all of them had concurrent writes going on at the same time even 
if it was somehow possible.

On Thursday, February 27, 2014 12:38:50 PM UTC+5:30, tapan pandita wrote:
>
> I did initially think that it might have been a concurrent write messing 
> with the DB but I was able to see this issue locally once where this view 
> was the only one being called. The objects being saved were also using 
> update_fields and had the correct value on them while calling save. Is 
> there a db setting or django setting (maybe a default that I haven't 
> changed) that could be interfering with transactions and cause behaviour 
> like this?
>
> I'll turn on logs for the database, but I can't really narrow down on a 
> repro pattern for this which makes it all the more difficult to catch it. 
> I've faced it only once locally. Logging all on our production database is 
> not an option since there are a lot of queries.
>
> On Thursday, February 27, 2014 12:13:28 PM UTC+5:30, Anssi Kääriäinen 
> wrote:
>>
>> On Wednesday, February 26, 2014 11:58:54 PM UTC+2, tapan pandita wrote:
>>>
>>> I am using transaction.atomic as a context manager for transactions in 
>>> django 1.6. There is a block of code which I want to be in a transaction 
>>> which has a couple of network calls and some database writes. I am seeing 
>>> very weird behaviour. Every once in while (maybe 1 in 20 times) I have 
>>> noticed a partial rollback happening without any exception having been 
>>> raised and the view executing without any errors. My application is hosted 
>>> on heroku and we use heroku postgres v9.2.8.
>>>
>>> I have described the problem in greater detail here 
>>> http://stackoverflow.com/questions/22053846/weird-behaviour-for-transactions-in-django-1-6-1
>>>
>>> Any ideas?
>>>
>>
>> Partial rollback shouldn't happen. Are you absolutely sure there is a 
>> rollback? For example concurrent modification could lead to saving old 
>> values back to the DB.
>>
>> One way to check what is happening is to switch on all logging for the 
>> problematic part of code (use "SET log_statement to 'all';") , then 
>> checking database logs. You don't want to turn log_statement to 'all' if 
>> your app generates a lot of queries.
>>
>>  - Anssi
>>
>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cd2c32ad-ab90-480d-8ab6-2dec8cf7fcbe%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Weird issue with transaction.atomic in django 1.6

2014-02-26 Thread tapan pandita
I did initially think that it might have been a concurrent write messing 
with the DB but I was able to see this issue locally once where this view 
was the only one being called. The objects being saved were also using 
update_fields and had the correct value on them while calling save. Is 
there a db setting or django setting (maybe a default that I haven't 
changed) that could be interfering with transactions and cause behaviour 
like this?

I'll turn on logs for the database, but I can't really narrow down on a 
repro pattern for this which makes it all the more difficult to catch it. 
I've faced it only once locally. Logging all on our production database is 
not an option since there are a lot of queries.

On Thursday, February 27, 2014 12:13:28 PM UTC+5:30, Anssi Kääriäinen wrote:
>
> On Wednesday, February 26, 2014 11:58:54 PM UTC+2, tapan pandita wrote:
>>
>> I am using transaction.atomic as a context manager for transactions in 
>> django 1.6. There is a block of code which I want to be in a transaction 
>> which has a couple of network calls and some database writes. I am seeing 
>> very weird behaviour. Every once in while (maybe 1 in 20 times) I have 
>> noticed a partial rollback happening without any exception having been 
>> raised and the view executing without any errors. My application is hosted 
>> on heroku and we use heroku postgres v9.2.8.
>>
>> I have described the problem in greater detail here 
>> http://stackoverflow.com/questions/22053846/weird-behaviour-for-transactions-in-django-1-6-1
>>
>> Any ideas?
>>
>
> Partial rollback shouldn't happen. Are you absolutely sure there is a 
> rollback? For example concurrent modification could lead to saving old 
> values back to the DB.
>
> One way to check what is happening is to switch on all logging for the 
> problematic part of code (use "SET log_statement to 'all';") , then 
> checking database logs. You don't want to turn log_statement to 'all' if 
> your app generates a lot of queries.
>
>  - Anssi
>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/481953ab-c324-499c-9632-34693bb2e359%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Weird issue with transaction.atomic in django 1.6

2014-02-26 Thread Anssi Kääriäinen
On Wednesday, February 26, 2014 11:58:54 PM UTC+2, tapan pandita wrote:
>
> I am using transaction.atomic as a context manager for transactions in 
> django 1.6. There is a block of code which I want to be in a transaction 
> which has a couple of network calls and some database writes. I am seeing 
> very weird behaviour. Every once in while (maybe 1 in 20 times) I have 
> noticed a partial rollback happening without any exception having been 
> raised and the view executing without any errors. My application is hosted 
> on heroku and we use heroku postgres v9.2.8.
>
> I have described the problem in greater detail here 
> http://stackoverflow.com/questions/22053846/weird-behaviour-for-transactions-in-django-1-6-1
>
> Any ideas?
>

Partial rollback shouldn't happen. Are you absolutely sure there is a 
rollback? For example concurrent modification could lead to saving old 
values back to the DB.

One way to check what is happening is to switch on all logging for the 
problematic part of code (use "SET log_statement to 'all';") , then 
checking database logs. You don't want to turn log_statement to 'all' if 
your app generates a lot of queries.

 - Anssi

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f3fc9a79-521e-4b5c-b08d-98e7e585b117%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Integrate with an ADFS Server for Login

2014-02-26 Thread Me Sulphur
Hi Tom,

You understood our requirements precisely. We do not have significant time
or ability to dig deep into platforms like C & SWIG. We have agreed to have
a C# intermediay to do all the ADFS/Windows stuff and use another callback
URL from C# to Django for logging the user in.


Thanks & Regards


On 25 February 2014 18:17, Tom Evans  wrote:

> On Tue, Feb 25, 2014 at 10:44 AM, Me Sulphur  wrote:
> > Hi,
> >
> > For one of our new deployments we need to replace our authentication
> > (django's default) with the client's Single Sign On (SSO). The client
> uses
> > ADFS 2.0 for SSO.
> > None of us have ever worked on .NET/Windows techologies; we tried to
> look up
> > at many places but no leads on where to start. Possibly, the apps -
> > djangosaml2 or pysaml2 - can help but could not figure out how to use
> them
> > for our use case.
> >
> > Please if someone can provide the lead on how to proceed, I'd be
> thankful.
>
> This area isn't well served - for future posters, he is not trying to
> authenticate against LDAP, nor against AD. He wants users to be
> identified by their own organization and identity information passed
> back to his site from the partners AD.
>
> The thing with SAML is that there are lots of different Profiles and
> Transports that describe precisely how to communicate with an Identity
> Provider. The plus side for you is that you are implementing a Service
> Provider (SP) and not as an Identity Provider (IdP) - ie you have a
> site that people log in to, not a site that stores and provides
> identity information.
>
> You will need to determine what interop support ADFS has for SAML 2.0,
> what Profiles and Transports it expects to use.
>
> I don't know much about the libraries you mentioned. We used py-lasso,
> which is a library for producing, interpreting, signing/validating and
> encrypting/decrypting SAML messages. The documentation was . less
> than good. In the most part we relied on reading the C sources to
> lasso and the SWIG bindings to determine what functions to call and
> when.
>
> Plus, we were not doing interop, we were writing our own IdP that
> talked to our own SPs, so we had complete blanket choice over what
> Profiles to use.
>
> I do not think you can achieve this by simply "Install this package,
> add this setting". Happy to be told otherwise!
>
> Cheers
>
> Tom
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/Xkvwii1_HBs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAFHbX1J1e9JMOPaYfKGaWPVcJ%2BWNQyhn0JHxHXqRpNL1HPoA3w%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABSvzZA2vOpY5Uv7C8JRLYEJDaXBTY1ZqiB8b%2BV8CpL%2BoCfKRw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Javascript and sessions

2014-02-26 Thread Luke Baker
Hey there,

(Forgive my ignorance)

My web application is heavily based around form input. I'd like to update 
the user's session with each form input that they update or change while 
working with a form. I'm thinking of implementing some simple javascript 
that listens for 'change' events on each form input. When the 'change' 
event fires, I'd like to make an ajax request to update the users session 
with that form input name and value. To do this, I would have to write a 
view that would allow the user to POST any thing they wanted (essentially) 
to their session - is this safe? It makes me think twice.

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8def111a-84d1-4d2e-aa3b-4d93492db9d2%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django Windows Install Issues

2014-02-26 Thread Mike Dewhirst

On 27/02/2014 7:50am, Vernon D. Cole wrote:


   You need pip


I agree

-- even though it is terrible to install on Windows.

I disagree


See http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows


You have to wade through an awful lot of that page before you see the 
2014 update ...


"To install or upgrade pip, securely download get-pip.py. [1]

Then run the following (which may require administrator access):

python get-pip.py"


[1] https://raw.github.com/pypa/pip/master/contrib/get-pip.py

That link brings up a page which is python code explained in the 
docstring at the top. I just bought a Windows 8.1 laptop and used it to 
install pip. I right-clicked and saved the page as get-pip.py


Then, I opened an administrator prompt and did ...

python get-pip.py

... and it just worked. A little unconventional but much easier than I 
remember from earlier times.


Mike

--
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/530E79CD.10205%40dewhirst.com.au.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Terrible performance when dropping into raw SQL Oracle

2014-02-26 Thread Thomas Lockhart

On 2/26/14 2:41 PM, Shawn H wrote:
Because this worked so well, I've gone directly to cx_Oracle in my 
django view and used that to get the result in the 4 seconds.  There 
is definitely a problem with the Django implementation - I wonder if 
perhaps the indexes on the tables aren't being used properly.

That would seem unlikely since you are specifying the query directly.

If you suspect that Django *is* modifying your query, can you look at 
the query as it arrives to the Oracle backend and compare the two test 
cases?


hth

- Tom


On Wednesday, February 26, 2014 3:49:47 PM UTC-6, Shawn H wrote:

3.8 seconds.  It seems to be django, not cx_Oracle.

On Wednesday, February 26, 2014 2:50:58 PM UTC-6, Shawn H wrote:

Good idea.  I'll try that and report back

On Wednesday, February 26, 2014 1:22:52 PM UTC-6, Tom Evans
wrote:

On Wed, Feb 26, 2014 at 6:16 PM, Shawn H
 wrote:
> Yes.  I've tested with several case numbers, and I'm
using a similar
> parameterized approach in my gui Oracle client as well,
with the same
> results.  It's always about 3 to 4 times slower running
via django.  I've
> tried it both on my local development web server as well
as my production
> apache linux box, and it always takes much longer
running via django.
>
>

If you write a standard python program, ie not using
django, but still
using whatever oracle DB adapter Django uses, that
connects to your
oracle server and executes the query, is it still slow?

IE is the problem something django does, or how the
adapter works.

Cheers

Tom

--
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, send 
an email to django-users+unsubscr...@googlegroups.com.

To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c4ff4ee0-43b8-4d1f-9ef0-6ef93546dcad%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


--
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/530E7179.4000306%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Terrible performance when dropping into raw SQL Oracle

2014-02-26 Thread Shawn H
I said that before testing it.  The exact same code using cx_Oracle takes 
~4 seconds outside of the django environment, but still takes ~16 seconds 
when running in the django view.  What the heck is going on?  Updated 
portion of code below

cnxn = cx_Oracle.connect('notification/notifydev@landmgm')
cursor = cx_Oracle.Cursor(cnxn) #connections['landtest_11'].cursor()
print datetime.datetime.now()
cursor.execute('SELECT count(1) from (SELECT DISTINCT RECORDNUMB FROM 
DEVGIS.NOTICED_PARCELS WHERE CASE_NUMBER = &s AND RECORDNUMB > 0 UNION \
SELECT DISTINCT RECORDNUMB FROM DEVGIS.CONDONOTICE WHERE CASE_NUMBER = &s 
AND RECORDNUMB > 0)', [case_number, case_number])
 print datetime.datetime.now()
number_count = cursor.fetchone()


On Wednesday, February 26, 2014 4:41:06 PM UTC-6, Shawn H wrote:
>
> Because this worked so well, I've gone directly to cx_Oracle in my django 
> view and used that to get the result in the 4 seconds.  There is definitely 
> a problem with the Django implementation - I wonder if perhaps the indexes 
> on the tables aren't being used properly.
>
> On Wednesday, February 26, 2014 3:49:47 PM UTC-6, Shawn H wrote:
>>
>> 3.8 seconds.  It seems to be django, not cx_Oracle.
>>
>> On Wednesday, February 26, 2014 2:50:58 PM UTC-6, Shawn H wrote:
>>>
>>> Good idea.  I'll try that and report back
>>>
>>> On Wednesday, February 26, 2014 1:22:52 PM UTC-6, Tom Evans wrote:

 On Wed, Feb 26, 2014 at 6:16 PM, Shawn H  wrote: 
 > Yes.  I've tested with several case numbers, and I'm using a similar 
 > parameterized approach in my gui Oracle client as well, with the same 
 > results.  It's always about 3 to 4 times slower running via django. 
  I've 
 > tried it both on my local development web server as well as my 
 production 
 > apache linux box, and it always takes much longer running via django. 
 > 
 > 

 If you write a standard python program, ie not using django, but still 
 using whatever oracle DB adapter Django uses, that connects to your 
 oracle server and executes the query, is it still slow? 

 IE is the problem something django does, or how the adapter works. 

 Cheers 

 Tom 

>>>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5eda448d-cb9a-45d1-985f-dce58ab7f824%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Accessing a python function from a blog post stored in the db?

2014-02-26 Thread C. Kirby
It doesn't have to, I guess it depends on how involved the creation tools 
are that you create. Quick and dirty idea off the top of my head:
If the authoring tools define post widgets (body, text, scroller, video, 
etc) you could let authors drag and drop the elements as they wish. On the 
model side, make all resources extend a base class of BlogResource type, 
then for each blog post have a many to many through table that stores 
ordering:
PostID(foriegn=blog)
ResourceID(genericforeignkey to blog resource)
OrderID(int)

or somthing like that.

Regards,
~CK

On Wednesday, February 26, 2014 4:18:14 PM UTC-6, Dennis Marwood wrote:
>
> Won't this force my blog posts to all be the same. i.e. Text then a image 
> scroller? 
> How would I handle the case where a blog post was Text, image scroller, 
> text, image scroller?
>
> On Wednesday, 26 February 2014 13:35:01 UTC-8, C. Kirby wrote:
>>
>> It sounds like your implementation is a little skewed.
>> If a blog post is made of multiple resources (summary, body, multiple 
>> image collections, etc.) You should probably have a model or models with 
>> the appropriate fields/relationships.  That way your template can house all 
>> of the template language, and you build a single, user facing blog post 
>> from the elements in the blog post model(s).
>> This also gives you the benefit of making the various resources available 
>> in other ways (eg. Show all my image collections, share collections, etc) 
>> as well as change your layout in the future without having hard-coded 
>> template calls in your content.
>>
>> Regards
>> ~CK
>>
>> On Wednesday, February 26, 2014 3:18:54 PM UTC-6, Dennis Marwood wrote:
>>>
>>> Thanks. I look forward to trying this soon.
>>>
>>> I feel like I may be trying to swim against the current with this. Is 
>>> this a problem with the way that I have decided to implement my blog or are 
>>> these workarounds typical for django applications?
>>>
>>> On Wednesday, 26 February 2014 04:15:15 UTC-8, Tom Evans wrote:

 On Wed, Feb 26, 2014 at 5:29 AM, Dennis Marwood  
 wrote: 
 > Thanks. I believe this is what I am looking for. However I am still 
 running 
 > into an issue w/ the fact that I am pulling my blog entries from the 
 db. 
 > This is causing the template to interpret the {% image_slider %} as a 
 > string. 
 > 
 > From view.py: 
 > def blog(request): 
 > entries = 
 > Project.objects.filter(destination="blog").order_by('-creation_date') 
 > return render(request, 'content.html', {"entries": entries, 
 >"page_title": "Blog", 
 >"description": 
 "Blog"}) 
 > 
 > And in content.html: 
 > {% for each in entries %} 
 > {{ each.entry }} 
 > {% endfor %} 
 > 
 > And a blog entry: 
 > Hello! Check out this collection of images. {% image_slider %} And 
 this 
 > collection! {% image_slider %} 
 > 
 > 
 > I don't want to hard code the inclusion tag in the content.html. 
 Instead I 
 > want to call it from the blog post. Is this possible? 

 Yes. You will need to write a custom template tag to parse the 
 contents of the object as a template, render it within the current 
 context and return the generated data. 

 Writing a custom template tag: 


 https://docs.djangoproject.com/en/1.6/howto/custom-template-tags/#writing-custom-template-tags
  

 Rendering templates to string: 


 https://docs.djangoproject.com/en/1.6/ref/templates/api/#rendering-a-context
  

 Your content.html would then look something like this, assuming you 
 called the custom tag 'render': 

 {% for each in entries %} 
 {% render each.entry %} 
 {% endfor %} 

 Beware the massive security holes if you allow users to generate 
 content that your site then renders as a template. 

 Cheers 

 Tom 

>>>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cd721dcb-5dd8-40d7-8df9-c7ef74057ecf%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Using Django without templates?

2014-02-26 Thread ApathyBear
I was briefly talking with a developer from Google whom I had met. 

He mentioned something that I hadn't really gotten a chance to ask him more 
about

He told me to be careful with django templates because in terms of scale, 
they can cause problems and almost always need to be re-written. Rather he 
mentioned something like using a 'full stack'.

I think back, and I don't exactly follow what he means by that. Is their a 
way to use Django without templates? Is it better ? Why or why not?

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2aa3d77a-da31-460e-b472-204e2548b69a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Terrible performance when dropping into raw SQL Oracle

2014-02-26 Thread Shawn H
Because this worked so well, I've gone directly to cx_Oracle in my django 
view and used that to get the result in the 4 seconds.  There is definitely 
a problem with the Django implementation - I wonder if perhaps the indexes 
on the tables aren't being used properly.

On Wednesday, February 26, 2014 3:49:47 PM UTC-6, Shawn H wrote:
>
> 3.8 seconds.  It seems to be django, not cx_Oracle.
>
> On Wednesday, February 26, 2014 2:50:58 PM UTC-6, Shawn H wrote:
>>
>> Good idea.  I'll try that and report back
>>
>> On Wednesday, February 26, 2014 1:22:52 PM UTC-6, Tom Evans wrote:
>>>
>>> On Wed, Feb 26, 2014 at 6:16 PM, Shawn H  wrote: 
>>> > Yes.  I've tested with several case numbers, and I'm using a similar 
>>> > parameterized approach in my gui Oracle client as well, with the same 
>>> > results.  It's always about 3 to 4 times slower running via django. 
>>>  I've 
>>> > tried it both on my local development web server as well as my 
>>> production 
>>> > apache linux box, and it always takes much longer running via django. 
>>> > 
>>> > 
>>>
>>> If you write a standard python program, ie not using django, but still 
>>> using whatever oracle DB adapter Django uses, that connects to your 
>>> oracle server and executes the query, is it still slow? 
>>>
>>> IE is the problem something django does, or how the adapter works. 
>>>
>>> Cheers 
>>>
>>> Tom 
>>>
>>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c4ff4ee0-43b8-4d1f-9ef0-6ef93546dcad%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Controlling admin ManyToManyField widget with keyboard

2014-02-26 Thread C. Kirby
Oh, sorry. That widget uses ModelAdmin.filter_horizontal 
(https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.filter_horizontal),
 
it is not the standard admin ManyToMany widget. I just tested it in user 
permissions. I just got it to work by selecting(multiple) elements in one 
widget, tabbing to the move arrow, and clicking enter.
Maybe that will work for you?

Regards,
~CK 

On Wednesday, February 26, 2014 4:03:41 PM UTC-6, cool-RR wrote:
>
> The widget is a combination of two multiple select boxes and arrows to 
> move items between boxes. I have no issues with the selecting part. I have 
> an issue with the moving part.
>
>
> On Wed, Feb 26, 2014 at 11:58 PM, C. Kirby 
> > wrote:
>
>> I don't think I am. A ManyToMany relation in admin is represented as a 
>> select-multiple html widget - is that what we are talking about? 
>>
>> The action that I described in my first message to select multiple 
>> elements in a select-multiple widget works in Firefox, Opera, and with a 
>> modifier in IE. It does not work in Chromium as indicated by the issue I 
>> linked to in the last message.
>>
>> Please let me know if I am missing something in your question.
>>
>> Regards,
>> ~CK
>>
>>
>> On Wednesday, February 26, 2014 3:48:25 PM UTC-6, cool-RR wrote:
>>
>>> Are you sure that you're not confusing the behavior of the select box 
>>> with the toggle action? Because I'm having trouble with the toggle action, 
>>> not the select box.
>>>
>>>
>>> On Wed, Feb 26, 2014 at 8:08 PM, C. Kirby  wrote:
>>>
  It appears that multi-select form widgets cannot be keyboard 
 controlled in chromium, and it is a known bug/non-implementation:

 http://code.google.com/p/chromium/issues/detail?id=90172


 On Wednesday, February 26, 2014 11:28:05 AM UTC-6, cool-RR wrote:

> Sorry, space doesn't do the toggle. (Windows 7 Chrome.)
>
>
> On Wed, Feb 26, 2014 at 6:43 PM, C. Kirby  wrote:
>
>> While holding Ctrl (Command on a Mac), click the spacebar on the 
>> relations you want to select. 
>> Spacebar handles the toggle action, ctrl(command) keeps you in 
>> multi-select mode 
>>
>> On Wednesday, February 26, 2014 6:12:09 AM UTC-6, cool-RR wrote:
>>>
>>> Hi,
>>>
>>>  How do I control the admin ManyToManyField widget with the 
>>> keyboard?
>>>
>>>
>>> Thanks,
>>> Ram.
>>>
>>  -- 
>> You received this message because you are subscribed to a topic in 
>> the Google Groups "Django users" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/django-users/VxFrne7x92E/unsubscribe.
>>  To unsubscribe from this group and all its topics, send an email to 
>> django-users...@googlegroups.com.
>> To post to this group, send email to django...@googlegroups.com.
>>
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/django-users/f8d87dca-9ee6-44f3-b9bc-da7eef05fccc%40goog
>> legroups.com.
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  -- 
 You received this message because you are subscribed to a topic in the 
 Google Groups "Django users" group.
 To unsubscribe from this topic, visit https://groups.google.com/d/
 topic/django-users/VxFrne7x92E/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 django-users...@googlegroups.com.
 To post to this group, send email to django...@googlegroups.com.
 Visit this group at http://groups.google.com/group/django-users.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/django-users/553dcff5-6c89-449a-af29-adfaf24a2996%
 40googlegroups.com.

 For more options, visit https://groups.google.com/groups/opt_out.

>>>
>>>  -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/django-users/VxFrne7x92E/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/6f425681-d3ec-45c4-9157-32047554d759%40googlegroups.com
>> .
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
V

Re: generic.UpdateView and readonly ForeignKeys

2014-02-26 Thread Lachlan Musicman
Ok, I worked it quick and dirty. Do not try this at home, kids.

The field isn't strictly read only anymore, but I no longer mention
the field in question in forms.py

In the template, I've replaced the {{ forms.fk_model }} with {{
object.fk_model }}.

And now the field is plain text (the fk_model.__unicode__ ) instead of
a ModelChoiceField.

Cheers
L.

On 27 February 2014 09:17, Lachlan Musicman  wrote:
> I'm looking for a quick and easy way to implement readonly ForeignKeys
> when using the generic.UpdateView.
>
> I can't see anything that looks simpler than just ditching the
> UpdateView and writing a function based view that sets the FK queryset
> to a single object.
>
> Or have I missed something?
>
> cheers
> L.
>
> --
> From this perspective it is natural that anarchism be marked by
> spontaneity, differentiation, and experimentation that it be marked by
> an expressed affinity with chaos, if chaos is understood to be what
> lies outside or beyond the dominant game or system. Because of the
> resistance to definition and categorisation, the anarchist principle
> has been variously interpreted as, rather than an articulated
> position, “a moral attitude, an emotional climate, or even a mood”.
> This mood hangs in dramatic tension between utopian hope or dystopian
> nihilism...
> -
> http://zuihitsu.org/godspeed-you-black-emperor-and-the-politics-of-chaos



-- 
>From this perspective it is natural that anarchism be marked by
spontaneity, differentiation, and experimentation that it be marked by
an expressed affinity with chaos, if chaos is understood to be what
lies outside or beyond the dominant game or system. Because of the
resistance to definition and categorisation, the anarchist principle
has been variously interpreted as, rather than an articulated
position, “a moral attitude, an emotional climate, or even a mood”.
This mood hangs in dramatic tension between utopian hope or dystopian
nihilism...
-
http://zuihitsu.org/godspeed-you-black-emperor-and-the-politics-of-chaos

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGBeqiPOBK02UgCDVQb-ED%3DsyXOK2PUQsrkrtrg0iQ%2Bkve2k0g%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Accessing a python function from a blog post stored in the db?

2014-02-26 Thread Dennis Marwood
Won't this force my blog posts to all be the same. i.e. Text then a image 
scroller? 
How would I handle the case where a blog post was Text, image scroller, 
text, image scroller?

On Wednesday, 26 February 2014 13:35:01 UTC-8, C. Kirby wrote:
>
> It sounds like your implementation is a little skewed.
> If a blog post is made of multiple resources (summary, body, multiple 
> image collections, etc.) You should probably have a model or models with 
> the appropriate fields/relationships.  That way your template can house all 
> of the template language, and you build a single, user facing blog post 
> from the elements in the blog post model(s).
> This also gives you the benefit of making the various resources available 
> in other ways (eg. Show all my image collections, share collections, etc) 
> as well as change your layout in the future without having hard-coded 
> template calls in your content.
>
> Regards
> ~CK
>
> On Wednesday, February 26, 2014 3:18:54 PM UTC-6, Dennis Marwood wrote:
>>
>> Thanks. I look forward to trying this soon.
>>
>> I feel like I may be trying to swim against the current with this. Is 
>> this a problem with the way that I have decided to implement my blog or are 
>> these workarounds typical for django applications?
>>
>> On Wednesday, 26 February 2014 04:15:15 UTC-8, Tom Evans wrote:
>>>
>>> On Wed, Feb 26, 2014 at 5:29 AM, Dennis Marwood  
>>> wrote: 
>>> > Thanks. I believe this is what I am looking for. However I am still 
>>> running 
>>> > into an issue w/ the fact that I am pulling my blog entries from the 
>>> db. 
>>> > This is causing the template to interpret the {% image_slider %} as a 
>>> > string. 
>>> > 
>>> > From view.py: 
>>> > def blog(request): 
>>> > entries = 
>>> > Project.objects.filter(destination="blog").order_by('-creation_date') 
>>> > return render(request, 'content.html', {"entries": entries, 
>>> >"page_title": "Blog", 
>>> >"description": "Blog"}) 
>>> > 
>>> > And in content.html: 
>>> > {% for each in entries %} 
>>> > {{ each.entry }} 
>>> > {% endfor %} 
>>> > 
>>> > And a blog entry: 
>>> > Hello! Check out this collection of images. {% image_slider %} And 
>>> this 
>>> > collection! {% image_slider %} 
>>> > 
>>> > 
>>> > I don't want to hard code the inclusion tag in the content.html. 
>>> Instead I 
>>> > want to call it from the blog post. Is this possible? 
>>>
>>> Yes. You will need to write a custom template tag to parse the 
>>> contents of the object as a template, render it within the current 
>>> context and return the generated data. 
>>>
>>> Writing a custom template tag: 
>>>
>>>
>>> https://docs.djangoproject.com/en/1.6/howto/custom-template-tags/#writing-custom-template-tags
>>>  
>>>
>>> Rendering templates to string: 
>>>
>>>
>>> https://docs.djangoproject.com/en/1.6/ref/templates/api/#rendering-a-context
>>>  
>>>
>>> Your content.html would then look something like this, assuming you 
>>> called the custom tag 'render': 
>>>
>>> {% for each in entries %} 
>>> {% render each.entry %} 
>>> {% endfor %} 
>>>
>>> Beware the massive security holes if you allow users to generate 
>>> content that your site then renders as a template. 
>>>
>>> Cheers 
>>>
>>> Tom 
>>>
>>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a010cac7-55c9-4d53-bb58-086e0b832c48%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


generic.UpdateView and readonly ForeignKeys

2014-02-26 Thread Lachlan Musicman
I'm looking for a quick and easy way to implement readonly ForeignKeys
when using the generic.UpdateView.

I can't see anything that looks simpler than just ditching the
UpdateView and writing a function based view that sets the FK queryset
to a single object.

Or have I missed something?

cheers
L.

-- 
>From this perspective it is natural that anarchism be marked by
spontaneity, differentiation, and experimentation that it be marked by
an expressed affinity with chaos, if chaos is understood to be what
lies outside or beyond the dominant game or system. Because of the
resistance to definition and categorisation, the anarchist principle
has been variously interpreted as, rather than an articulated
position, “a moral attitude, an emotional climate, or even a mood”.
This mood hangs in dramatic tension between utopian hope or dystopian
nihilism...
-
http://zuihitsu.org/godspeed-you-black-emperor-and-the-politics-of-chaos

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGBeqiPwCmwrgo7f9X5NNLh1kDkJ2wrB6EgKvCH_XCQOJFQV6w%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Controlling admin ManyToManyField widget with keyboard

2014-02-26 Thread Ram Rachum
The widget is a combination of two multiple select boxes and arrows to move
items between boxes. I have no issues with the selecting part. I have an
issue with the moving part.


On Wed, Feb 26, 2014 at 11:58 PM, C. Kirby  wrote:

> I don't think I am. A ManyToMany relation in admin is represented as a
> select-multiple html widget - is that what we are talking about?
>
> The action that I described in my first message to select multiple
> elements in a select-multiple widget works in Firefox, Opera, and with a
> modifier in IE. It does not work in Chromium as indicated by the issue I
> linked to in the last message.
>
> Please let me know if I am missing something in your question.
>
> Regards,
> ~CK
>
>
> On Wednesday, February 26, 2014 3:48:25 PM UTC-6, cool-RR wrote:
>
>> Are you sure that you're not confusing the behavior of the select box
>> with the toggle action? Because I'm having trouble with the toggle action,
>> not the select box.
>>
>>
>> On Wed, Feb 26, 2014 at 8:08 PM, C. Kirby  wrote:
>>
>>>  It appears that multi-select form widgets cannot be keyboard
>>> controlled in chromium, and it is a known bug/non-implementation:
>>>
>>> http://code.google.com/p/chromium/issues/detail?id=90172
>>>
>>>
>>> On Wednesday, February 26, 2014 11:28:05 AM UTC-6, cool-RR wrote:
>>>
 Sorry, space doesn't do the toggle. (Windows 7 Chrome.)


 On Wed, Feb 26, 2014 at 6:43 PM, C. Kirby  wrote:

> While holding Ctrl (Command on a Mac), click the spacebar on the
> relations you want to select.
> Spacebar handles the toggle action, ctrl(command) keeps you in
> multi-select mode
>
> On Wednesday, February 26, 2014 6:12:09 AM UTC-6, cool-RR wrote:
>>
>> Hi,
>>
>>  How do I control the admin ManyToManyField widget with the keyboard?
>>
>>
>> Thanks,
>> Ram.
>>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/to
> pic/django-users/VxFrne7x92E/unsubscribe.
>  To unsubscribe from this group and all its topics, send an email to
> django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
>
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/f8d87dca-9ee6-44f3-b9bc-da7eef05fccc%40goog
> legroups.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

  --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/
>>> topic/django-users/VxFrne7x92E/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> django-users...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/django-users/553dcff5-6c89-449a-af29-adfaf24a2996%
>>> 40googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/VxFrne7x92E/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/6f425681-d3ec-45c4-9157-32047554d759%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANXboVb7D6Vyn2B2cgC26c5%3DdQ-378NMiHR6s-u072iNPaVZOg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Weird issue with transaction.atomic in django 1.6

2014-02-26 Thread tapan pandita
I am using transaction.atomic as a context manager for transactions in
django 1.6. There is a block of code which I want to be in a transaction
which has a couple of network calls and some database writes. I am seeing
very weird behaviour. Every once in while (maybe 1 in 20 times) I have
noticed a partial rollback happening without any exception having been
raised and the view executing without any errors. My application is hosted
on heroku and we use heroku postgres v9.2.8.

I have described the problem in greater detail here
http://stackoverflow.com/questions/22053846/weird-behaviour-for-transactions-in-django-1-6-1

Any ideas?

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMQ_VduDq94YMtcVk5agk0n8OB6dVJbYvUTFg4dPjNCYNH5auA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Controlling admin ManyToManyField widget with keyboard

2014-02-26 Thread C. Kirby
I don't think I am. A ManyToMany relation in admin is represented as a 
select-multiple html widget - is that what we are talking about? 

The action that I described in my first message to select multiple elements 
in a select-multiple widget works in Firefox, Opera, and with a modifier in 
IE. It does not work in Chromium as indicated by the issue I linked to in 
the last message.

Please let me know if I am missing something in your question.

Regards,
~CK

On Wednesday, February 26, 2014 3:48:25 PM UTC-6, cool-RR wrote:
>
> Are you sure that you're not confusing the behavior of the select box with 
> the toggle action? Because I'm having trouble with the toggle action, not 
> the select box.
>
>
> On Wed, Feb 26, 2014 at 8:08 PM, C. Kirby  >wrote:
>
>> It appears that multi-select form widgets cannot be keyboard controlled 
>> in chromium, and it is a known bug/non-implementation:
>>
>> http://code.google.com/p/chromium/issues/detail?id=90172
>>
>>
>> On Wednesday, February 26, 2014 11:28:05 AM UTC-6, cool-RR wrote:
>>
>>> Sorry, space doesn't do the toggle. (Windows 7 Chrome.)
>>>
>>>
>>> On Wed, Feb 26, 2014 at 6:43 PM, C. Kirby  wrote:
>>>
 While holding Ctrl (Command on a Mac), click the spacebar on the 
 relations you want to select. 
 Spacebar handles the toggle action, ctrl(command) keeps you in 
 multi-select mode 

 On Wednesday, February 26, 2014 6:12:09 AM UTC-6, cool-RR wrote:
>
> Hi,
>
>  How do I control the admin ManyToManyField widget with the keyboard?
>
>
> Thanks,
> Ram.
>
  -- 
 You received this message because you are subscribed to a topic in the 
 Google Groups "Django users" group.
 To unsubscribe from this topic, visit https://groups.google.com/d/
 topic/django-users/VxFrne7x92E/unsubscribe.
  To unsubscribe from this group and all its topics, send an email to 
 django-users...@googlegroups.com.
 To post to this group, send email to django...@googlegroups.com.

 Visit this group at http://groups.google.com/group/django-users.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/django-users/f8d87dca-9ee6-44f3-b9bc-da7eef05fccc%
 40googlegroups.com.

 For more options, visit https://groups.google.com/groups/opt_out.

>>>
>>>  -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/django-users/VxFrne7x92E/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/553dcff5-6c89-449a-af29-adfaf24a2996%40googlegroups.com
>> .
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6f425681-d3ec-45c4-9157-32047554d759%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Terrible performance when dropping into raw SQL Oracle

2014-02-26 Thread Shawn H
3.8 seconds.  It seems to be django, not cx_Oracle.

On Wednesday, February 26, 2014 2:50:58 PM UTC-6, Shawn H wrote:
>
> Good idea.  I'll try that and report back
>
> On Wednesday, February 26, 2014 1:22:52 PM UTC-6, Tom Evans wrote:
>>
>> On Wed, Feb 26, 2014 at 6:16 PM, Shawn H  wrote: 
>> > Yes.  I've tested with several case numbers, and I'm using a similar 
>> > parameterized approach in my gui Oracle client as well, with the same 
>> > results.  It's always about 3 to 4 times slower running via django. 
>>  I've 
>> > tried it both on my local development web server as well as my 
>> production 
>> > apache linux box, and it always takes much longer running via django. 
>> > 
>> > 
>>
>> If you write a standard python program, ie not using django, but still 
>> using whatever oracle DB adapter Django uses, that connects to your 
>> oracle server and executes the query, is it still slow? 
>>
>> IE is the problem something django does, or how the adapter works. 
>>
>> Cheers 
>>
>> Tom 
>>
>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6f128b69-badd-4811-b363-a1b3e7d6cd0c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Controlling admin ManyToManyField widget with keyboard

2014-02-26 Thread Ram Rachum
Are you sure that you're not confusing the behavior of the select box with
the toggle action? Because I'm having trouble with the toggle action, not
the select box.


On Wed, Feb 26, 2014 at 8:08 PM, C. Kirby  wrote:

> It appears that multi-select form widgets cannot be keyboard controlled in
> chromium, and it is a known bug/non-implementation:
>
> http://code.google.com/p/chromium/issues/detail?id=90172
>
>
> On Wednesday, February 26, 2014 11:28:05 AM UTC-6, cool-RR wrote:
>
>> Sorry, space doesn't do the toggle. (Windows 7 Chrome.)
>>
>>
>> On Wed, Feb 26, 2014 at 6:43 PM, C. Kirby  wrote:
>>
>>> While holding Ctrl (Command on a Mac), click the spacebar on the
>>> relations you want to select.
>>> Spacebar handles the toggle action, ctrl(command) keeps you in
>>> multi-select mode
>>>
>>> On Wednesday, February 26, 2014 6:12:09 AM UTC-6, cool-RR wrote:

 Hi,

  How do I control the admin ManyToManyField widget with the keyboard?


 Thanks,
 Ram.

>>>  --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/
>>> topic/django-users/VxFrne7x92E/unsubscribe.
>>>  To unsubscribe from this group and all its topics, send an email to
>>> django-users...@googlegroups.com.
>>> To post to this group, send email to django...@googlegroups.com.
>>>
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/django-users/f8d87dca-9ee6-44f3-b9bc-da7eef05fccc%
>>> 40googlegroups.com.
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/VxFrne7x92E/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/553dcff5-6c89-449a-af29-adfaf24a2996%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANXboVZQC34oGdVvgBJ9P1qzbvZJhC34BB_KKma69Jp3A-MP6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Accessing a python function from a blog post stored in the db?

2014-02-26 Thread C. Kirby
It sounds like your implementation is a little skewed.
If a blog post is made of multiple resources (summary, body, multiple image 
collections, etc.) You should probably have a model or models with the 
appropriate fields/relationships.  That way your template can house all of 
the template language, and you build a single, user facing blog post from 
the elements in the blog post model(s).
This also gives you the benefit of making the various resources available 
in other ways (eg. Show all my image collections, share collections, etc) 
as well as change your layout in the future without having hard-coded 
template calls in your content.

Regards
~CK

On Wednesday, February 26, 2014 3:18:54 PM UTC-6, Dennis Marwood wrote:
>
> Thanks. I look forward to trying this soon.
>
> I feel like I may be trying to swim against the current with this. Is this 
> a problem with the way that I have decided to implement my blog or are 
> these workarounds typical for django applications?
>
> On Wednesday, 26 February 2014 04:15:15 UTC-8, Tom Evans wrote:
>>
>> On Wed, Feb 26, 2014 at 5:29 AM, Dennis Marwood  
>> wrote: 
>> > Thanks. I believe this is what I am looking for. However I am still 
>> running 
>> > into an issue w/ the fact that I am pulling my blog entries from the 
>> db. 
>> > This is causing the template to interpret the {% image_slider %} as a 
>> > string. 
>> > 
>> > From view.py: 
>> > def blog(request): 
>> > entries = 
>> > Project.objects.filter(destination="blog").order_by('-creation_date') 
>> > return render(request, 'content.html', {"entries": entries, 
>> >"page_title": "Blog", 
>> >"description": "Blog"}) 
>> > 
>> > And in content.html: 
>> > {% for each in entries %} 
>> > {{ each.entry }} 
>> > {% endfor %} 
>> > 
>> > And a blog entry: 
>> > Hello! Check out this collection of images. {% image_slider %} And this 
>> > collection! {% image_slider %} 
>> > 
>> > 
>> > I don't want to hard code the inclusion tag in the content.html. 
>> Instead I 
>> > want to call it from the blog post. Is this possible? 
>>
>> Yes. You will need to write a custom template tag to parse the 
>> contents of the object as a template, render it within the current 
>> context and return the generated data. 
>>
>> Writing a custom template tag: 
>>
>>
>> https://docs.djangoproject.com/en/1.6/howto/custom-template-tags/#writing-custom-template-tags
>>  
>>
>> Rendering templates to string: 
>>
>>
>> https://docs.djangoproject.com/en/1.6/ref/templates/api/#rendering-a-context 
>>
>> Your content.html would then look something like this, assuming you 
>> called the custom tag 'render': 
>>
>> {% for each in entries %} 
>> {% render each.entry %} 
>> {% endfor %} 
>>
>> Beware the massive security holes if you allow users to generate 
>> content that your site then renders as a template. 
>>
>> Cheers 
>>
>> Tom 
>>
>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ad4f77f1-a18a-4472-9a0c-57792588f2be%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Accessing a python function from a blog post stored in the db?

2014-02-26 Thread Dennis Marwood
Thanks. I look forward to trying this soon.

I feel like I may be trying to swim against the current with this. Is this 
a problem with the way that I have decided to implement my blog or are 
these workarounds typical for django applications?

On Wednesday, 26 February 2014 04:15:15 UTC-8, Tom Evans wrote:
>
> On Wed, Feb 26, 2014 at 5:29 AM, Dennis Marwood 
> > 
> wrote: 
> > Thanks. I believe this is what I am looking for. However I am still 
> running 
> > into an issue w/ the fact that I am pulling my blog entries from the db. 
> > This is causing the template to interpret the {% image_slider %} as a 
> > string. 
> > 
> > From view.py: 
> > def blog(request): 
> > entries = 
> > Project.objects.filter(destination="blog").order_by('-creation_date') 
> > return render(request, 'content.html', {"entries": entries, 
> >"page_title": "Blog", 
> >"description": "Blog"}) 
> > 
> > And in content.html: 
> > {% for each in entries %} 
> > {{ each.entry }} 
> > {% endfor %} 
> > 
> > And a blog entry: 
> > Hello! Check out this collection of images. {% image_slider %} And this 
> > collection! {% image_slider %} 
> > 
> > 
> > I don't want to hard code the inclusion tag in the content.html. Instead 
> I 
> > want to call it from the blog post. Is this possible? 
>
> Yes. You will need to write a custom template tag to parse the 
> contents of the object as a template, render it within the current 
> context and return the generated data. 
>
> Writing a custom template tag: 
>
>
> https://docs.djangoproject.com/en/1.6/howto/custom-template-tags/#writing-custom-template-tags
>  
>
> Rendering templates to string: 
>
>
> https://docs.djangoproject.com/en/1.6/ref/templates/api/#rendering-a-context 
>
> Your content.html would then look something like this, assuming you 
> called the custom tag 'render': 
>
> {% for each in entries %} 
> {% render each.entry %} 
> {% endfor %} 
>
> Beware the massive security holes if you allow users to generate 
> content that your site then renders as a template. 
>
> Cheers 
>
> Tom 
>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/84d40bec-8dfb-4b6d-99e3-9e908fa6fbfc%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Terrible performance when dropping into raw SQL Oracle

2014-02-26 Thread Shawn H
Good idea.  I'll try that and report back

On Wednesday, February 26, 2014 1:22:52 PM UTC-6, Tom Evans wrote:
>
> On Wed, Feb 26, 2014 at 6:16 PM, Shawn H > 
> wrote: 
> > Yes.  I've tested with several case numbers, and I'm using a similar 
> > parameterized approach in my gui Oracle client as well, with the same 
> > results.  It's always about 3 to 4 times slower running via django. 
>  I've 
> > tried it both on my local development web server as well as my 
> production 
> > apache linux box, and it always takes much longer running via django. 
> > 
> > 
>
> If you write a standard python program, ie not using django, but still 
> using whatever oracle DB adapter Django uses, that connects to your 
> oracle server and executes the query, is it still slow? 
>
> IE is the problem something django does, or how the adapter works. 
>
> Cheers 
>
> Tom 
>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2894cbc1-5530-499a-9f20-ce488735a3ee%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django Windows Install Issues

2014-02-26 Thread Vernon D. Cole


On Tuesday, February 25, 2014 2:23:49 PM UTC-7, Joe Buty wrote:
>
> Hello, I am having trouble getting Django to work. I have installed python 
> and downloaded and unzipped the .tar file for django. I am using windows 8 
> ugh and can not open the instal file. I read through the setup.py and I 
> think I need help setting the correct path. Either moving the Django unzip 
> folder or declare where it is. 
>
> If any one can offer me advice or even just describe how they got Django 
> to work, whether its on Win8 or something more useful.
>

Django will run on your machine -- it's a bit of a challenge.  I usually 
switch my dual-boot laptop on to Linux for serious django work, but have it 
set up so that I can maintain the same code on either platform.  Here's 
what you will need:

To get started:...
  You need a copy of a good, general purpose compression/decompression 
utility like 7-zip.   That will unpack your .tar and 
.gz files.

  A copy of Python.  I recommend installing Python 3.3 because the *Python 
Launcher for Windows* makes life on the command line so much easier -- and 
you will be spending a LOT of time running command line commands.  If you 
want to use Python 2.7, then install both.  The launcher will run Python 2 
by default unless you tell it otherwise.  Try to write your programs in a 
Python 2.7 compatible dialect of Python 3, no matter which Python version 
you use.  Learn how to set environment variables, you will need them.

  Some kind of minimal Python IDE.  IDLE (that comes with Python) is not 
the best.  I like the one that comes with 
pywin32. 
If you are going to do anything serious on Windows, (os interface, SQL, 
native graphics ...) you need pywin32. Note: it works in 64 bit Windows, 
too, using the same name.

Then, as soon as you decide to start getting serious:...

  You need pip -- even though it is terrible to install on Windows.  See 
http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows

  A good Python IDE.  If you have already purchased Visual Studio, get Python 
tools for Visual Studio  which works quite 
well with CPython. Otherwise, try the free version of 
PyCharm. 
I run it on both my Windows machine (free version) and Linux (the boss paid 
for the commercial license on that one.)

  A copy of git . It is my least favorite 
distributed source control system, but is the de-facto standard for django 
projects.
  
  virtual env wrapper for 
Windowsto keep your 
different projects from stepping on each other.

 Happy downloading, and good luck in your efforts.
--
VC

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6c07a241-4426-42f1-8d2e-8fdf56e2af45%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Terrible performance when dropping into raw SQL Oracle

2014-02-26 Thread Tom Evans
On Wed, Feb 26, 2014 at 6:16 PM, Shawn H  wrote:
> Yes.  I've tested with several case numbers, and I'm using a similar
> parameterized approach in my gui Oracle client as well, with the same
> results.  It's always about 3 to 4 times slower running via django.  I've
> tried it both on my local development web server as well as my production
> apache linux box, and it always takes much longer running via django.
>
>

If you write a standard python program, ie not using django, but still
using whatever oracle DB adapter Django uses, that connects to your
oracle server and executes the query, is it still slow?

IE is the problem something django does, or how the adapter works.

Cheers

Tom

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFHbX1LfQx%2BUwQ-2uDOGcZnzEFC1bQeA8zQNkmoxMmU7Cw11aQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django with rabbit (but without async celery) - can be done?

2014-02-26 Thread Alon Nisser
I *could *do that (and would fall back to this if needed) but it's 
suboptimal to say the least. celery does this somehow (run inside djano 
context but from without the django process. listen to rabbitmq, etc) so I 
guess it can be done. Looking for an Idea how

On Tuesday, February 25, 2014 6:10:50 PM UTC+2, jondbaker wrote:
>
> Could you write a RESTful API in your Django project, and then issue POST 
> requests to that from a middleman script that the mq could communicate with?
>
> JDB
>
>
> On Tue, Feb 25, 2014 at 8:28 AM, Alon Nisser 
> > wrote:
>
>> I need to implement a quite simple Django server that server some http 
>> requests *and *listens to a rabbitmq message queue that streams 
>> information into the Django app (that should be written to the db). the 
>> data *must* be written to the db in a synchronized order , So I can't 
>> use the obvious celery/rabbit configuration.  I was told that there is no 
>> way to do this in the same Django project. since Django would listen to 
>> http requests on It's process. and It can't handle another process to 
>> listen for Rabbit - forcing me to to add Another python/django project for 
>> the rabbit/db writes part - working with the same models The http bound 
>> django project works with.. You can smell the trouble with this config from 
>> here. .. Any Ideas how to solve this?
>>
>> 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, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/794bf8ca-a15b-40da-97c2-b3a416a35fe0%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>
>  

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/76ffde98-558f-4f06-baf9-d81fd12143a7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django with rabbit (but without async celery) - can be done?

2014-02-26 Thread Alon Nisser
thanks for your response: to clarify:
ordered execution of writes
and the sending process isn't python (so I can't use eager celery for that)

On Tuesday, February 25, 2014 6:12:32 PM UTC+2, Carlos Daniel Ruvalcaba 
Valenzuela wrote:
>
> I'm still not sure of what you need, so there is something (a process) 
> sending a message through rabbitmq with data that needs to be written to 
> the DB, now, this needs to be synchronized, sync with what? an http 
> request? ordered execution of writes?
>
> Regards,
> Carlos Ruvalcaba
>
> On Tue, Feb 25, 2014 at 8:28 AM, Alon Nisser 
> > wrote:
>
>> I need to implement a quite simple Django server that server some http 
>> requests *and *listens to a rabbitmq message queue that streams 
>> information into the Django app (that should be written to the db). the 
>> data *must* be written to the db in a synchronized order , So I can't 
>> use the obvious celery/rabbit configuration.  I was told that there is no 
>> way to do this in the same Django project. since Django would listen to 
>> http requests on It's process. and It can't handle another process to 
>> listen for Rabbit - forcing me to to add Another python/django project for 
>> the rabbit/db writes part - working with the same models The http bound 
>> django project works with.. You can smell the trouble with this config from 
>> here. .. Any Ideas how to solve this?
>>
>> 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, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/794bf8ca-a15b-40da-97c2-b3a416a35fe0%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1a68a44b-4bf1-4d53-b222-54e49a6e8eea%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Terrible performance when dropping into raw SQL Oracle

2014-02-26 Thread Shawn H
Yes.  I've tested with several case numbers, and I'm using a similar 
parameterized approach in my gui Oracle client as well, with the same 
results.  It's always about 3 to 4 times slower running via django.  I've 
tried it both on my local development web server as well as my production 
apache linux box, and it always takes much longer running via django.

On Wednesday, February 26, 2014 11:42:22 AM UTC-6, Nikolas Stevenson-Molnar 
wrote:
>
>  Is the case number the same when you run the query in SqlPlus as when you 
> run it in Django? In other words, are you certain the query is *exactly*the 
> same?
>
> _Nik
>
> On 2/25/2014 2:09 PM, Shawn H wrote:
>  
> I've an app that has to drop into raw sql to run a query in a different 
> Oracle database.  The ORM isn't involved as I'm trying to get a count of 
> rows that meet specific criteria to return that count via an AJAX call. 
>  Running the identical query in SqlPlus takes ~4 seconds.  Django takes ~16 
> seconds.  What might be the problem?  My view function is below.  The 16 
> seconds is between cursor.execute and the if number_count[0][0] lines. 
>  Thanks in advance for the help. 
>
>   def get_number_of_notices(request, case_number):
>   from django.db import connections
> try:
>   cursor = connections['landmgm'].cursor()
>   cursor.execute('SELECT count(1) from (SELECT DISTINCT RECORDNUMB FROM 
> NOTICED_PARCELS WHERE CASE_NUMBER = %s AND RECORDNUMB > 0 UNION \
>   SELECT DISTINCT RECORDNUMB FROM CONDONOTICE WHERE CASE_NUMBER = %s AND 
> RECORDNUMB > 0)', [case_number, case_number])
> number_count = cursor.fetchone()
> if number_count[0][0] <= 0:
>   msg = json.dumps('{"msg":"Notification has not been run for this case", 
> "number_notified":"0", "result":"Fail"}')
>   return HttpResponse(msg, content_type='application/json')
>   else:
>   msg = json.dumps('{"msg":"Notification has been run for this case", 
> "number_notified":"' + str(number_count[0][0]) + '", "result":"Success"}')
>   return HttpResponse(msg, content_type='application/json')
> except:
>   msg = json.dumps('{"msg":"An error was encountered while checking this 
> case number. Please contact GIS Staff.", "result":"Error"}')
>   return HttpResponse(msg, content_type='application/json')
>  
>  -- 
> 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, send an 
> email to django-users...@googlegroups.com .
> To post to this group, send email to django...@googlegroups.com
> .
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/9aeb979c-4cce-4525-b813-2a35558cc62b%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>  

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/06363800-53b3-4a0a-b45f-ad842c7a62ac%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Controlling admin ManyToManyField widget with keyboard

2014-02-26 Thread C. Kirby
It appears that multi-select form widgets cannot be keyboard controlled in 
chromium, and it is a known bug/non-implementation:

http://code.google.com/p/chromium/issues/detail?id=90172

On Wednesday, February 26, 2014 11:28:05 AM UTC-6, cool-RR wrote:
>
> Sorry, space doesn't do the toggle. (Windows 7 Chrome.)
>
>
> On Wed, Feb 26, 2014 at 6:43 PM, C. Kirby  >wrote:
>
>> While holding Ctrl (Command on a Mac), click the spacebar on the 
>> relations you want to select. 
>> Spacebar handles the toggle action, ctrl(command) keeps you in 
>> multi-select mode 
>>
>> On Wednesday, February 26, 2014 6:12:09 AM UTC-6, cool-RR wrote:
>>>
>>> Hi,
>>>
>>>  How do I control the admin ManyToManyField widget with the keyboard?
>>>
>>>
>>> Thanks,
>>> Ram.
>>>
>>  -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/django-users/VxFrne7x92E/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/f8d87dca-9ee6-44f3-b9bc-da7eef05fccc%40googlegroups.com
>> .
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/553dcff5-6c89-449a-af29-adfaf24a2996%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Terrible performance when dropping into raw SQL Oracle

2014-02-26 Thread Nikolas Stevenson-Molnar
Is the case number the same when you run the query in SqlPlus as when
you run it in Django? In other words, are you certain the query is
/exactly/ the same?

_Nik

On 2/25/2014 2:09 PM, Shawn H wrote:
> I've an app that has to drop into raw sql to run a query in a
> different Oracle database.  The ORM isn't involved as I'm trying to
> get a count of rows that meet specific criteria to return that count
> via an AJAX call.  Running the identical query in SqlPlus takes ~4
> seconds.  Django takes ~16 seconds.  What might be the problem?  My
> view function is below.  The 16 seconds is between cursor.execute and
> the if number_count[0][0] lines.  Thanks in advance for the help.
>
> def get_number_of_notices(request, case_number):
> from django.db import connections
> try:
> cursor = connections['landmgm'].cursor()
> cursor.execute('SELECT count(1) from (SELECT DISTINCT RECORDNUMB
> FROM NOTICED_PARCELS WHERE CASE_NUMBER = %s AND RECORDNUMB > 0 UNION \
> SELECT DISTINCT RECORDNUMB FROM CONDONOTICE WHERE CASE_NUMBER = %s
> AND RECORDNUMB > 0)', [case_number, case_number])
> number_count = cursor.fetchone()
> if number_count[0][0] <= 0:
> msg = json.dumps('{"msg":"Notification has not been run for this
> case", "number_notified":"0", "result":"Fail"}')
> return HttpResponse(msg, content_type='application/json')
> else:
> msg = json.dumps('{"msg":"Notification has been run for this
> case", "number_notified":"' + str(number_count[0][0]) + '",
> "result":"Success"}')
> return HttpResponse(msg, content_type='application/json')
> except:
> msg = json.dumps('{"msg":"An error was encountered while checking
> this case number. Please contact GIS Staff.", "result":"Error"}')
> return HttpResponse(msg, content_type='application/json')
>
> -- 
> 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, send
> an email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9aeb979c-4cce-4525-b813-2a35558cc62b%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/530E277E.9090202%40consbio.org.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Controlling admin ManyToManyField widget with keyboard

2014-02-26 Thread Ram Rachum
Sorry, space doesn't do the toggle. (Windows 7 Chrome.)


On Wed, Feb 26, 2014 at 6:43 PM, C. Kirby  wrote:

> While holding Ctrl (Command on a Mac), click the spacebar on the relations
> you want to select.
> Spacebar handles the toggle action, ctrl(command) keeps you in
> multi-select mode
>
> On Wednesday, February 26, 2014 6:12:09 AM UTC-6, cool-RR wrote:
>>
>> Hi,
>>
>> How do I control the admin ManyToManyField widget with the keyboard?
>>
>>
>> Thanks,
>> Ram.
>>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/VxFrne7x92E/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f8d87dca-9ee6-44f3-b9bc-da7eef05fccc%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANXboVa8OiZ1GnNQiCET-rtW4q44oMpbJW3MYAErrY1hgLG-yg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Controlling admin ManyToManyField widget with keyboard

2014-02-26 Thread C. Kirby
While holding Ctrl (Command on a Mac), click the spacebar on the relations 
you want to select. 
Spacebar handles the toggle action, ctrl(command) keeps you in multi-select 
mode 

On Wednesday, February 26, 2014 6:12:09 AM UTC-6, cool-RR wrote:
>
> Hi,
>
> How do I control the admin ManyToManyField widget with the keyboard?
>
>
> Thanks,
> Ram.
>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f8d87dca-9ee6-44f3-b9bc-da7eef05fccc%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Spammed with 'Invalid HTTP_HOST header' messages

2014-02-26 Thread Zac Audette
I am running 1.6 and this also emails me the errors. I was
also assuming by fixed they meant that this is no longer 
an issue but that does not seem to be the case.

On Friday, December 6, 2013 2:55:04 PM UTC-5, Jon Dufresne wrote:
>
> > Can you not add a filter to your logger handler? 
> http://stackoverflow.com/a/19534738 
>
> I will give this a shot. 
>
> But what I don't understand is that the post claims that this is fixed 
> in newer versions. I am using version 1.6. By "fixed" does he simply 
> mean 500 error is now a 400 error? Or is he implying this should not 
> be emailed anymore? I assumed the latter which makes me think 
> something is wrong with my configuration, but I could easily be wrong. 
>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c72fa0a3-9010-483e-80dd-3093e7108c75%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


django + python3 + fastcgi + shared hosting not working

2014-02-26 Thread Héctor Urbina
Hello,

I'm trying to deploy a django project on justhost.com. I have a locally
installed version of python3 and I'm using the development version of
django. I know I have to use fastcgi.

My ~/public_html/uddo/.htaccess is:

AddHandler fastcgi-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ uddo.fcgi/$1 [QSA,L]

and my uddo.fcgi is:

#!~/bin/python3
import sys, os

# Add a custom Python path.
## I installed python3 with --previs=~/, so bin and lib folders are in my
home directory...
sys.path.insert(0, "~/")
sys.path.insert(13, "~/src/uddo")

# Switch to the directory of your project. (Optional.)
os.chdir("~/src/uddo/")

# Set the DJANGO_SETTINGS_MODULE environment variable.
os.environ['DJANGO_SETTINGS_MODULE'] = "uddo.settings"

from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")

However, when reaching the site url, I get a 404 Error - File Not Found.
I find only this on apache's error_log:

[Wed Feb 26 06:49:29 2014] [error] [client xxx.xx.xx.xxx] File does not
exist: ~/public_html/uddo/uddo.fcgi/

Where "~" is actually the path to my home.

Does anyone know what could be wrong?

-- 
Héctor Urbina S.
Ingeniero en Bioinformática
Fono: 82049138

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADHcORibYP2iH%2BtAyAr%3DQ_AMx2z5R9suCu4EK6DgtcGhd6vX1A%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: django + python3 + fastcgi + shared hosting not working

2014-02-26 Thread Héctor Urbina
I'm worry,

where I wrote --previs, it should say --prefix.


2014-02-26 10:55 GMT-03:00 Héctor Urbina :

> Hello,
>
> I'm trying to deploy a django project on justhost.com. I have a locally
> installed version of python3 and I'm using the development version of
> django. I know I have to use fastcgi.
>
> My ~/public_html/uddo/.htaccess is:
>
> AddHandler fastcgi-script .fcgi
> RewriteEngine On
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteRule ^(.*)$ uddo.fcgi/$1 [QSA,L]
>
> and my uddo.fcgi is:
>
> #!~/bin/python3
> import sys, os
>
> # Add a custom Python path.
> ## I installed python3 with --previs=~/, so bin and lib folders are in my
> home directory...
> sys.path.insert(0, "~/")
> sys.path.insert(13, "~/src/uddo")
>
> # Switch to the directory of your project. (Optional.)
> os.chdir("~/src/uddo/")
>
> # Set the DJANGO_SETTINGS_MODULE environment variable.
> os.environ['DJANGO_SETTINGS_MODULE'] = "uddo.settings"
>
> from django.core.servers.fastcgi import runfastcgi
> runfastcgi(method="threaded", daemonize="false")
>
> However, when reaching the site url, I get a 404 Error - File Not Found.
> I find only this on apache's error_log:
>
> [Wed Feb 26 06:49:29 2014] [error] [client xxx.xx.xx.xxx] File does not
> exist: ~/public_html/uddo/uddo.fcgi/
>
> Where "~" is actually the path to my home.
>
> Does anyone know what could be wrong?
>
> --
> Héctor Urbina S.
> Ingeniero en Bioinformática
> Fono: 82049138
>



-- 
Héctor Urbina S.
Ingeniero en Bioinformática
Fono: 82049138

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADHcORhJ4Vv8kkq88BTXn4GGtKCbFjpaeZKnhEACjOSSMvusxQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: View function and URL Conf basic question

2014-02-26 Thread Daniel Roseman
On Wednesday, 26 February 2014 08:10:40 UTC, ApathyBear wrote:
>
> I am brand new to Django, so bare with me.
>
> I am a little confused with this example shown in the Django book:
>
> Here is my urls.py:
>
> from django.conf.urls.defaults import *from mysite.views import hello, 
> current_datetime, hours_ahead
> urlpatterns = patterns('',
> url(r'^hello/$', hello),
> url(r'^time/$', current_datetime),
> url(r'^time/plus/(\d{1,2})/$', hours_ahead),)
>
>
> And here is my View function associated with hours_ahead
>
> from django.http import Http404, HttpResponseimport datetime
> def hours_ahead(request, offset):
> try:
> offset = int(offset)
> except ValueError:
> raise Http404()
> dt = datetime.datetime.now() + datetime.timedelta(hours=offset)
> html = "In %s hour(s), it will be %s." % 
> (offset, dt)
> return HttpResponse(html)
>
>
>
> Now what is throwing me off is how 'offset' is a second argument to  the 
> hours_ahead function. Yet I am not quite sure how it being the second 
> argument makes it the case that it is associated with whatever is entered 
> as a URL. Let me use an example to illustrate my confusion.
>
> Say I request the URL:  http://127.0.0.1:8000/time/plus/2/ . Why is it 
> the case that offset is '2'? I am not seeing why '2' is plucked out? What 
> happened with 'time' and 'plus'? How does python/django know that the '2' 
> is referring to offset?
>
> Thanks for any help in advance.
>
>
That is what the regular expression does in your first snippet. `time` and 
`plus` are just matched, but not captured: the only thing that is captured 
is `(\d{1,2})`, because it is surrounded in parentheses.

If that's not clear for you, you should read a guide to regexes: 
http://regular-expressions.info  is a good one.
--
DR.

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d5955835-48ad-4075-8b7e-f566c62c9ec7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


View function and URL Conf basic question

2014-02-26 Thread ApathyBear
I am brand new to Django, so bare with me.

I am a little confused with this example shown in the Django book:

Here is my urls.py:

from django.conf.urls.defaults import *from mysite.views import hello, 
current_datetime, hours_ahead
urlpatterns = patterns('',
url(r'^hello/$', hello),
url(r'^time/$', current_datetime),
url(r'^time/plus/(\d{1,2})/$', hours_ahead),)


And here is my View function associated with hours_ahead

from django.http import Http404, HttpResponseimport datetime
def hours_ahead(request, offset):
try:
offset = int(offset)
except ValueError:
raise Http404()
dt = datetime.datetime.now() + datetime.timedelta(hours=offset)
html = "In %s hour(s), it will be %s." % (offset, 
dt)
return HttpResponse(html)



Now what is throwing me off is how 'offset' is a second argument to  the 
hours_ahead function. Yet I am not quite sure how it being the second 
argument makes it the case that it is associated with whatever is entered 
as a URL. Let me use an example to illustrate my confusion.

Say I request the URL:  http://127.0.0.1:8000/time/plus/2/ . Why is it the 
case that offset is '2'? I am not seeing why '2' is plucked out? What 
happened with 'time' and 'plus'? How does python/django know that the '2' 
is referring to offset?

Thanks for any help in advance.



-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/eb2a0ef3-983d-41f9-8aea-225bf4174287%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Need Help with modwsgi and Apache

2014-02-26 Thread Mark Phillips
I have a django 1.6 site running on my development machine under runserver,
and another production machine with apache and modwsgi. When I access the
production site within our LAN it works with no issues. When I try to
access the site from outside our lan (ie from the wild and wolly Internet),
I get a 500 error. My ISP blocks port 80, so I use port 7000, which works
to access the site from within the LAN, but not from the outside.

The Apache error log does not give much help, or I am not very good at
understanding what it is telling me. I have set the error level to debug.

When I access the site from within my LAN, I get this information:
[Tue Feb 25 17:45:12.199714 2014] [authz_core:debug] [pid 3261]
mod_authz_core.c(802): [client 192.168.25.150:54397] AH01626: authorization
result of Require all granted: granted, referer:
http://192.168.25.126:7000/mom/inventory/summary
[Tue Feb 25 17:45:12.199850 2014] [authz_core:debug] [pid 3261]
mod_authz_core.c(802): [client 192.168.25.150:54397] AH01626: authorization
result of : granted, referer:
http://192.168.25.126:7000/mom/inventory/summary
[Tue Feb 25 17:45:12.200117 2014] [access_compat:error] [pid 3261] [client
192.168.25.150:54397] AH01797: client denied by server configuration:
/var/www/inventory, referer:
http://192.168.25.126:7000/mom/inventory/summary
[Tue Feb 25 17:45:12.224008 2014] [:info] [pid 3808] mod_wsgi (pid=3808):
Create interpreter 'beagle:7000|/mom'.
[Tue Feb 25 17:45:12.227504 2014] [:info] [pid 3808] mod_wsgi (pid=3808):
Adding '/var/www/mom/' to path.
[Tue Feb 25 17:45:12.228545 2014] [:info] [pid 3808] mod_wsgi (pid=3808):
Adding '/var/www/mom/inventory/' to path.
[Tue Feb 25 17:45:12.229499 2014] [:info] [pid 3808] mod_wsgi (pid=3808):
Adding '/var/www/mom/inventory_project/' to path.
[Tue Feb 25 17:45:12.230452 2014] [:info] [pid 3808] mod_wsgi (pid=3808):
Adding '/var/lib/django-venv/site-packages/' to path.
[Tue Feb 25 17:45:12.232239 2014] [:info] [pid 3808] [client
192.168.25.150:50869] mod_wsgi (pid=3808, process='mom',
application='beagle:7000|/mom'): Loading WSGI script
'/var/www/mom/inventory_project/wsgi.py'.
[Tue Feb 25 17:45:12.625609 2014] [:error] [pid 3808] Settings: SERVER:
beagle, ENVIRONMENT: production
[Tue Feb 25 17:45:13.456659 2014] [deflate:debug] [pid 3261]
mod_deflate.c(764): [client 192.168.25.150:54397] AH01384: Zlib: Compressed
15678 to 2599 : URL /mom/inventory/main, referer:
http://192.168.25.126:7000/mom/inventory/summary
[Tue Feb 25 17:45:13.629065 2014] [authz_core:debug] [pid 3261]
mod_authz_core.c(802): [client 192.168.25.150:54397] AH01626: authorization
result of Require all granted: granted, referer:
http://192.168.25.126:7000/mom/inventory/
[Tue Feb 25 17:45:13.629325 2014] [authz_core:debug] [pid 3261]
mod_authz_core.c(802): [client 192.168.25.150:54397] AH01626: authorization
result of : granted, referer:
http://192.168.25.126:7000/mom/inventory/
[Tue Feb 25 17:45:13.630183 2014] [deflate:debug] [pid 3261]
mod_deflate.c(764): [client 192.168.25.150:54397] AH01384: Zlib: Compressed
1594 to 590 : URL /static/inventory/inventory.css, referer:
http://192.168.25.126:7000/mom/inventory/
[Tue Feb 25 17:45:13.636815 2014] [authz_core:debug] [pid 3260]
mod_authz_core.c(802): [client 192.168.25.150:54398] AH01626: authorization
result of Require all granted: granted, referer:
http://192.168.25.126:7000/mom/inventory/
[Tue Feb 25 17:45:13.636948 2014] [authz_core:debug] [pid 3260]
mod_authz_core.c(802): [client 192.168.25.150:54398] AH01626: authorization
result of : granted, referer:
http://192.168.25.126:7000/mom/inventory/
[Tue Feb 25 17:45:13.638098 2014] [deflate:debug] [pid 3260]
mod_deflate.c(764): [client 192.168.25.150:54398] AH01384: Zlib: Compressed
1765 to 634 : URL /static/inventory/jquery/css/demo_page.css, referer:
http://192.168.25.126:7000/mom/inventory/
[Tue Feb 25 17:45:13.639215 2014] [authz_core:debug] [pid 3262]
mod_authz_core.c(802): [client 192.168.25.150:54399] AH01626: authorization
result of Require all granted: granted, referer:
http://192.168.25.126:7000/mom/inventory/
[Tue Feb 25 17:45:13.639326 2014] [authz_core:debug] [pid 3262]
mod_authz_core.c(802): [client 192.168.25.150:54399] AH01626: authorization
result of : granted, referer:
http://192.168.25.126:7000/mom/inventory/
[Tue Feb 25 17:45:13.640633 2014] [authz_core:debug] [pid 3805]
mod_authz_core.c(802): [client 192.168.25.150:54400] AH01626: authorization
result of Require all granted: granted, referer:
http://192.168.25.126:7000/mom/inventory/
[Tue Feb 25 17:45:13.640745 2014] [authz_core:debug] [pid 3805]
mod_authz_core.c(802): [client 192.168.25.150:54400] AH01626: authorization
result of : granted, referer:
http://192.168.25.126:7000/mom/inventory/
[Tue Feb 25 17:45:13.642023 2014] [deflate:debug] [pid 3805]
mod_deflate.c(764): [client 192.168.25.150:54400] AH01384: Zlib: Compressed
8463 to 2200 : URL /static/inventory/jquery/css/demo_table_jui.css,
referer: http://192.168.25.126:7000/mom/inventory/
[Tue Feb 25 

Re: Integrity Error: column username is not unique

2014-02-26 Thread Ravikumar Patil

 

> from django.shortcuts import get_object_or_404
>
>  get_object_or_404(User,username = request.user)
>

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d17c4c2d-9ebf-4f69-bfd3-dba45b03c056%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Accessing a python function from a blog post stored in the db?

2014-02-26 Thread Tom Evans
On Wed, Feb 26, 2014 at 5:29 AM, Dennis Marwood  wrote:
> Thanks. I believe this is what I am looking for. However I am still running
> into an issue w/ the fact that I am pulling my blog entries from the db.
> This is causing the template to interpret the {% image_slider %} as a
> string.
>
> From view.py:
> def blog(request):
> entries =
> Project.objects.filter(destination="blog").order_by('-creation_date')
> return render(request, 'content.html', {"entries": entries,
>"page_title": "Blog",
>"description": "Blog"})
>
> And in content.html:
> {% for each in entries %}
> {{ each.entry }}
> {% endfor %}
>
> And a blog entry:
> Hello! Check out this collection of images. {% image_slider %} And this
> collection! {% image_slider %}
>
>
> I don't want to hard code the inclusion tag in the content.html. Instead I
> want to call it from the blog post. Is this possible?

Yes. You will need to write a custom template tag to parse the
contents of the object as a template, render it within the current
context and return the generated data.

Writing a custom template tag:

https://docs.djangoproject.com/en/1.6/howto/custom-template-tags/#writing-custom-template-tags

Rendering templates to string:

https://docs.djangoproject.com/en/1.6/ref/templates/api/#rendering-a-context

Your content.html would then look something like this, assuming you
called the custom tag 'render':

{% for each in entries %}
{% render each.entry %}
{% endfor %}

Beware the massive security holes if you allow users to generate
content that your site then renders as a template.

Cheers

Tom

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFHbX1%2BkDdaL5UqY_npcVfnPsZNisffOhzme-C768tC%3DnAycMA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Controlling admin ManyToManyField widget with keyboard

2014-02-26 Thread cool-RR
Hi,

How do I control the admin ManyToManyField widget with the keyboard?


Thanks,
Ram.

-- 
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, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6debf220-f450-4883-9021-502318880e0d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.