Re: Slow page load performance with a large number of formsets (over 25)

2022-02-08 Thread Steven Smith
What is hard reload? On Monday, February 7, 2022 at 12:43:08 PM UTC-6 abdouli...@gmail.com wrote: > Try hard reload it's little bit faster > > On Mon, Feb 7, 2022, 18:12 Steven Smith wrote: > >> Did this issue ever get resolved? I'm experiencing the same thing. Once &g

Re: Slow page load performance with a large number of formsets (over 25)

2022-02-07 Thread Steven Smith
Did this issue ever get resolved? I'm experiencing the same thing. Once it hits 100 forms or so it gets pretty slow. On Monday, September 22, 2014 at 10:48:52 AM UTC-5 Collin Anderson wrote: > Yes, if you want speed, using javascript and ajax is probably your best > bet. It will probably

Formsets

2022-02-05 Thread Steven Smith
Hello all! I find formsets wildly useful...but very difficult to architect. I have them working...But I am running into a commonly documented problem...They are slow as you build up the number of fields and queries. Are there any general tips that can be used or share on how to improve

Best-practice for "join mailing list" form on every page

2013-08-20 Thread Steven Smith
I've got a simple form with one field that appears in the footer of my site, asking users to enter their email address to subscribe to our mailing list. Rather than duplicate the form-processing logic in every single view, what should I do? - POST to one location, but use a context processor

Re: Design for storing likes/dislikes?

2013-07-19 Thread Steven Smith
I've used NullBooleanField for this before, as well. A lot quicker to query on than a ManyToMany, also. On Tuesday, July 16, 2013 9:24:54 PM UTC-4, donarb wrote: > > On Tuesday, July 16, 2013 5:29:47 PM UTC-7, Victor Hooi wrote: >> >> Hi, >> >> We have a list of users, who are going to

Form Wizard: Redirecting back to a step from inside the done() method

2013-07-18 Thread Steven Smith
I have a form wizard that walks a user through some system configuration steps. In the done() method, the cleaned_data is used to call out to a configuration system to do various set/unset operations. Most of the time, the validation that I have built into my form classes is sufficient.

Re: Weird problem generating forms on the fly

2012-03-09 Thread Steven Smith
I like it. Thanks, Tom! On Mar 9, 11:19 am, Tom Evans <tevans...@googlemail.com> wrote: > On Fri, Mar 9, 2012 at 4:05 PM, Steven Smith <ste...@stevenlsmith.com> wrote: > > I think I figured it out. My TYPE_MAPPING thing was causing the form > > fields to be ini

Re: Weird problem generating forms on the fly

2012-03-09 Thread Steven Smith
I think I figured it out. My TYPE_MAPPING thing was causing the form fields to be initialized *once*. So, I made the contents of TYPE_MAPPING into strings, and I'm using eval(). Unless there's a better way, I'm leaving it like this in production :-) On Mar 9, 10:01 am, Steven Smith <

Weird problem generating forms on the fly

2012-03-09 Thread Steven Smith
I have data that looks like this: formfields = [{'label': u'IP address of hacker', 'type': u'String', 'name': u'locationIp'}, {'label': u'Created end date', 'type': u'Date', 'name': u'createdEndDate'}, {'label': u'Created start date', 'type': u'Date', 'name': u'createdStartDate'}] I want to

Combining Querysets from different, but similar models

2011-10-05 Thread Steven Smith
I'm working on a site that has a requirement for a "recent activity" feed on the homepage. Usually, I'd just do a MyFoo.objects.order_by('- created') and all would be well. But "activity" is actually from several models. They all have some fields in common, like the timestamp, since they all have

Re: Most stable Linux distribution for Django - Python development

2011-08-02 Thread Steven Smith
We're using Gentoo 64-bit on all of our production webservers at work, and I run 4 additional Gentoo-based Django servers outside of work. It took a long time to configure, and is not for the faint of heart. But, my stripped-down versions of Apache and Postgres run really fast with a small

Accessing "request" from within an authentication backend

2011-07-26 Thread Steven Smith
Is there a way to access the HttpResponse, or issue a redirect from within a custom authentication backend? I have Django hooked up to our Active Directory server, and it works perfectly except when the user's password expires or they have "User must change password at next login" set on their

Intermittent OperationalError on multiple Django servers

2011-06-16 Thread Steven Smith
On two separate Django servers, I'm seeing variations on this error: File "/usr/lib64/python2.6/site-packages/django/db/models/sql/ compiler.py", line 731, in execute_sql cursor = self.connection.cursor() File "/usr/lib64/python2.6/site-packages/django/db/backends/ __init__.py", line 75,