Search in one table, order by a field in another table

2009-06-02 Thread Larry
this? Many many thanks! -Larry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group,

Re: Search in one table, order by a field in another table

2009-06-02 Thread Larry
Yes, this exactly what I want. Thanks a lot! -Larry On Jun 2, 12:11 pm, Daniel Roseman <roseman.dan...@googlemail.com> wrote: > On Jun 2, 3:04 pm, Larry <yuelizh...@gmail.com> wrote: > > > > > > > Hi, > > > Here is what I want to do: > > >

Django charset problem

2009-07-17 Thread Larry
of the django setting or other problem? Any help would be appreciated. Thanks in advance. -Larry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: Django charset problem

2009-07-20 Thread Larry
some parameters when creating the database, like this create database db_name default character set utf8 collate utf8_general_ci; I haven't changed the my.cnf file, could you tell me which is the best way to configure the MySQL or Django? Thanks a lot! -Larry On Jul 17, 5:43 pm, Andrew Fong <fong

Re: Django charset problem

2009-07-20 Thread Larry
and it will take a long time to recreate and reload them. Thanks!! -Larry On Jul 20, 10:58 am, Andrew Fong <fongand...@gmail.com> wrote: > Yeah, that output doesn't look correct. You're getting back two > characters for ø when there should be just one. > > One possibility is that w

QuerySet method question

2009-09-06 Thread Larry
of User_Item objects, i.e., instead of returning the user-item relation, we only return the items. Thanks, -Larry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: ManytoMany initial values

2010-12-06 Thread Larry
Don't know if you've solved this already, but This works for me and I think is what you're looking for views.py form.fields["groups"].queryset = Groups.objects.filter(profile=profile) I only display the groups that are associated with the profile. My profile is attached to the user via

newforms, manytomany, default value.

2007-06-04 Thread larry
Complete django novice here. I've been able to produce a nice form interface using newforms and various examples. I've run into what I believe may be a common problem with saving many-to-many relationships (of which I have quite a few on the one form) when the user is submitting a new record.

Re: newforms, manytomany, default value.

2007-06-05 Thread larry
form from _several_ objects, 2) how to create the form from several _models_ when the user is trying to add new information and 3) how to instantiate the multiple save objects from the POSTed form. Many thanks for your kind assistance in what I know must be quite a simple operation. -- Larr

Newforms, widgets, adding new fk values on the fly.

2007-06-25 Thread larry
what class or classes need to be extended to handle this are greatly appreciated. -- Larry Lustig --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us

Newforms, MultiSelect, "Hold Down Control" message.

2007-06-25 Thread larry
I've derived a new version of the CheckboxSelectMultiple widget. Unfortunately, just like its parent, it prints a message "Hold down "Control", or "Command" on a Mac, to select more than one." on each field. This instruction, which I assume is coming from an ancestor class, is not appropriate

Re: Newforms, MultiSelect, "Hold Down Control" message.

2007-07-19 Thread larry
xisted, I don't have any other information in there. -- Larry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscr

Date Widget (or date format) in newforms

2007-07-19 Thread larry
, but it doesn't work for this particular application's users. -- Larry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@google

Re: Date Widget (or date format) in newforms

2007-07-19 Thread larry
eems like several steps backwards in terms of out-of-the-box functionality. Thanks -- I'll have another look at the multi-widget. -- Larry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: best resources for learning django

2012-03-02 Thread Larry Martell
On Fri, Mar 2, 2012 at 2:00 PM, Jonathan Holloway wrote: > I sympathise with you.  I'm following the 1.3 online docs and hacking a site > together at the moment. > > an up to date book would be awesome !!! > > I found looking at example projects on Github very useful.

Re: Live search

2012-03-08 Thread Larry Martell
%}{{ value }}{% endif %} {% endfor %} {% endfor %} >From my javascript code, how can I access the data in the table? Do I have to tag the cells in the table with an id or class when I create them? Or is there some other way to do this? Thanks! -larry -- You received this me

Re: Getting URL from within a template

2012-03-13 Thread Larry Martell
On Tue, Mar 13, 2012 at 11:26 AM, Xavier Ordoquy wrote: > Hi > > Le 13 mars 2012 à 18:11, larry.mart...@gmail.com a écrit : > >> From within a template can I find out the URL that caused the template >> to be invoked? > > You usually should have the request object in your

Re: Getting URL from within a template

2012-03-13 Thread Larry Martell
On Tue, Mar 13, 2012 at 11:58 AM, Xavier Ordoquy <xordo...@linovia.com> wrote: > > Le 13 mars 2012 à 18:40, Larry Martell a écrit : > >> On Tue, Mar 13, 2012 at 11:26 AM, Xavier Ordoquy <xordo...@linovia.com> >> wrote: >>> Hi >>> >>&

Getting URL from within a template

2012-03-13 Thread Larry Martell
just grepped through the entire code base and it wasn't found.) > > Furbee > > On Tue, Mar 13, 2012 at 11:27 AM, Larry Martell <larry.mart...@gmail.com> > wrote: >> >> On Tue, Mar 13, 2012 at 11:58 AM, Xavier Ordoquy <xordo...@linovia.com> >> wrote: >> >

Re: Getting URL from within a template

2012-03-13 Thread Larry Martell
On Tue, Mar 13, 2012 at 2:19 PM, Furbee <furbeena...@gmail.com> wrote: > Hi Larry, > > render_to_response is one of many ways to return an HttpResponse to send to > the client. Wherever your view does the return, you can pass these GET > variables. > > However,

Re: Getting URL from within a template

2012-03-13 Thread Larry Martell
client, Django/Python > is done and cannot manipulate the page, unless you are using AJAX to get > updated details. When the URL that gets updated by jQuery is clicked on, it goes back to Django/Python and the {{ request.get_full_path }} gets updated. > On Tue, Mar 13, 2012 at 2:23 PM, L

Re: Django making box

2012-03-13 Thread Larry Martell
On Tue, Mar 13, 2012 at 3:34 PM, Sophia wrote: > Thanks for the help, actually it should be run just on my computer not the > client. In this context the client is the browser. > > On Tuesday, March 13, 2012 1:54:00 PM UTC-7, Javier Guerra wrote: >> >> On Tue, Mar 13,

Re: Getting URL from within a template

2012-03-13 Thread Larry Martell
or backwards through the data (which is a return back to the server), the filter string can get passed back into the template so it can apply the filtering on the new data set > On Tue, Mar 13, 2012 at 2:42 PM, Larry Martell <larry.mart...@gmail.com> > wrote: >> >

Re: Getting URL from within a template

2012-03-14 Thread Larry Martell
re clicking on next or prev to be applied to the new page of data. > > > On Tue, Mar 13, 2012 at 3:01 PM, Larry Martell <larry.mart...@gmail.com> > wrote: >> >> On Tue, Mar 13, 2012 at 3:53 PM, Furbee <furbeena...@gmail.com> wrote: >> > Gotcha,

Re: Getting URL from within a template

2012-03-14 Thread Larry Martell
;> larger lists where lots of records are being filtered by the client browser. >> >> >> On Tue, Mar 13, 2012 at 3:01 PM, Larry Martell <larry.mart...@gmail.com> >> wrote: >>> >>> On Tue, Mar 13, 2012 at 3:53 PM, Furbee <furbeena...@gmail.com> wro

usage of url template tag

2012-03-20 Thread Larry Martell
I'm trying to generate a URL that looks something like this: /report/faloom/EventLog/?message=EventSearchString_ids=13_1=Tool_2=Time_3=Module_4=Message_preview=Generate+Report I have the values for the arguments (message, tool_ids, etc) available to me. My urlconf has: (r'^report/$',

Re: usage of url template tag

2012-03-21 Thread Larry Martell
On Tue, Mar 20, 2012 at 11:04 PM, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Tuesday, 20 March 2012 15:27:27 UTC-7, larry@gmail.com wrote: >> >> I'm trying to generate a URL that looks something like this: >> >> >> /report/faloom/EventLog/?me

using forloop.counter to access data

2012-03-21 Thread Larry Martell
This is probably a stupid newbie question I want to access a column of data in a row using forloop.counter, but I cannot get it to work. In my test code, if I display {{ forloop.counter }} I get 2 If I display {{ headers.0.2 }} I get ToolType But if I display {{ headers.0.forloop.counter }}

Re: using forloop.counter to access data

2012-03-21 Thread Larry Martell
On Wed, Mar 21, 2012 at 7:53 AM, James <eire1...@gmail.com> wrote: > > > On Wednesday, March 21, 2012 8:47:23 AM UTC-4, larry@gmail.com wrote: >> >> This is probably a stupid newbie question >> >> I want to access a column of data in a row usi

Re: using forloop.counter to access data

2012-03-21 Thread Larry Martell
On Wed, Mar 21, 2012 at 8:32 AM, Tom Evans <tevans...@googlemail.com> wrote: > On Wed, Mar 21, 2012 at 12:47 PM, Larry Martell <larry.mart...@gmail.com> > wrote: >> This is probably a stupid newbie question >> >> I want to access a column of data in a

Re: usage of url template tag

2012-03-21 Thread Larry Martell
On Wed, Mar 21, 2012 at 2:06 PM, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Wednesday, 21 March 2012 03:01:23 UTC-7, larry@gmail.com wrote: >> >> >> I'm very new to django. The rest of the URL comes from the index >> function in views.py. I wasn't sure

Re: using forloop.counter to access data

2012-03-21 Thread Larry Martell
On Wed, Mar 21, 2012 at 12:52 PM, James <eire1...@gmail.com> wrote: > > > On Wednesday, March 21, 2012 10:41:08 AM UTC-4, larry@gmail.com wrote: >> >> On Wed, Mar 21, 2012 at 7:53 AM, James <> wrote: >> > >> > >> > On Wednesday, Mar

Adding link to admin page

2012-03-25 Thread Larry Martell
t the link of the page of the app they came from? It's not simply just going back one page, as they could have navigated all over the place of the admin site before clicking the "Back to app" link. Thanks! -larry -- You received this message because you are subscribed to the Google Groups

Re: Adding link to admin page

2012-03-26 Thread Larry Martell
On Mon, Mar 26, 2012 at 4:37 PM, Mike Dewhirst <mi...@dewhirst.com.au> wrote: > On 27/03/2012 9:16am, larry.mart...@gmail.com wrote: >> >> On Mar 25, 3:29 pm, Larry Martell<larry.mart...@gmail.com>  wrote: >>> >>> I have a client that has an app buil

Re: Adding link to admin page

2012-03-26 Thread Larry Martell
On Mon, Mar 26, 2012 at 7:25 PM, Mike Dewhirst <mi...@dewhirst.com.au> wrote: > On 27/03/2012 10:16am, Larry Martell wrote: >> >> On Mon, Mar 26, 2012 at 4:37 PM, Mike Dewhirst<mi...@dewhirst.com.au> >>  wrote: >>> >>> On 27/03/2012 9:16am, larry

Re: Adding link to admin page

2012-03-27 Thread Larry Martell
On Mon, Mar 26, 2012 at 9:19 PM, Mike Dewhirst <mi...@dewhirst.com.au> wrote: > Larry > > Here is a working setup ... > > From settings.py > # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # > # > # if templates are not found h

Upgrading django on a mac

2012-04-07 Thread Larry Martell
I'm on a mac, running Mac OS X Version 10.5.8 (Leopard). I was running django -r 13034 that I got from SVN. I am trying to upgrade to 1.4 from git. After I upgrade, python can no longer find django. Here's what I did: $ cd /usr/local/lib/python2.6/dist-packages $ sudo mv django/ django-13034 $

Re: Upgrading django on a mac

2012-04-07 Thread Larry Martell
jango python package is apparently a subdirectory of the git repository. I did this: mv django django.git ln -s django.git/django django And now it's finding it. > > On Sat, Apr 7, 2012 at 3:33 PM, Larry Martell <larry.mart...@gmail.com> > wrote: >> >> I'm on a mac, runni

Re: Upgrading django on a mac

2012-04-09 Thread Larry Martell
On Mon, Apr 9, 2012 at 4:53 PM, William Deegan <b...@idealgov.com> wrote: > Larry, > > Why not use virtualenv? Or buildout? I am not familiar with either one of those. I use my mac for development for a specific client. I need my environment to match their's as much as possible

executing raw sql

2012-04-30 Thread Larry Martell
I'm trying to execute some raw sql. I found some code that did this: from django.db import connection cursor = connection.cursor() cursor.execute(sql) data = cursor.fetchall() But the cursor.execute(sql) is blowing up with: 'Cursor' object has no attribute '_last_executed' What is the best or

Re: executing raw sql

2012-04-30 Thread Larry Martell
On Mon, Apr 30, 2012 at 12:46 PM, Larry Martell <larry.mart...@gmail.com> wrote: > I'm trying to execute some raw sql. I found some code that did this: > > from django.db import connection > cursor = connection.cursor() > cursor.execute(sql) > data = cursor.fetchall() &g

Re: executing raw sql

2012-04-30 Thread Larry Martell
On Mon, Apr 30, 2012 at 2:32 PM, Larry Martell <larry.mart...@gmail.com> wrote: > On Mon, Apr 30, 2012 at 12:46 PM, Larry Martell <larry.mart...@gmail.com> > wrote: >> I'm trying to execute some raw sql. I found some code that did this: >> >> from d

Re: executing raw sql

2012-04-30 Thread Larry Martell
On Mon, Apr 30, 2012 at 6:26 PM, Dennis Lee Bieber <wlfr...@ix.netcom.com> wrote: > On Mon, 30 Apr 2012 15:29:08 -0600, Larry Martell > <larry.mart...@gmail.com> declaimed the following in > gmane.comp.python.django.user: > >> >> But in django I am doi

Getting checkbox value in controller

2012-05-01 Thread Larry Martell
I have a template that creates a text entry field and a checkbox. When the checkbox is unchecked, the text field is disabled and cleared, when it's checked, it's enabled, and the user may or may not have typed in it. In my controller I need to distinguish between the 2 cases when the checkbox is

Re: Git migration

2012-05-03 Thread Larry Martell
w changes to get 1. 4 to work. In the end it wasn't that bad, but it wasn't seamless. -larry -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this gro

1.4 on git

2012-05-05 Thread Larry Martell
Last month I set up a system and when I cloned django from git I got version 1.4. Now I an setting up another system, and when I clone django from git I get 1.5, and my app is failing. How I can get 1.4? I see a django-nonrel / django-1.4 but it says "Work in progress 1.4 port, DON'T USE" -- You

Re: 1.4 on git

2012-05-06 Thread Larry Martell
ckout 6fbf282ac2b467bd71f807cad45e12a86aa371bd fatal: reference is not a tree: 6fbf282ac2b467bd71f807cad45e12a86aa371bd > 2012/5/6 Ramiro Morales <cra...@gmail.com> >> >> On Sat, May 5, 2012 at 8:42 PM, Larry Martell <larry.mart...@gmail.com> >> wrote: >> &g

Re: 1.4 on git

2012-05-06 Thread Larry Martell
On Sat, May 5, 2012 at 7:06 PM, Ramiro Morales <cra...@gmail.com> wrote: > On Sat, May 5, 2012 at 8:42 PM, Larry Martell <larry.mart...@gmail.com> wrote: >> Last month I set up a system and when I cloned django from git I got >> version 1.4. Now I an setting up anoth

Re: 1.4 on git

2012-05-06 Thread Larry Martell
e development history and it is > available locally. > > You need to get a checkout of the commit pointed to by the '1.4' tag. > IIRC you can achieve that with:: > >  git checkout 1.4 Ok, Thanks. I'll try that next time. I ended up just scp-ing the django dir from my working system.

derived fields and getattr

2012-05-23 Thread Larry Martell
with"object has no attribute 'col1-col2'" Is there some way I can make getattr work for the derived field? TIA! -larry -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups

Re: derived fields and getattr

2012-05-24 Thread Larry Martell
On Thu, May 24, 2012 at 2:27 AM, bruno desthuilliers <bruno.desthuilli...@gmail.com> wrote: > On May 23, 10:39 pm, Larry Martell <larry.mart...@gmail.com> wrote: >> I was asked to make a mod to a large django app that I didn't write. >> They wanted me to add a derived fi

Re: derived fields and getattr

2012-05-24 Thread Larry Martell
On Thu, May 24, 2012 at 9:29 AM, bruno desthuilliers <bruno.desthuilli...@gmail.com> wrote: > On May 24, 3:44 pm, Larry Martell <larry.mart...@gmail.com> wrote: >> On Thu, May 24, 2012 at 2:27 AM, bruno desthuilliers >> >> <bruno.desthuilli...@gmail.com>

Re: derived fields and getattr

2012-05-25 Thread Larry Martell
On Fri, May 25, 2012 at 2:24 AM, bruno desthuilliers <bruno.desthuilli...@gmail.com> wrote: > > On May 24, 11:50 pm, Larry Martell <larry.mart...@gmail.com> wrote: >> I got this to work by adding the derived field to the drill down query >> with queryset.ex

Re: derived fields and getattr

2012-05-25 Thread Larry Martell
On Fri, May 25, 2012 at 6:42 AM, bruno desthuilliers <bruno.desthuilli...@gmail.com> wrote: > On May 25, 2:32 pm, Larry Martell <larry.mart...@gmail.com> wrote: >> On Fri, May 25, 2012 at 2:24 AM, bruno desthuilliers >> >> >> I couldn't use

admin hangs deleting multiple users

2012-06-08 Thread Larry Martell
In my admin site, if I select multiple users, then select 'Delete selected users' and click 'Go', it hangs. I can delete one user at a time with no issues. There is nothing logged anywhere - not in any apache log nor in the mysql log. Where can I look for more info to debug this? -larry -- You

dropping ForeignKey not reflected in admin

2012-06-15 Thread Larry Martell
I have a table that had a ForeignKey reference. In the admin screen for adding to this table there was a dropdown for that column. I want to get rid of that ForeignKey. I changed models.py and removed the ForeignKey column, bounced apache and altered the table and removed that column. In the admin

Re: dropping ForeignKey not reflected in admin

2012-06-15 Thread Larry Martell
ng at the admin for the wrong table. > On Fri, Jun 15, 2012 at 11:37 PM, Larry Martell <larry.mart...@gmail.com> > wrote: >> >> I have a table that had a ForeignKey reference. In the admin screen >> for adding to this table there was a dropdown for that column. I wan

Render time

2012-06-25 Thread Larry Martell
! -larry -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit

Re: Render time

2012-06-25 Thread Larry Martell
On Mon, Jun 25, 2012 at 5:56 AM, bruno desthuilliers <bruno.desthuilli...@gmail.com> wrote: > On Monday, June 25, 2012 1:34:08 PM UTC+2, larry@gmail.com wrote: >> >>  Now they want me to add to that how long >> the browser takes to render the page > >

Using now in an if

2012-06-25 Thread Larry Martell
if does not evaluate to true when the dates match. I need to see if the date in {{ value }} is `today' - how can I do that? -larry -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@

Re: Using now in an if

2012-06-25 Thread Larry Martell
On Mon, Jun 25, 2012 at 6:26 AM, Daniel Roseman <dan...@roseman.org.uk> wrote: > > On Monday, 25 June 2012 13:05:24 UTC+1, larry@gmail.com wrote: >> >> I'm trying to use now in an if like this: >> >> {% if value|date:"Ymd" ==  now "Ymd&quo

Re: Render time

2012-06-26 Thread Larry Martell
On Mon, Jun 25, 2012 at 6:56 AM, Melvyn Sopacua <m.r.sopa...@gmail.com> wrote: > On 25-6-2012 14:00, Larry Martell wrote: >> On Mon, Jun 25, 2012 at 5:56 AM, bruno desthuilliers >> <bruno.desthuilli...@gmail.com> wrote: >>> On Monday, June 25, 2012 1:34:08

Re: Render time

2012-06-26 Thread Larry Martell
On Mon, Jun 25, 2012 at 9:04 PM, Andy McKay wrote: >> Now they want me to add to that how long >> the browser takes to render the page after it gets the data. > > You can use the navigation timing API: > >

javascript in django template not executed when request is sent via ajax

2012-06-29 Thread Larry Martell
, and the alert doesn't show when the request comes from ajax. But if I go to the URL directly it does. Is this a known issue? Is there some way I can get my javascript code to run to install my event handlers when the request comes from ajax? TIA! -larry -- You received this message because you

Re: Render time

2012-06-29 Thread Larry Martell
ss to the performance.timing data. Should that be there or do I have do something to load or enable it? -larry -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.

Re: javascript in django template not executed when request is sent via ajax

2012-06-29 Thread Larry Martell
opacity: 1.0 }); style_preview_table(); } And I have verified that all the non javascript portions of the template are executed, but none of the javascript ones are. > > On Fri, Jun 29, 2012 at 11:45 PM, Larry Martell <larry.mart...@gmail.com> > wrote: >> >>

Re: javascript in django template not executed when request is sent via ajax

2012-06-29 Thread Larry Martell
ording to docs) parse script parts >> correctly. >> >> >> On Fri, Jun 29, 2012 at 11:45 PM, Larry Martell <larry.mart...@gmail.com> >> wrote: >>> >>> I have a django template that has some javascript/jQuery code in it >>> that

Re: javascript in django template not executed when request is sent via ajax

2012-06-30 Thread Larry Martell
On Sat, Jun 30, 2012 at 11:54 AM, Psamathos wrote: > If your web server is in fact serving the content with the incorrect > Content-Type header (You can verify this by inspecting the response in the > Net tab of Firebug or Chrome) jQuery can convert the response

Re: javascript in django template not executed when request is sent via ajax

2012-07-01 Thread Larry Martell
On Fri, Jun 29, 2012 at 2:45 PM, Larry Martell <larry.mart...@gmail.com> wrote: > I have a django template that has some javascript/jQuery code in it > that defines some keyup event handers. If a user goes to the URL > directly the javascript is executed, and the event handers

Re: Fw: PLEASE HELP

2012-07-02 Thread Larry Martell
On Mon, Jul 2, 2012 at 11:45 AM, Cal Leeming [Simplicity Media Ltd] wrote: > Emily, > > Please refrain from sending chain/spam emails to the list, this isn't > acceptable. > > Also - on a site note, you really shouldn't be giving out your entire > mailbox by

Controlling access

2012-07-03 Thread Larry Martell
I have a client that asked me to add some new functionality to their app, and then they said 'This new functionality should be controlled in Django admin so that only the admin user can see it.' Is there a way to control this in Django admin? I know in the python code i can check to see if they're

Re: Controlling access

2012-07-03 Thread Larry Martell
commend checking open-souce projects for a good start. But there's nothing inherently built into Django admin that supports this, correct? > > > On Tue, Jul 3, 2012 at 1:39 PM, Larry Martell <larry.mart...@gmail.com> > wrote: >> >> I have a client that ask

Re: Controlling access

2012-07-03 Thread Larry Martell
foreign key references do). I don't think so, but my client seems to. > > > > On Tue, Jul 3, 2012 at 1:51 PM, Larry Martell <larry.mart...@gmail.com> > wrote: >> >> On Tue, Jul 3, 2012 at 11:49 AM, Robert Steckroth >> <robertsteckr...@gmail.com> wrot

Re: Controlling access

2012-07-03 Thread Larry Martell
On Tue, Jul 3, 2012 at 12:31 PM, Larry Martell <larry.mart...@gmail.com> wrote: > On Tue, Jul 3, 2012 at 11:55 AM, Robert Steckroth > <robertsteckr...@gmail.com> wrote: >> Django is a very open-ended framework. The admin system is built around >> developer/user custo

Re: Render time

2012-07-05 Thread Larry Martell
however I am finding that loadEventEnd is always 0 for me, even though I am accessing it from within a window.onload function, e.g: window.onload = function() { var t = performance.timing; var render_time = parseInt(t['loadEventEnd']) - parseInt(t['responseEnd']); } What do I have to w

Re: Render time

2012-07-05 Thread Larry Martell
On Thu, Jul 5, 2012 at 10:48 PM, Andy McKay wrote: >> I'm trying to use the Navigation Timing package to measure how long a >> page takes to be rendered. > > So you don't want to include all the lookups? Just the "rendering" part? Not sure what you mean by "lookups." I want to

Returning nothing from a view

2012-07-06 Thread Larry Martell
I have a situation where I'm sending an ajax request to a function that updates a row in database. I then want to return control to the browser, with no changes to the page that was up. I am not returning anything from the function, and it's working the way I want, however I get an error in the

Re: Returning nothing from a view

2012-07-06 Thread Larry Martell
s=201) > On Fri, Jul 6, 2012 at 5:44 PM, Larry Martell <larry.mart...@gmail.com> wrote: >> I have a situation where I'm sending an ajax request to a function >> that updates a row in database. I then want to return control to the >> browser, with no changes to the page tha

Re: Render time

2012-07-07 Thread Larry Martell
On Mon, Jun 25, 2012 at 9:04 PM, Andy McKay wrote: >> Now they want me to add to that how long >> the browser takes to render the page after it gets the data. > > You can use the navigation timing API: > >

Detecting browser type after login

2012-07-31 Thread Larry Martell
that javascript code would go, and how I would cause it to get invoked after the login. TIA! -larry -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from

Re: Detecting browser type after login

2012-08-01 Thread Larry Martell
On Tue, Jul 31, 2012 at 8:05 PM, Larry Martell <larry.mart...@gmail.com> wrote: > I've only been working with django for 6 months, and I'm not really > clear on how the login process works. > > I have a client that has a login screen created by a template. It has

Re: Detecting browser type after login

2012-08-01 Thread Larry Martell
> > On Wed, Aug 1, 2012 at 3:11 PM, Larry Martell <larry.mart...@gmail.com> > wrote: >> >> On Tue, Jul 31, 2012 at 8:05 PM, Larry Martell <larry.mart...@gmail.com> >> wrote: >> > I've only been working with django for 6 months, and I'm not reall

Re: Detecting browser type after login

2012-08-01 Thread Larry Martell
g to be presented using Javascript? If so, why not >> use Javascript for this functionality? I'd typically only use this type of >> functionality to serve pages when javascript isn't enabled or you need to >> show various templates based upon the type of browser (for example, a

Re: Detecting browser type after login

2012-08-01 Thread Larry Martell
On Wed, Aug 1, 2012 at 1:52 PM, Larry Martell <larry.mart...@gmail.com> wrote: > On Wed, Aug 1, 2012 at 1:38 PM, Kurtis Mullins <kurtis.mull...@gmail.com> > wrote: >> Sorry for the double-message. Anyways, if you do want to do what that other >> person rec

Re: Detecting browser type after login

2012-08-01 Thread Larry Martell
On Wed, Aug 1, 2012 at 1:56 PM, Larry Martell <larry.mart...@gmail.com> wrote: > On Wed, Aug 1, 2012 at 1:52 PM, Larry Martell <larry.mart...@gmail.com> wrote: >> On Wed, Aug 1, 2012 at 1:38 PM, Kurtis Mullins <kurtis.mull...@gmail.com> >> wrote: >>> Sor

Re: Detecting browser type after login

2012-08-01 Thread Larry Martell
On Wed, Aug 1, 2012 at 3:57 PM, Larry Martell <larry.mart...@gmail.com> wrote: > On Wed, Aug 1, 2012 at 1:56 PM, Larry Martell <larry.mart...@gmail.com> wrote: >> On Wed, Aug 1, 2012 at 1:52 PM, Larry Martell <larry.mart...@gmail.com> >> wrote: >>> On W

Re: Major Trouble Understanding Sessions Documentation

2012-08-02 Thread Larry Martell
On Thu, Aug 2, 2012 at 7:06 AM, Gregory Thompson Jr. wrote: > I'd like to pass form data from one view to another. > > Here's my attempt: > > #Models.py > from django import forms > > class Textizer(forms.Form): > to_textize = forms.CharField(max_length=100) > >

Re: Detecting browser type after login

2012-08-02 Thread Larry Martell
On Thu, Aug 2, 2012 at 8:18 AM, Kurtis Mullins <kurtis.mull...@gmail.com> wrote: > Hey Larry, Thanks for the reply Kurtis. > Okay, let me make sure I understand this correctly. This is, essentially, > the flow of control you'd like to implement: > > 1. User signs in s

Re: Detecting browser type after login

2012-08-02 Thread Larry Martell
On Thu, Aug 2, 2012 at 9:13 AM, Andreas Schosser <a...@state-of-mind.de> wrote: > Hi Larry > >> They want the dialog to pop up on top of the login screen before the >> redirect. I don't know where the code that does this would live or how >> it would get invoked. &g

Re: Detecting browser type after login

2012-08-02 Thread Larry Martell
rk. So I have to still pass them through to whatever they're getting redirected to, and not just stop. > > > On Thu, Aug 2, 2012 at 11:13 AM, Andreas Schosser <a...@state-of-mind.de> > wrote: >> >> Hi Larry >> >> > They want the dialog to pop up on top of

Re: Detecting browser type after login

2012-08-03 Thread Larry Martell
On Thu, Aug 2, 2012 at 8:15 PM, Melvyn Sopacua <m.r.sopa...@gmail.com> wrote: > On 1-8-2012 21:52, Larry Martell wrote: >> On Wed, Aug 1, 2012 at 1:38 PM, Kurtis Mullins <kurtis.mull...@gmail.com> >> wrote: >>> Sorry for the double-message. Anyways, if you do w

Easy way to temporarily disable the need to login

2012-09-05 Thread Larry Martell
We have a django app that requires the users to login. For some testing we want to do, we want to disable this so the app can be run without logging in. Is there some way to easily do this? I've tried commenting out all the @login_required decorations, but then I was getting a 403. I tried

Re: Easy way to temporarily disable the need to login

2012-09-05 Thread Larry Martell
hand without knowing more about your site. > Sorry! Yes, they do depend on a request.user object. Can I hard code the initialization of it? > > On Wed, Sep 5, 2012 at 11:18 AM, Larry Martell <larry.mart...@gmail.com> > wrote: >> >> We have a django app that requires th

Re: Easy way to temporarily disable the need to login

2012-09-05 Thread Larry Martell
without logging in. I've tried to login from python, but I get a 403. I also tried using the requests module - that doesn't give me the 403, but doesn't log me in - it just returns the login page as if the login failed. > > On Wed, Sep 5, 2012 at 11:24 AM, Larry Martell <larry.ma

Re: Easy way to temporarily disable the need to login

2012-09-05 Thread Larry Martell
backend = get_backends()[0] > user = user[0] > user.backend = "%s.%s" % (backend.__module__, > backend.__class__.__name__) #fake authentication > login(request, user) > > You can add that to your testing environnement MIDDLEWA

Re: Easy way to temporarily disable the need to login

2012-09-05 Thread Larry Martell
the top :) > > > On Wed, Sep 5, 2012 at 12:57 PM, Larry Martell <larry.mart...@gmail.com> > wrote: >> >> On Wed, Sep 5, 2012 at 12:21 PM, anthony tresontani >> <dev.tresont...@gmail.com> wrote: >> > We are using a middleware to enforce a user login

Re: Easy way to temporarily disable the need to login

2012-09-05 Thread Larry Martell
your user > login based template tags in all the templates for it to work properly. > > > On Wed, Sep 5, 2012 at 10:36 PM, Larry Martell <larry.mart...@gmail.com> > wrote: >> >> Thanks - but now I'm getting >> >> NameError: "global name 'get_

Re: Easy way to temporarily disable the need to login

2012-09-05 Thread Larry Martell
a for you. You mentioned you wanted to simply > access using urllib. Maybe you could create a small script to extract a CSRF > token from the login page, login with a known (test) user, and continue > passing and extracting the CSRF token as needed? > > > On Wed, Sep 5, 2012 at 1:06 PM

Re: Easy way to temporarily disable the need to login

2012-09-05 Thread Larry Martell
I got Anthony's code to work by adding the appropriate imports: from django.contrib.auth.models import User from django.contrib.auth import get_backends from django.contrib.auth import login Thanks very much!! On Wed, Sep 5, 2012 at 1:06 PM, Larry Martell <larry.mart...@gmail.com>

Re: Easy way to temporarily disable the need to login

2012-09-05 Thread Larry Martell
s: > http://stackoverflow.com/questions/5606083/how-to-set-and-retrieve-cookie-in-http-header-in-python > > Here's some docs on the how to make the CSRF System happy: > https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#how-it-works > > On Wed, Sep 5, 2012 at 2:38 PM, Larry Martel

  1   2   3   4   5   6   7   >