Using python 3.55 and django 1.10 in my Oauth2 flow (with
django_openid_auth in my installed apps),
my code executes without any errors. But in a python 3.55 and django >=2.0
environment, I get the following error:
Error at /openid/login/
Incorrect padding
I've spent two days searching for w
Bob,
On 8/19/16 8:02 AM, bobhaugen wrote:
> On Friday, August 19, 2016 at 5:20:45 AM UTC-5, Michal Petrucha
wrote:
>
> Moving the call to with_user to form.__init__ solved the
problem in the form ModelChoiceField.
>
> These questions remain unanswered
Michal, thanks for following up.
I'll try your suggested code from your other response upthread and see if
it solves the problem as well as the form.__init__.
And do more digging about how Python does things. I am a self-taught
programmer who focuses on community economic development and I usua
On Fri, Aug 19, 2016 at 02:38:02PM +0200, Michal Petrucha wrote:
> On Fri, Aug 19, 2016 at 05:02:39AM -0700, bobhaugen wrote:
> > On Friday, August 19, 2016 at 5:20:45 AM UTC-5, Michal Petrucha wrote:
> > These questions remain unanswered, although I intend to do a bunch more
> > testing:
> >
> >
On Friday, August 19, 2016 at 7:38:45 AM UTC-5, Michal Petrucha wrote:
>
> Honestly, I'm not sure what exactly you're asking here. Your
> implementation of ``with_user`` was hard-wiring a queryset filter
> based on the state of the database at the time ``with_user`` was
> called. The rest is jus
On Fri, Aug 19, 2016 at 05:02:39AM -0700, bobhaugen wrote:
> On Friday, August 19, 2016 at 5:20:45 AM UTC-5, Michal Petrucha wrote:
> >
> > Could you show us the code of with_user? Maybe it does not return an
> > unevaluated queryset?
> >
> >
> def with_user(self):
> all_agents = Ec
You were calling the method in the class definition. The class is
"defined" when the module is imported. That's why things where
"cached". Module is imported only once.
The init method on the other hand is called every time an instance of
the class is created. I believe that method will be called i
On Friday, August 19, 2016 at 5:20:45 AM UTC-5, Michal Petrucha wrote:
>
> Could you show us the code of with_user? Maybe it does not return an
> unevaluated queryset?
>
>
def with_user(self):
all_agents = EconomicAgent.objects.all()
ua_ids = []
for agent in all_agen
On Thu, Aug 18, 2016 at 11:57:40AM -0700, bobhaugen wrote:
> On Thursday, August 18, 2016 at 1:34:29 PM UTC-5, Tim Graham wrote:
> >
> > I'd guess you're doing a query for the form field's choices at the module
> > level which will be executed once and cached for as long as the server
> > runs. S
Yes, that's what I did. It worked for the form field.
But, still, how pervasive is this behavior? (That was the question in the
message you answered).
On Thursday, August 18, 2016 at 2:18:00 PM UTC-5, Sergiy Khohlov wrote:
>
> Hello,
> This is trivial mistake. Use form.__init__ if you would like
Hello,
This is trivial mistake. Use form.__init__ if you would like to change it
dynamically
18 серп. 2016 22:14 "bobhaugen" пише:
> Also, how pervasive is this behavior? Does it affect all querysets
> generated by model methods? I do that all over the place. This could be bug
> heaven!
>
> --
>
Also, how pervasive is this behavior? Does it affect all querysets
generated by model methods? I do that all over the place. This could be bug
heaven!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop rece
Looks like it works if I "specify queryset=None when declaring the form
field and then populate the queryset in the form’s__init__() method:"
Does that make sense to you?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this
On Thursday, August 18, 2016 at 1:34:29 PM UTC-5, Tim Graham wrote:
>
> I'd guess you're doing a query for the form field's choices at the module
> level which will be executed once and cached for as long as the server
> runs. See if
> https://docs.djangoproject.com/en/stable/ref/forms/fields/#f
st the code for the form in question.
On Thursday, August 18, 2016 at 12:54:15 PM UTC-4, bobhaugen wrote:
>
> I'm running django 1.8.14, I have an odd problem, that I have reproduced
> both locally using runserver and sqlite, and also using Apache with
> Postgres.
>
> I c
I'm running django 1.8.14, I have an odd problem, that I have reproduced
both locally using runserver and sqlite, and also using Apache with
Postgres.
I create a new model instance on one page, and go to another page where
that same object should appear in a form selection list. It doe
When I started out, I had no problems. Starting yesterday, when I type
django-admin.py startproject asitename, all that happens is that notepad
opens with the source file (django-admin.py). This worked properly on
Monday and I can't figure out what I must have done. I am using 32-bit
Win7 Pro
On 4 avr, 17:44, Adam Tonks wrote:
> On Monday, April 4, 2011 4:34:10 PM UTC+1, bruno desthuilliers wrote:
>
> > If you really did test on the very same data set, same forum, *same
> > thread* (IOW ; same value for "self.pk") etc, you would'nt get an
> > IndexError, so there's obviously something
On Monday, April 4, 2011 4:34:10 PM UTC+1, bruno desthuilliers wrote:
>
> If you really did test on the very same data set, same forum, *same
> thread* (IOW ; same value for "self.pk") etc, you would'nt get an
> IndexError, so there's obviously something different.
>
I was literally just adding
On 3 avr, 23:12, Adam Tonks wrote:
> I have a function in a model to return the first post in a forum thread. At
> the moment, it looks like this:
>
> return Post.objects.filter(thread = self.pk).order_by('created')
>
> When I run it in my test forum, the code returns two posts:
>
> [, reply to
Sorry, meant None instead of NULL — crazy past week with lots of JS in
my life!
On Apr 4, 1:35 am, Adam Tonks wrote:
> At the suggestion of someone on IRC, I tried accessing the first result from
> within my template, using {{ thread.original_author.0 }} (where
> original_author is the name of th
Try to instead limit the QuerySet:
try:
post = Post.objects.filter(thread = self.pk).order_by('created')[:
1].get()
except DoesNotExist:
post = NULL
return post # or do something else
http://docs.djangoproject.com/en/1.3/topics/db/queries/#limiting-querysets
On Apr 4, 1:35 am, Adam Tonk
At the suggestion of someone on IRC, I tried accessing the first result from
within my template, using {{ thread.original_author.0 }} (where
original_author is the name of the function with the return statement), and
that works fine.
It's a workaround, but not ideal, as I'll be using it in vari
I have a function in a model to return the first post in a forum thread. At
the moment, it looks like this:
return Post.objects.filter(thread = self.pk).order_by('created')
When I run it in my test forum, the code returns two posts:
[, ]
I then add a [0] to the end of the statement, to just r
Changed the permission and all works good!
Thanks.
On Jan 17, 1:56 pm, "Cal Leeming [Simplicity Media Ltd]"
wrote:
> Hi Alex,
>
> Have you checked to make sure that /home/osmtools/mymedia has read-able
> permissions for the lighttpd user?
>
> Cal
>
> On Mon, Jan 17, 2011 at 10:41 AM, sdonk wrote
What do the lighttpd logs say?
On 1/17/11 2:41 AM, sdonk wrote:
Hi to everybody,
I'm facing with a curious problem with Lighttpd and static files
serving.
Media admin is served by Lighttpd, but mymedia is not served by
Lighttpd.
This is a snippet of my lighttpd.conf
alias.url = (
"/m
Hi Alex,
Have you checked to make sure that /home/osmtools/mymedia has read-able
permissions for the lighttpd user?
Cal
On Mon, Jan 17, 2011 at 10:41 AM, sdonk wrote:
> Hi to everybody,
> I'm facing with a curious problem with Lighttpd and static files
> serving.
> Media admin is served by Lig
Hi to everybody,
I'm facing with a curious problem with Lighttpd and static files
serving.
Media admin is served by Lighttpd, but mymedia is not served by
Lighttpd.
This is a snippet of my lighttpd.conf
alias.url = (
"/mymedia/" => "/home/osmtools/mymedia/",
"/media/" => "/usr/lib
On Sun, Nov 15, 2009 at 4:35 PM, Malcolm MacKinnon wrote:
> Hi,
>
> I'm new to django and am having a problem with the modelformset factory not
> rendering all my form fields.For some odd reason, when I exclude the primary
> key field, prim, it does not render this field in my template below.
> {{
Just going to transfer the view into a real table. Will let you know
if that doesn't solve the problem!
On Jan 19, 12:57 pm, Malcolm Tredinnick
wrote:
> On Mon, 2009-01-19 at 04:38 -0800, phoebebright wrote:
> > Generic view - year_archive, is not working for me. There are no
> > errors displa
On Mon, 2009-01-19 at 04:38 -0800, phoebebright wrote:
> Generic view - year_archive, is not working for me. There are no
> errors displayed and no data either. On investigation, there seems to
> be a mysql error that is causing the problem and it could be related
> to the my using a view instea
Generic view - year_archive, is not working for me. There are no
errors displayed and no data either. On investigation, there seems to
be a mysql error that is causing the problem and it could be related
to the my using a view instead of a table as the source for the mode.
The original date fiel
32 matches
Mail list logo