ons/14541074/empty-label-choicefield-django
>
> суббота, 6 февраля 2021 г. в 06:31:52 UTC+3, Matt Rowbottom:
>
>> Hi wne
>>
>> Using `to_field_name` changes the value of the options/inputs, but
>> doesn't seem to have any effect on whether a blank option is availabl
: Screen Shot 2021-02-06 at 2.25.47 pm.png]
On Saturday, 6 February 2021 at 1:35:02 am UTC+11 wne...@gmail.com wrote:
> to_field_name="name",
>
> пятница, 5 февраля 2021 г. в 17:15:27 UTC+3, Matt Rowbottom:
>
>> Hello. I think I've found a bug.
>>
>>
Hello. I think I've found a bug.
Prior to Django v3.1, both of the fields in the following form would be
rendered with an empty option, labelled as '-':
```
from django import forms
from .models import Animal
class AnimalForm(forms.Form):
animal_select = forms.ModelChoiceField(
After rebasing my PR (https://github.com/django/django/pull/12333), it
failed the JS tests, but hasn't touched any JS files. I suspect this was an
intermittent failure, unrelated to my PR and wanted to re-run the JS tests,
but I don't think I have permission to do so. Is there a good way I
>
>
> ^ Is this where you deleted the migrations?
I keep receiving this error when I enter py manage.py migrate products:
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send
>
> Hello Iain,
>
I am also working on Mosh's python tutorial and I'm having the same
problems that you expressed in this chat. Did you delete the migrations
through pycharm or through your computer to make it work?
Thanks
--
You received this message because you are subscribed to the Google
Tosin,
Please refer below. This should help.
https://docs.djangoproject.com/en/2.2/topics/db/queries/
best,
matt
On Thu, Sep 12, 2019 at 10:01 AM Tosin Ayoola
wrote:
> Halo guyz I actually need a little help, I'm working on a airline tickets
> reservations project using postm
Hi everyone,
Does anyone know how to post blog at below page:
https://www.djangoproject.com/community/blogs/
I am really frustrated as I submitted last week but nothing is there. Who
is in charge of blog posts on Django site?
Thx,
Matt
On Thu, Jul 25, 2019 at 12:38 AM Mike Dewhirst
wrote
Hi,
I shared one blog post last week in community section. It does not show up.
https://www.djangoproject.com/community/
Can someone help me out. My article links was below:
https://myhsts.org/upload-and-process-website-cvs-file-using-python-django.html
and RSS link
I've solved this. First of all, the codename for the permission should be
called as a codename and second, I had to remove the app name
(display_data) like this:
permission = Permission.objects.get(codename='settings')
On Tuesday, April 9, 2019 at 9:25:09 PM UTC-6, Matt Collins wrote:
>
&
Hi,
I'm trying to set a permission for a user that I'm creating with a python
script. I've tested and found that the codename for the permission is
"display_data.settings" using the following:
python manage.py shell
from django.contrib.auth.models import User
user_name =
Hi Andrew,
Thanks for clarifying. I didn't think to look at the ASGI spec but it is
described quite well there under the WebSocket/Close section. Thanks for
your hard work on this project.
Regards,
Matt
On Saturday, 6 October 2018 10:47:46 UTC+1, Andrew Godwin wrote:
>
> H
to accept a connection and then immediately close it, but I
understand if you have to do it this way, to get the custom close code
returned perhaps you have to have an open connection in the first place.
Can someone please confirm?
Many thanks!
Matt
--
You received this message because you
All of the products will share the same fields.
I would filter on products, but my searches would only be restricted to one
market at a time.
On Sun, May 13, 2018 at 1:51 AM, Ryan Nowakowski <tuba...@fattuba.com>
wrote:
>
>
> On May 10, 2018 7:40:47 AM CDT, Matt Snelgar <
I am making a django app to browse available products at different markets.
I am getting data for my models from a JSON url feed,
I am not sure on the best approach to turn this data into models as the
feed for a single market can contain upwards of 50k items.
Models - feel free to suggest
Thanks!
-Matt
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users
/db/transaction.py#L107>
a
public API, or is there a better way to tell if we're within an atomic
block?
Thanks,
Matt
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
Standard practice is that you do not refer to "current" models (i.e. from
app.models import MyModel) in a migration as the migration will break when
that models changes. This means copying any model-specific code into the
migration. This becomes impractical when the code needed for the
doesn't exist.
Simon, one last question for you -- where should this code live? I
currently have it shoved in my model file but that doesn't feel quite right.
Thank you again!
--Matt
On Saturday, September 10, 2016 at 10:42:16 PM UTC-4, Simon Charette wrote:
>
> Hi Matt,
>
&
.
If this is a deliberate change, can someone please point me to the
specifics? If it's a bug, I'd be more than happy to file a bug.
Thanks!
--Matt
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this grou
.
Thanks in advance,
Matt
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to dj
there are some pyc files but not all.
pytest was an attempt to resolve the issue outside of django's manage.py.
It failed as well. Here is the pytest.ini:
[pytest]
DJANGO_SETTINGS_MODULE=refreshes.settings
Thanks,
Matt
On Friday, August 19, 2016 at 10:37:51 AM UTC-6, Fred Stluka wrote
Gergely
>
> On Wed, Aug 17, 2016, 23:03 Matt <kicke...@gmail.com > wrote:
>
>> Ok a step forward. When I spell out the tests it works:
>>
>> https://dpaste.de/2MXf
>>
>> But when I run test without arguments, it fails out:
>>
>> https://dpas
Here you go:
https://dpaste.de/OF8j
On Wednesday, August 17, 2016 at 11:16:27 PM UTC-6, Gergely Polonkai wrote:
>
> Hello,
>
> this “refreshes.backups.tests” thing bothers me a lot. Could you show us
> your directory structure, please?
>
> Best,
> Gergely
>
> On
UTC-6, Fred Stluka wrote:
>
> Matt,
>
> Oops! Right. I just noticed that in the dpaste.
>
> My next guess is you may need to change the name "good_index_text"
> to something that starts with "test_" to get it to be recognized as a
> test.
>
> Or
Sorry for the typo, but I have already do that way. I have the output in
the the first link.
On Wednesday, August 17, 2016 at 2:24:19 PM UTC-6, Fred Stluka wrote:
>
> Matt,
>
> Drop the "s" from "tests":
>
> ./manage.py test backups
>
> --Fred
&g
When I'm trying to get tests to work it simply states that its unable to
import .tests. I'm not sure what I'm missing here. Here is some output
please let me know if you need more:
./manage.py tests backups
https://dpaste.de/4U9C
The test file:
https://dpaste.de/bBZt
--
You received this
On Wednesday, December 2, 2015 at 6:31:31 PM UTC+10:30, john@gmail.com
wrote:
>
> +1 for disabling migrations completely - for several reasons.
>
> 1. Right now, I'm trying to run tests against a production database with
> runserver, in *read-only* mode - but it fails because it can't
Running into a bit of an odd problem I hope someone can help with.
Envrionment:
* Ubuntu Server 14.04, 64-bit (Vagrant box)
* Python 3.4
* Django 1.8
* pyodbc 3.0.8
pyodbc installs fine. When I do python3 and then import pyodbc, that works
fine.
When I do python3 manage.py shell and then
or your help -- much appreciated!
Matt
On Thursday, April 2, 2015 at 12:09:59 PM UTC-7, Simon Charette wrote:
>
> Hi Matt,
>
> I think it would be preferable to use atomic() here.
>
> From reading the documentation
> <https://docs.djangoproject.com/en/1.8/topics/db/trans
Hi all -- I just upgraded one of my projects to Django 1.8 from 1.7.7 and
in a view function where we're doing manual transaction management
(Postgres) I'm now getting the error in the subject line.
Basic gist of the code involved:
def foo(request):
try:
transaction.set_autocommit(False)
Hi -- I'm unable to get all tests to pass with Django 1.5.4 when I have
custom timezone-activating middleware enabled.
I've posted code here: http://stackoverflow.com/questions/29376612
Is there a way to disable the middleware for that specific test?
--
You received this message because you
Your if block in views.py is not well-formed. I haven't tested this but I'd
write it more like this:
# try username
user = auth.authenticate(username=username, password=password)
if user is not None:
auth.login(request, user)
return HttpResponseRedirect('/')
#
omagically, so your call would look like
> something like:
>
> Tenant.sequence.get_value(tenant, sequence)
>
>
> On Tue, 13 Jan 2015 06:37:21 -0800 (PST)
> Matt Cooper <vtbas...@gmail.com > wrote:
>
> > Thanks Jani, good to hear someone has gone down this road bef
I need this pattern. If I could keep all the book-keeping on the model with
the constraint, that seems cleaner to me. But, of course, I'm not willing
to pay a huge performance or corruption penalty just for vague ideological
purity :)
Thanks again!
~matt
On Tuesday, January 13, 2015 at 5:07
y, has anyone done something like this before and have a suggested
pattern?
Thanks!
~matt
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to djang
. or maybe they had a
Python 3 development branch ... it was a few weeks ago, so I don't
remember exactly).
--
Matt Gushee
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it,
Hello again--
Since I don't really understand what you are doing, I can't give you
any specific help. But since I have the impression you are new not
only to Django but to online technical forums, let me give you a
general recommendation:
You will get better answers if you ask better questions.
see if I can point you to some helpful resources.
--
Matt Gushee
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
That's the part I'm not too sure about, but I'm sure others on this
list will have good advice.
Hope that helps a bit.
--
Matt Gushee
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving em
should work fine
I'm a Django newbie, so I could well be mistaken, but I don't think
that will work. The OP said it was plain HTML; that means Django
doesn't process it, so Django template tags won't work. But it looks
like Flatpages might help:
http://www.djangobook.com/en/2.0/chapter16.html.
-
What do you want to do with this 'widget'? From your description, it
sounds like you could use a normal paragraph element -- which might
look something like this in a Django template:
{{ some_text }}
Does that not meet your needs?
--
Matt Gushee
On Thu, Aug 28, 2014 at 5:51 PM, Yarick
I think I found it.
It appears that the form has a name called "fileupload" and submits back to
the orginal page. From there the JS fires off.
I guess I'll have to see how to modify this.
Any other pointers would be appreciated!
On Friday, August 15, 2014 8:34:43 AM UTC-4, Collin Anderson
What I am wondering is how the Button type "Submit" is calling that JS some
where.
I don't see any specific script/method calls on the upload_form.html page,
which specifically is where the bar "shows up".
Thanks
On Friday, August 15, 2014 8:34:43 AM UTC-4, Collin Anderson wrote:
>
> It's
I am using this project here:
https://github.com/Alem/django-jfu
Everything is installed and working properly.
The project includes a progress bar logic that I'd like to re-use elsewhere
on my site.
The progress bar filling appears to happen when the "Start Upload" buttons
are clicked.
Hi, Liu Xuan--
What result do you get when you do the following?
Python 2.7.6
>>> import sys
>>> sys.path
On Thu, Jul 24, 2014 at 1:23 PM, New Django User wrote:
> Hi, I have problems with Django in windows 7.
>
> I installed Django using Windows Powershell:
>
> PS
, that surely there must be a quick
fix here!
I've sought postgres specific fixes to this problem, i've fiddled about in
the sql console, i've tried a lot, but it's not seeming that simple. I
think I just need a seasoned django warrior to wave a wand.
Any other thoughts?
Thanks,
Matt
On Saturday
er = transaction.commit_on_success(create_inactive_user)
__
Any thoughts would be much appreciated!
Matt
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop
I've created a paginator for RawQuerySets.
https://github.com/seamusmb/django-paginator-rawqueryset
On Tuesday, March 26, 2013 5:51:41 AM UTC-4, chambe...@gmail.com wrote:
>
> I'm trying to implement Django's built in pagination feature with a raw
> query set. I've researched the issue and the
the inner tuple.
Matt.
On Saturday, February 1, 2014 3:21:32 PM UTC+10:30, mark wrote:
>
> Exim4 has two logs - main and reject.
>
> Message from python prompt and mutt - shows activity in main, but not
> reject.
>
> Message from Server 500 error with django app - no activity in m
Disregard. I found my error. I was trying to pass something I shouldn't
have. This seems to be working now.
Thanks again!
On Thursday, December 5, 2013 9:10:13 AM UTC-5, Daniel Roseman wrote:
>
> On Thursday, 5 December 2013 12:23:52 UTC, Matt Lind wrote:
>>
>> Ok, I ge
work properly either.
Thanks again!
On Thursday, December 5, 2013 9:10:13 AM UTC-5, Daniel Roseman wrote:
>
> On Thursday, 5 December 2013 12:23:52 UTC, Matt Lind wrote:
>>
>> Ok, I get what what you're saying, but I seem to be having a heck of a
>> time getting the
//docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.FileField.upload_to
>
> Regards,
> Michael Manfre
>
> On Saturday, November 23, 2013 10:33:59 AM UTC-5, Matt Lind wrote:
>>
>> So I am trying to modify django-jfu ( a multi uploader) to send files to
&g
with
> upload_to that uses the random directory name on the instance to define the
> file's target path.
>
>
> https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.FileField.upload_to
>
> Regards,
> Michael Manfre
>
> On Saturday, November 23, 20
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'django',
'USER': 'matt',
'PASSWORD':'***',
'HOST': '127.0.0.1',
'PORT': '5432',
},
'OPTIONS': {
'autocommit': True,
}
I forgot to post DB settings
Django is 1.6 and Python is 2.7.5. On Windows 8.1, no virtual-env, but my
actual project will be on a *nix VM. I accidentally download and install a
development version, I think removed it before installing 1.6 but no
previous django versions were installed on this system. Maybe dropping my
db
Commenting out my Postgresql DB and putting back the default options for
the sqlite DB fixed the issue.
Is there a tests.py variable I could use to create an If..Else that would
allow this to be automatic and not force me to edit my settings.py every
time I wanted to run a test.
--
You
I'm running Django on Windows with PostgreSQL database. I'm in tutorial 5
and have copy/pasted the code after it's initial failure. I've been
following the tutorials to this point, with only a little side
experimentation, and everything has been working. It looks like it DB
related since I'm
So I am trying to modify django-jfu ( a multi uploader) to send files to a
unique directory for every unique upload session performed. This is just
due to my application's requirements and to prevent file collisions during
the operations later down the road in my app.
Anyway, here is views.py
I am attempting to setup django-bft on my CentOS 6.4 server.
When running under the dev server I am able to upload the file and it shows
up on my server.
However, when running through MOD_WSGI everything about the site works,
except for the upload. The file never lands on the server and the
On Thursday, July 18, 2013 7:30:55 PM UTC-7, Matt McClure wrote:
> 1. TestSuite. Here's a minimal hack to release the reference that
> TestSuite would otherwise hold after a TestCase runs until the remainder of
> the suite had finished.
>
> +self._tests.remove(test
On Thursday, July 18, 2013 6:12:16 PM UTC-4, Matt McClure wrote:
> AFAICT, TestResult holds references to each TestCase instance.
I can start to answer my own question. But I'm interested to know if others
run into similar problems and how you solve them.
It looks like there are at least
What's a good way to avoid unbounded memory consumption when running
manage.py test?
AFAICT, TestResult holds references to each TestCase instance. So
attributes of my TestCase subclasses don't get freed by the garbage
collector until the last reference to TestResult disappears, which isn't
Just wanted to update everyone on the solve for this.
It turns out that I was overzealous in my pre-planning.
In my urls.py at the top of my project I had defined extra applications
that I had not fleshed out yet. So they didn't have any urls.py or
views.py defined.
Even though the error
Updating with full error:
Request Method:GETRequest URL:http:///uploader/list/Django
Version:1.3.7Exception Type:TemplateSyntaxErrorException Value:
Caught ImportError while rendering: No module named urls
Exception Location:/usr/lib/python2.6/site-packages/django/utils/importlib.py
in
My Settings.py:
# Django settings for EqlAnalystToolSet project.
import os, ldap
from django_auth_ldap.config import LDAPSearch, ActiveDirectoryGroupType
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_em...@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
I am trying to get this utility to work within my own Django site:
https://github.com/doph/minimal-django-file-upload-example/tree/master/src/for_django_1-3/myproject
I have copied all the appropriate files to where they need to be. I am on
django 1.3.7 on Centos 6.4 64Bit.
When I run the
() and initial=.
Matt
On Mon, May 6, 2013 at 4:28 PM, Matt C <matt...@gmail.com> wrote:
> I'm resorting to code in __init__ to set my select dropdown properly when
> using a ModelForm with formset_factory, and wondering if there is a better
> way.
>
> I have a
I'm resorting to code in __init__ to set my select dropdown properly when
using a ModelForm with formset_factory, and wondering if there is a better
way.
I have a model that looks like this:
class Choice(models.Model):
desc = models.TextField()
begin_scene = models.ForeignKey(Scene,
some intelligent batching of your IN clause, so maybe it does
make sense to leave that hairy logic out of the ORM :-)
--
Matt Long
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Wednesday, April 24, 2013 at 18:31, Larry Martell wrote:
> I changed it to delete one row at a t
mplate tags are taking some time. Is the page
>> huge? Are you doing a ton of formatting? Is there something you could maybe
>> move to server-side?
>>
>> Also, this might help with caching bits of your output:
>>
>>
>> On Thu, Apr 18, 2013 at 6:17 AM, Matt Andr
On Thursday, 18 April 2013 10:45:40 UTC+1, Tom Evans wrote:
> On Wed, Apr 17, 2013 at 11:18 PM, Matt Andrews
> <ma...@mattandrews.info>
> wrote:
> > Hi all.
> >
> > Having performance problems with my Django app. I've posted here before
> > talking
Hi all.
Having performance problems with my Django app. I've posted here before
talking about this: one theory for my slowness woes was that I'm using raw
SQL for everything after getting sick of Django doing things weirdly
(duplicating queries, adding bizarre things like "LIMIT 3453453" to
Or, you could use the parent m2m with a through table to add
the relevant data. birth/adoptive parent, etc.
And, the partner m2m could also use a through table to store
start and finish times of the relationship.
Family relationships are hard...
Matt.
--
You received this message because you
On Thursday, March 21, 2013 12:49:45 AM UTC-7, simon xue wrote:
>
> When I read to page 31,"To get an object by ID,type the following:
> >>>Link.object.get(id=1)
Unless this is just a typo that should be objects plural:
Link.objects.get(id=1)
--
You received this message because you are
I have a bunch of unit test files, all of which consist of
django.test.TestCase classes.
Wrote myself a little shell script to uncomment/comment test file imports
in my __init__.py file, so I can run tests from certain test files, based
off the command line arguments I give it. I am also
the results
here: http://www.scenepointblank.com/ (it's the "popular right now" tabbed
widget near the bottom right.
On Thursday, 14 February 2013 17:19:28 UTC, Matt Andrews wrote:
>
> Hi Tom,
>
> Yep, you've got the problem right. Reading it back that way I see the
>
:42 PM, Matt Andrews
> <ma...@mattandrews.info>
> wrote:
> > Hi all,
> >
> > I've been experimenting with an expensive query I need to call
> (essentially
> > grabbing data from some Google APIs). I tried this experiment:
> >
> > A sitewide cach
Apologies for bumping this thread, but is there anybody with any insight on
this? Really driving me crazy!
On Monday, 11 February 2013 13:42:05 UTC, Matt Andrews wrote:
>
> Hi all,
>
> I've been experimenting with an expensive query I need to call
> (essentially grabbing data f
the Google API and updates my cached
fragments - the Google data changes every 15 minutes but the sitewide cache
has several hours timeout, normally.
Hope this makes sense.
Matt
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubs
'm sure my logic is just a little
wrong.
thanks
Matt
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post
e
> (iow a page might take 1s to load with the toolbar, but the toolbar will
> report 500ms, which is accurate for load-time *without* the toolbar).
>
> _Nik
>
> On 1/22/2013 9:26 AM, Matt Andrews wrote:
>
> Hi Nik,
>
> I see the discrepancy both locally and whe
page requests start
to kick in -- maybe this is unrelated to the SQL, though.
On Tuesday, 22 January 2013 16:42:19 UTC, Nikolas Stevenson-Molnar wrote:
>
> Hi Matt,
>
> It's unlikely the problem lies with dictfetchall. The "small performance
> hit" mentioned by the docs
gt;
>
> [1]
> <
> https://docs.djangoproject.com/en/1.4/ref/models/querysets/#prefetch-related>
>
>
>
> 22.1.2013 13:57, Matt Andrews kirjoitti:
> > Hi Jani,
> >
> > I made a StackOverflow post last year with an example of the ORM stuff I
> > tried and the poor
what you had when things were slow?
>
> 22.1.2013 12:26, Matt Andrews kirjoitti:
> > Hi Nik,
> >
> > Thanks - I do feel like by circumventing the ORM I've just "given up"
> > and perhaps I'll reconsider -- none of my queries are particularly
> > "special
blank.com (obviously you won't see the SQL, but the
"delay" between pages, even though these pages are all cached for 2hrs+, is
partly my concern here).
On Tuesday, January 22, 2013 4:24:09 AM UTC, Nikolas Stevenson-Molnar wrote:
>
> Hi Matt,
>
> Firstly, I encourage y
C (this
is from running on my local server rather than production but performance
is broadly similar).
Can anyone help me? I realise I've perhaps gone off-piste by writing raw
SQL but I feel it was justified.
thanks,
Matt
--
You received this message because you are subscribed to the Google
(model, self.attname))
..but it doesn't seem there are any hooks to decrypt the data on the
loading side. Am I missing anything, or is there a better way to do this
sort of thing?
Thanks,
Matt
--
You received this message because you are subscribed to the Google Groups
"Django users&q
On Thursday, December 13, 2012 8:01:13 AM UTC-8, ke1g wrote:
>
>
> Just a shot in the dark: Maybe if, since you're not using the ORM on the
> 'other' database, you shouldn't use django-pyodbc, but rather just pyobdc.
>
I should have said this earlier but I had the same thought and tried doing
Following up: if it affects a single instance of an object, then it belongs
as a model method.
If it affects any number of them, then it should perhaps go on the manager
(or even the queryset: I use django-model-utils PassThroughManager for this
a lot).
Matt.
On Sunday, November 11, 2012 3
On Thursday, November 1, 2012 4:33:47 AM UTC-7, Amyth wrote:
> I would suggest you adding Boolean field to your UserProfile model like
> is_authorized = models.BooleanField(default=False)
Cool -- thanks for the suggestion. As I've said I'm new to the Django world
but this community rocks! :-)
On Wednesday, October 31, 2012 8:40:10 PM UTC-7, elena wrote:
> I was also going to suggest using crispy forms -- having used it on a
> recent project I'd strongly recommend it (it's great when it's plugged in
> to existing stylings such as: uni-form or bootstrap).
>
> I've used it with
On Tuesday, October 30, 2012 5:20:44 AM UTC-7, ke1g wrote:
> Another protective hack would be to omit the
> CSRF token when the form is read only.
>
Thanks -- interesting idea! Ultimate goal is for the user to be able to
tell they can't edit the form via the fields being read only (which
On Tuesday, October 30, 2012 7:09:05 AM UTC-7, JirkaV wrote:
> On the UI side, you can set the "readonly" property on form fields.
> This will prevent the field from being edited in a browser (I think so
> - done that only once on a small internal project).
>
Thanks -- I probably should have
On Tuesday, October 30, 2012 1:36:19 AM UTC-7, elena wrote:
> How are you rendering the form? Are you using `forms.Form`?
>
We're using a ModelForm specifically.
>
> Do you mean "user's credentials" from `django.contrib.auth`?
>
Actually this is a custom user object -- users authenticate
You may want to look into requests, which wraps http request-response
handling in a nicer wrapper.
http://pypi.python.org/pypi/requests/
Matt.
On Friday, October 19, 2012 1:15:06 PM UTC+10:30, Aaron C. de Bruyn wrote:
>
> On Thu, Oct 18, 2012 at 6:55 PM, django <mait...@gmail.com
user.get_profile() returns a model instance, not a dict. Model instances
have no .items() method.
Matt.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/dj
An even better solution is to always work in a virtualenv: that way you can
easily try out new packages, and not worry about conflicts.
Matt.
On Thursday, October 4, 2012 10:30:06 PM UTC+9:30, Ramiro Morales wrote:
>
> I think so. The usual reason for the problem you are experi
Thanks to all for the examples and insight! Very helpful.
Matt
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/sITNuGB_k54J.
To post to this g
One really small nitpick: when returning a 405, it is a requirement that
you return a header with the acceptable methods:
>
>
> 10.4.6 405 Method Not Allowed
> The method specified in the Request-Line is not allowed for the resource
identified by the Request-URI. The response MUST include an
1 - 100 of 499 matches
Mail list logo