I struggled to find this in the Django ticketing system when I posted it,
but I searched again this morning and found a few bugs that seem to be
related. They were closed with comments indicating that
https://code.djangoproject.com/ticket/10060 seems to be the root cause.
Looks like this is a
Django 2.2.12
Python 3.7.5
Postgres 10.11
I am receiving what I perceive to be an incorrect SQL query from a Django
queryset. I am hoping I've just done something wrong.
Here's the setup:
from django.db.models import DecimalField, DO_NOTHING, F, ForeignKey, Model,
Q, Sum, TextField
class Ta
USER': 'user',
'PASSWORD': 'password',
'OPTIONS': {'ODBC Driver 17 for SQL Server',
}
}
}
And here is the error:
(venv) C:\Users\Kirk\PycharmProjects\PyShop>manage.py runserver
Unhandle
"Submit".
Imagine a field in a job application like "Which crimes have you been
convicted of? [Armed robbery] [Arson] [Kidnapping]". You bump "Arson" by
mistake. Don't you wish there was a "none of the above" option to select
instead?
--
Kirk Strauser
signature.asc
Description: This is a digitally signed message part.
wever, the list of Company objects renders as a MultipleChoiceField,
and there's no way that I've found to clear the list of selected values.
Is there a way to get a "None of the above" option or a "Clear" button to
get rid of unwanted or accidentally selected op
= forms.IntegerField()
Yells "d'oh!" and slaps forehead. Thanks!
--
Kirk Strauser
signature.asc
Description: This is a digitally signed message part.
consolidate a bunch of ad-hoc code into a single inheritable class.
- --
Kirk Strauser
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
iD8DBQFHoRX05sRg+Y0CpvERAurkAJ0e+UGaOyv8ofaTARs2GJPBK1qw7wCcC3rO
p6N4YJ+wXbvOJddGxWdQeQY=
=/lEi
-END PGP SIGNATURE-
--~--~-~--~
27;t have the behavior I'd expect of changing somefield's label
from 'Somefield' to 'foo'. Is this possible?
--
Kirk Strauser
signature.asc
Description: This is a digitally signed message part.
I'm trying to figure out why changes I make to a user's profile in the admin
section don't actually get saved (even though it claims they were). I'm
newish to Django and don't have a clue how to start debugging this. Any
pointers?
--
Kirk Strauser
signature.a
On Wednesday 12 December 2007, l5x wrote:
> form_for_instance? Check:
> http://www.djangoproject.com/documentation/newforms/#generating-forms-for
>-models
That's only in the SVN version, but if we have to move from .96 to SVN to
get it then so be it.
--
Kirk Strauser
signature.a
for_instance(umod.UserProfile())()
>>> print form['market']
Is there a way to get it to render as a select widget with the same values
as in /admin? I'm going to be doing such things quite a few times and I
don't want to have to repeat the same definitions in a bunc
m bare metal with mod_python or PHP
then I could imagine how I might do this, but I'd much rather work *with*
Django than *against* it. So, is there a Django-ish approach that anyone
would recommend?
--
Kirk Strauser
--~--~-~--~~~---~--~~
You received this m
ur legacy system
instead of having all such errors bunched up at the top of the form. I'm
currently using:
def clean(self):
myerrors = longprocessonremotemachine() # returns a dict
raise forms.ValidationError('\n'.join(myerrors.values())
wh
On Tuesday 21 August 2007, robo wrote:
> Have any of you guys imported excel/cvs by using Python/Django?
Check out "pydoc csv". Python ships with a nice CSV-reader module.
--
Kirk Strauser
signature.asc
Description: This is a digitally signed message part.
So, is there a best practice for such things? The one hard requirement is
that it has to work with Python's xmlrpclib's basic authorization support,
and therefore probably also with our .NET clients.
--
Kirk Strauser
--~--~-~--~~~---~--~~
You receive
in a RequestContext for every single view, since I want to have a login
or logout link at the top of each one. Is that correct?
--
Kirk Strauser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django use
eware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
)
--
Kirk Strauser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
ly which has a different template
> inheritance chain?
This is my first Django project.
I hate it when you feel *so close* to finding the answer but can't make that
final little leap. :-)
--
Kirk Strauser
--~--~-~--~~~---~--~~
You received this message b
tch. Please try again.
{% endif %}
Username:{{ form.username }}
Password:{{ form.password }}
http://www.example.com/"; />
{% endblock %}
---
...which yields the text "Welcome, kirk. Thanks for logging in." I'm
finding th
Is there a list of variables that all templates can access? I'm
asking out of general interest, but the problem I'm trying to solve is
that I want to have a "login" or "logout" link on every page of the
site, depending on whether a visitor is currently authenticated, and I
don't want to have to p
I have 2 issues with Admin and I am looking for a suggestion.
I am currently using
models.ForeignKey(Type, edit_inline=models.TABULAR, blank=True)
for a field in one of my models. In Admin of the parent Model the
children items appear as expected, however it would be nice to collapse
the childr
ticket) work just great.
-Kirk McDonald
--~--~-~--~~~---~--~~
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
he app
your project's subdirectory. To solve this, either rename the app, or
move it. I think renaming is easier.
-Kirk McDonald
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
Kirk McDonald wrote:
> PS: The following hackish thing occurs to me:
>
> class User(users.User):
> node = meta.OneToOneField(Node, db_column='id')
> id = meta.IntegerField(db_column='id', editable=False)
> class META:
&g
ango-0.91-py2.4.egg/django/contrib/admin/views/decorators.py
in _checklogin
85. request.session[users.SESSION_KEY] = user.id
[snip]
Oh dear.
I have two options as I see it: I can either edit the admin code (not
preferable for any number of reasons), or I can somehow convince an id
att
25 matches
Mail list logo