Use third-party libraries
在 2018年1月9日星期二 UTC+8下午9:15:55,BIJAL MANIAR写道:
>
>
> Hi,
>
> There is an old application in Excel where macros are coded in VBScript
> and there is both frontend (forms) and backend in Excel. Need to replicate
> it as a web application (Python, Django, React). From
Good point. You can display the value but again.. you need to make sure
it's a proper (not changed via post) value (clean() / save())
W dniu środa, 30 maja 2012 22:25:35 UTC+2 użytkownik Alexandr Aibulatov
napisał:
>
> For example on second method i can change post, board id's via html,
> and
Say there's a model:
class Notification(models.Model):
user = models.ForeignKey(User)
board = models.ForeignKey(Board)
post = models.ForeignKey(Post)
name = models.CharField()
class Meta:
unique_together = ('user', 'name', 'post', 'board')
#i know
Putting the correct view in the c.post() method worked. Thanks!
--
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 group, send email to
When my django test case executes, I'm testing my code's ability to
create a new user. But when I use the User.objects.get() method the
user isn't found. The view being tested actually creates users (I
checked it in the browser), but how do I write a test that verifies
it?
Thanks for your help!
the help_text to a form_for_model, for
example?
-rm
On Nov 2, 5:11 pm, Brian Rosner <[EMAIL PROTECTED]> wrote:
> What you really need is to use the formfield_callback argument to
> form_for_instance. This allows you to override the default fields
> that are returned for a given fie
the help_text to a form_for_model, for
example?
-rm
On Nov 2, 5:11 pm, Brian Rosner <[EMAIL PROTECTED]> wrote:
> What you really need is to use the formfield_callback argument to
> form_for_instance. This allows you to override the default fields
> that are returned for a given fie
Sounds good. In the mean time, I found this very cool alternative:
http://www.dynarch.com/projects/calendar/
It worked great!
On Nov 5, 3:04 pm, "Alex Ezell" <[EMAIL PROTECTED]> wrote:
> On 11/5/07, rm <[EMAIL PROTECTED]> wrote:
>
>
>
> > Has anyone g
Has anyone gotten this to work with a datetime field and a newform of
the type form_from_model?
On Nov 5, 11:07 am, "Alex Ezell" <[EMAIL PROTECTED]> wrote:
> Thanks Michael.
>
> This looks like exactly what I need. I apologize for not searching the
> list first. I searched the web but that
ms
to work. It is caught by the validator with a nice message saying:
"Please select a valid choice. That choice is not one of the
available choices." So, it looks right, but it feels like a hack. :)
On Nov 2, 9:25 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Fri, 2007-1
(is_staff=True)
aw_form.base_fields['contact'].widget =
forms.widgets.Select(choices=[(obj.id, obj.__str__()) for obj in
filtered_choices])
Tada!!!
Any one wants to add it to the documentation or some FAQ wicky? :)
On Nov 2, 12:08 pm, rm <[EMAIL PROTECTED]> wrote:
> > Actually I
On Nov 2, 3:54 pm, RajeshD <[EMAIL PROTECTED]> wrote:
> When you acquire a Customer newform instance in your view, you will be
> able to modify the choices attribute of its domain field so that these
> choices only contain the relevant domains that you mentioned you can
> trivially derive
> Actually I don't think your expectations were unreasonable, I think they
> were natural given the unfortunately tight coupling between this admin
> option and model definition, plus the fact that the option has nothing in
> its name to indicate it is admin-specific.
Well, I still think that
, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On 11/2/07, rm <[EMAIL PROTECTED]> wrote:[snip]
>
> > However, even that is not intuitive since one would assume that since
> > the form is reading the field definition from the model it would know
> > to
Using standard forms this is how this is accomplished:
class away_form(forms.Form):
contact =
forms.ModelChoiceField(queryset=Contact.objects.filter(is_staff=True),
label="Person away")
However, even that is not intuitive since one would assume that since
the form is reading the field
Sorry, I made a slight mistake above. I was just trying different
things. When using the code I posted above, the view is not displayed
and I get an error saying:
'Contact' object has no attribute 'name'
But, when I use this code,
def away_edit(request, away_id):
aw =
I know this is a painful subject. I have spent a couple of days
trying to figure this out, and I am almost there. (I think. :)
Here is the model (simplified to bare bones):
class away(models.Model):
contact = models.ForeignKey(Contact, verbose_name="Name of person
away", limit_choices_to=
Wow! That was so easy. Thanks a lot.
-rm
On Oct 29, 12:50 pm, Nathaniel Whiteinge <[EMAIL PROTECTED]> wrote:
> Hello!
>
> > It actually works! In the admin interface it displays the 'contact'
> > field as a combination of the 'first' and 'last' fields of the
>
First off all I want to thank you all for this excellent web
framework. I had never built a database driven web site, but Django
has given me the motivation to create a small intranet site for our
office and I am very happy with the progress I have been able to make
so far. I realize that it is
19 matches
Mail list logo