Hello all,
I am wondering how to access a user's profile when creating the
queryset for a ModelChoiceField. I would like to be able to use the
ModelChoiceField to display contacts from another table based on a
parameter saved in the user profile i.e. who =
forms.ModelChoiceField(queryset=Contacts.
Hello all,
When rendering a list of data for a particular model instance, I am
wondering how to access the label_tag attribute for a field when not
using a form.
In my view I get a model instance and pass the object in my context
inspection = inspection.objects.get(pk=3)
Then in my template I w
Hello All,
I am having a problem with my MultipleChoiceField. I have my model
field, form field and choices listed below. When I select choices 1-9,
the edit form shows that these choices have been checked (i.e. save
the form, then view the form for editing again, the previously checked
check boxe
Hello all,
I am using the admin and fieldsets to display a change form as usual.
Some fields' labels, even with blank=True are being given the class
required and are not using the verbose_name argument either given via
keyword or positional usage. All fields that really are required
(blank=False)
That was perfect. Thank you. I don't look at the admin docs enough I
guess. The following worked:
customers = forms.ModelChoiceField(queryset=Customers.objects.all(),
widget=forms.TextInput)
On Jun 14, 3:03 pm, Lee Hinde wrote:
> On Mon, Jun 14, 2010 at 1:59 PM, geraldcor wrote:
>
Hello all,
I have a model A that has >4000 records in it. I have just created a
new model B that has a foreign key to A. I want to be able to create
an instance of B and save it which is no problem going the normal
routes. However, I like to use Ajax to make the load times faster
because a lot of
ssell Keith-Magee
wrote:
> On Fri, May 14, 2010 at 5:29 AM, geraldcor wrote:
> > Hello,
>
> > Some background first. I am working with a legacy database that is not
> > only legacy, it is legacy Microsoft access so there is some hacking
> > going on. I am accessing
Hello,
Some background first. I am working with a legacy database that is not
only legacy, it is legacy Microsoft access so there is some hacking
going on. I am accessing a MySQL backend and my models are set up to
use the existing tables/field names. When I use regular old ORM
queries, Everything
t´s all hardcoded. if you need to customize the
> widget, you may want to write your own and subclass the given one.
>
> hope that answers your question.
>
> regards,
> patrick
>
> On 5 Mai, 01:43, geraldcor wrote:
>
>
>
> > Hello all,
>
> > I ha
Hello all,
I have been pouring over the django source trying to figure out where
the "Currently: "/images/..."" gets added to ImageField upload fields
after an image has been uploaded in the admin interface. I wonder this
because I would like to do some custom manipulation with the image
field and
That was a very good guess. I tried it but it didn't work.
On Apr 13, 12:46 pm, johan sommerfeld
wrote:
> You could try using initial=0.
>
> /J
>
> On Tuesday, April 13, 2010, geraldcor wrote:
> > Hello all,
>
> > I know the error "invalid literal f
Hello all,
I know the error "invalid literal for int() with base 10: '' " has
been discussed a lot in the past, but this seems to be unique to my
situation.
I have 2 choice fields as defined below for both the model and form:
models.py
class Checkin(models.Model):
...
content = models.IntegerFie
Hello all,
I have a form for submitting samples. After the user submits a sample,
I would like to give them a button that says "Use last form to fill in
this form" or whatever. Basically, the way I have thought to do this
is:
last_sample = SSF.objects.filter(ssfvalue=request.user.id).order_by('-
CAS sounds very interesting as a SSO. I may give that a try, as well
as maybe just perform some unit tests just to make sure I know what is
going on under the hood. Thank you all for your much needed input.
Greg
On Feb 19, 10:32 am, Phlip wrote:
> geraldcor wrote:
> > and all will be
decorator. If they successfully login on the django side (or are
> already logged in), then they get redirected with some sort of get
> variable user id + hash combo. You could check the validity of the
> user id from the hash (using a shared secret).
>
> Alex
>
> On Feb 17, 4:09 pm,
Hello all,
Internally, we have some RoR apps and Django apps. Our main website
runs on Django and is considered to be the main portal for all other
apps. Currently, we have a Rails authentication system and a Django
authentication system. We want to have one user table to authorize
against.
The o
Sorry to ask such a seemingly silly question, but how do I use
TreeNodeChoiceField in a ModelForm. To create a new node, I created a
ModelForm, and, like other ModelForms, I thought I could just override
the normal form widget. Here are my classes
class Folder(models.Model):
parent = model
, geraldcor wrote:
> Hello All,
>
> I have recently run into a very weird internet explorer problem. I
> cannot enter any of my text input boxes unless I carefully hover my
> mouse near the top or bottom edge of the field. The cursor does not
> change until I get to the very top of t
Hello All,
I have recently run into a very weird internet explorer problem. I
cannot enter any of my text input boxes unless I carefully hover my
mouse near the top or bottom edge of the field. The cursor does not
change until I get to the very top of the field. It works fine in all
other browsers
st move on.
On Dec 2, 3:53 pm, geraldcor wrote:
> So I successfully used this method to add initial values using
> parse_params as I was dealing with step 0. However, now the client
> wants the form order changed so that what was step 0 is now step 2. I
> tried using process_step in
;: profile.billingphone,
'billingemail': profile.billingemail,
}
if profile.sendreportsto:
init['sendreportsto']=profile.sendreportsto
el
No normally I can use something lie /foo/edit/35/ and I can edit the
record whose pk is 35. Now with this, I have a url pattern like
(r'^edit/(?P\d+)/$', 'edit'), which points to def edit
(request, ssf_id): in my views.py.
For my formwizard, by overriding various methods I have successfully
made i
This worked perfectly. Thank you. I used parse_params because I needed
to add default company profile stuff to the first wizard form. Thank
you again for clearing up my ignorance.
Greg
On Nov 18, 9:10 pm, "Mark L." wrote:
> On Nov 19, 1:28 am, geraldcor wrote:
>
>
>
>
#x27;form': form},
context_instance=RequestContext(request))
pretty simple and basic.
How do I do this with a form wizard?
Greg
On Nov 17, 3:39 pm, geraldcor wrote:
> Hello all,
>
> I began making a form that used request.user.get_profile to get
> default values for company name, p
Hello all,
I began making a form that used request.user.get_profile to get
default values for company name, phone, email etc. I have since
decided to move to a formwizard to split things up. I have no idea how
to override methods for the formwizard class to be able to include
those initial values
to see what's going on.
>
>
>
> On Fri, Sep 11, 2009 at 12:44 PM, geraldcor wrote:
>
> > Hello all,
>
> > I have a site that has quite a bit of javascript/jquery going on. All
> > of this works fine on my development server, but basically no
> > javascr
Hello all,
I have a site that has quite a bit of javascript/jquery going on. All
of this works fine on my development server, but basically no
javascript works when I deploy on Apache. This previously worked on
this same site before some changes (suspiscious, I know) and other
sites work fine on
Thank you all. This plugin really did the trick http://malsup.com/jquery/form/.
One line of code makes it work and you can expand from there. Worked
really well. I highly recommend it for form uploads with ajax and
jquery.
On Jul 7, 3:02 pm, Xiong Chiamiov wrote:
> On Jul 7, 1:22 pm, Adam Jenkin
Oh. That's a problem. Ok. Thanks. Am I going to have to scrap the ajax
idea if I want to edit the image? Any other workarounds?
Thanks for the reply.
On Jul 7, 11:20 am, Alex Gaynor wrote:
> On Tue, Jul 7, 2009 at 12:16 PM, geraldcor wrote:
>
> > I have a form that is being
I have a form that is being added via jquery ajax. I can add a new
record, including images just fine. Works like a dream. However, when
I go to edit the form, every field will update except for the image
field. I choose a new image from the browse button, the filepath loads
up and when I submit t
stuff). I already tried some unicode stuff but I'm
fairly untrained in that area. Any ideas?
Thanks
Greg
On Jun 18, 4:41 pm, geraldcor wrote:
> Hello all,
>
> I am trying to work with a legacy database and I ran inspectdb and
> have a model with the 2 tables that I want to use
Hello all,
I am trying to work with a legacy database and I ran inspectdb and
have a model with the 2 tables that I want to use. The first table,
the main table is not working at all. The second table which is
related via a foreign key seems to be working just fine. Here are the
symptoms:
In the
So that's how that works. Brilliant. Thank you. It worked perfectly.
On May 19, 1:43 am, George Song wrote:
> On 5/18/2009 4:01 PM, geraldcor wrote:
>
> > Hello all,
>
> > I am working on my second Django app and it involves a very long form.
> > I successfully u
Hello all,
I am working on my second Django app and it involves a very long form.
I successfully used modelForms in my last app to successfully save
form data to a database.
With this long form, I have split it up into smaller forms (forms.Form
not ModelForms) and used the FormWizard to tie it a
34 matches
Mail list logo