If I understand you correctly, you have an add (or update) form and you want to
see what those fields would look like in a preview display (like a paper form
equivalent). I would use an add/update form to input the data fields. At the
bottom have 2 buttons: one would do the add/update without pr
I didn’t see a “createsuperuser" command. Was that done or is it part of your
fixtures.json load?
Jim
On Apr 24, 2021, at 8:04 AM, Ejike Enyinnaya
mailto:ejike.chib...@gmail.com>> wrote:
Good day Kasper,
Thanks for your response.
The git commands I put in the email was just to give a summary
Neha, try changing your template for loop from:
{% for results in formdata %}
To:
{% for results in search %}
The name of your queryset in your context (d = {'search': search, 'fd': fd,
'td': td}) is search, not formdata.
Also, I’d recommend improving your names. Things like “data” and “result
I think Kevin’s issue is that it takes a huge amount of runtime to create the
FK’s select HTML tag - Django having to go through 1M rows before displaying
the page. This issue is true in UpdateView CBVs as well.
Changing the situation slightly - I’m talking about just primary keys from here
on
’):
…
Good luck!
Jim Illback
> On May 9, 2020, at 6:15 AM, Nirantar Kulkarni wrote:
>
> html template
> name="sub_form">
> {% csrf_token %}
> {{name}}
>"wordcloud">WordCloud
>&qu
Check out this URL and the embedded Django link in the answers:
https://stackoverflow.com/questions/1700661/how-to-access-array-elements-in-a-django-template.
On Nov 20, 2019, at 10:25 AM, Andrew Stringfield
mailto:loneso...@gmail.com>> wrote:
I have not! I did see something about that on a w
Have you tried for the first element, and so forth? Of
course, you have to keep track of the number of entries.
> On Nov 20, 2019, at 5:57 AM, Andrew Stringfield wrote:
>
> Okie-dokie. Thank you.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django
at 01:18:34? The -08 timezone designation proves that easily. Isn’t this a bug
in Django? Is it limited to just version 2.2.2?
Thanks for any help with this issue,
Jim Illback
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To u
o has chosen this seemingly “inversion”
of processing - first models’ processes, then forms’? And, perhaps more
importantly, where should this either/or logic should be placed so it will take
effect?
Thanks very much,
Jim Illback
On Jul 13, 2019, at 11:48 PM, Mike Dewhirst
mailto:mi...@dewhirst.c
I think you can also add to your class (right under your template_name… for
example) this statement:
permission_required = ‘appname.permission_name'
This will limit to logged on users (as below), and also to users who possess
this permission.
Jim
On May 28, 2019, at 9:55 AM, Joe Rei
This error comes when there is a {% url %} tag that is not set up properly -
like the views.py line highlighted below. So, I suspect you have such a tag say
tied to a button on the html page, but it isn’t included in this thread.
There’s another error in the code not related to your reverse erro
Below, post is a DB row, not an ID as the URL.py requires.
Change the view as:
return render(request, ‘blog/post_details.html’, {‘pk’: posts[‘id’]})
Jim
On May 23, 2019, at 11:10 AM, Rock N Roll Mühlbacher
mailto:chmuhlbache...@gmail.com>> wrote:
Am Donnerstag, 23. Mai 2019 20:06:31 UTC+2 sc
Sorry this is late.
I’d use the annotate to get the Max of one FK. Then, do a query on the other FK
table with inverted order_by and use the [0] notation to just retrieve the
latest row. It is 2 queries, but FK processes are indexed and should be fast.
Hope this helps.
Jim Illback
On Apr 23
etterthancomplex.com/2015/12/04/package-of-the-week-django-widget-tweaks.html.
I hope this is useful for you.
Jim Illback
On May 12, 2019, at 3:03 PM, Tim Johnson
mailto:t...@akwebsoft.com>> wrote:
* Joe Reitman mailto:jreitma...@gmail.com>> [190512
13:34]:
Tim,
I found this in
Op 24 aug. 2018, om 21:28 heeft Jim Illback
mailto:subaru...@hotmail.com>> het volgende geschreven:
Vijay, your suggestion worked. I had tried this previously but it was using a
FBV and it didn’t work. But with this CBV app, it works perfectly. Thanks.
Matthew, I’ll definitely keep your s
system will still have to
load all 37K values. I guess I’m missing something in your explanation.
From: django-users@googlegroups.com<mailto:django-users@googlegroups.com>
[mailto:django-users@googlegroups.com] On Behalf Of Jim Illback
Sent: Friday, August 24, 2018 1:16 PM
To: Django users
As far as I know, it doesn't need to (if the entry already exists in the
database and you are just editing it), you just need to set up the fields that
you want to be editable by the user
On Fri, Aug 24, 2018 at 2:06 PM Jim Illback
mailto:subaru...@hotmail.com>> wrote:
Vijay, think
l with thousands of
records? like rendering a select combo box with thousands of choices?
On Thu, Aug 23, 2018 at 5:30 PM Jim Illback
mailto:subaru...@hotmail.com>> wrote:
I have a Django app in development that performed perfectly with about 20
client records. Each client could have one or
I have a Django app in development that performed perfectly with about 20
client records. Each client could have one or more support records and there
are 40 potential support records, connected to the client with a ForeignKey
(client_id). Then, I loading about 37K client records. Search queries
Add another field, say asap = model.BooleanField(default=False), sort by asap,
date in reverse. The field asap True values will be sorted first, then the asap
False will be sorted by date. You may want to ensure asap = False only if date
is not None.
On Jul 5, 2018, at 10:05 AM, 'dtdave' via Dj
ance=checkin, initial={'ci_id': checkinid}) # pass
in the value(s) needed in __init__()
...
That is pretty much it - simple if you have the proper documentation on how to
initialize forms.
Jim
On Apr 27, 2018, at 11:39 AM, Jim Illback
mailto:subaru...@hotmail.com>> wro
ps.com<mailto:django-users@googlegroups.com>
[mailto:django-users@googlegroups.com] On Behalf Of Jim Illback
Sent: Friday, April 27, 2018 11:33 AM
To: Django users
Subject: Re: Dynamically altering a (ForeignKey) ModelChoiceField’s values
I also need to have the specific ID specified in the URL
helps!
From: django-users@googlegroups.com<mailto:django-users@googlegroups.com>
[mailto:django-users@googlegroups.com] On Behalf Of Jim Illback
Sent: Friday, April 27, 2018 11:16 AM
To: Django users
Subject: Re: Dynamically altering a (ForeignKey) ModelChoiceField’s values
To make this eas
displayed?
Thanks for any help to answer this question.
Jim Illback
On Apr 25, 2018, at 10:41 AM, Jim Illback
mailto:subaru...@hotmail.com>> wrote:
I wondered if anyone has had to alter the queryset behind a model form’s
foreign key field which presents as a model choice field?
Briefly,
I wondered if anyone has had to alter the queryset behind a model form’s
foreign key field which presents as a model choice field?
Briefly, I have a client attribute table with the foreign key to a chore/time
table. For an add of the client attribute table, I want to limit entries to
unassigned
comment out that same
code, uncomment the real code shown above, and run migrations again. It works,
but it seems a bit awkward.
Has anyone else had this issue? Or am I doing something wrong?
Thanks much,
Jim Illback
On Aug 18, 2017, at 1:21 AM, James Bennett >
wrote:
On Thu, Aug 17, 2017 a
anyone else had this issue? Or am I doing something wrong?
Thanks much,
Jim Illback
On Aug 18, 2017, at 1:21 AM, James Bennett
mailto:ubernost...@gmail.com>> wrote:
On Thu, Aug 17, 2017 at 1:03 PM, Antonis Christofides
mailto:anto...@djangodeployment.com>> wrote:
Second, just to
Super advice - thanks very much, James! Appreciate your help.
Jim
On Jul 30, 2017, at 5:55 PM, James Schneider
mailto:jrschneide...@gmail.com>> wrote:
On Jul 30, 2017 4:50 PM, "Jim Illback"
mailto:subaru...@hotmail.com>> wrote:
Thanks for your reply, James. Appreciate
On Jul 30, 2017, at 4:51 AM, James Schneider
mailto:jrschneide...@gmail.com>> wrote:
On Jul 28, 2017 5:56 PM, "Jim Illback"
mailto:subaru...@hotmail.com>> wrote:
I use the latest versions of Django, python, bootstrap3, and crispy forms for
this project.
I am
(array.length-1); i >= 0; i--) {
if (i == a) {
array.pop();
}
else {
hold.push(array.pop());
}
}
return hold;
}
}
function strToArray(txt) {
var array = [];
var i = 0;
var j = 0;
var len = txt.length;
for
30 matches
Mail list logo