James,
Thanks, that's really well put.
I've implemented an override, and better still I love that with a model mix
in I can override the save method on the object. Sort of like:
class MyMixIn:
def check_stuff(self)
...
if ...:
self.save = self.disabled_save
Melvyn,
Just preference. Nothing more. Fix the issue at its source so all views
that exist or might exist honor the demand basically. One model, many
views.
Regards,
Bernd.
On Tuesday, 6 March 2018 19:13:42 UTC+11, Melvyn Sopacua wrote:
>
> Hi Bernd,
>
> On zondag 4 maart 2018 10:41:52 CET
hmm.. i don't think so. the info about the jobs is meant to be gathered
before creating the invoice. see, the app should let you register "jobs"
with timing, client and wage information. after creating jobs you can
select in a form "open" jobs, meaning they have not been part of an
invoice. so
I have a user who saw how new objects can be created using the Admin forms,
and asked if I could reproduce some of that functionality. I'm still new
to Django, and even newer to building forms. I'm wondering if there is a
way to "borrow" elements from the Admin forms into my own forms and
tem
The profile already have an id. Just wanted to add to an existing profile in
the db with generic view.
- Reply message -
From: "Andy"
To: "Django users"
Subject: Reverse for 'detail' with arguments '('',)' not found. 1 pattern(s)
tried: ['(?P[0-9]+)/$']
Date: Wed, Mar 7, 2018 11:08
If
Correct, post is for POST, get is for GET.
When a form is POSTed successfully, the user is redirected to another URL,
typically a success page or something of your choosing.
So after your POST, if you are simply redirecting back to this CreateView, you
no longer have access to the invoice that yo
Well, I see that you only set self.jobs in the post method in CreateInvoice.
How are you seeing proper console output for get_initial when self.jobs is not
even set in the get method? Are you sure you are seeing exactly what you want
to see? Please double-check. When presenting the form for
:)
Invoice Form is "just" a normal Modelform - nothing fancy added.
class InvoiceForm(forms.ModelForm):
class Meta:
model = Invoice
fields = '__all__'
def __init__(self,*args,**kwargs):
print("InvoiceForm.__init__();;;")
Badtameez Insaan. Namard. Agar paise dene k himmat na ho toh mere banaye
hue videos bhi use karke youtube me upload mat karo.
On Saturday, 9 July 2016 10:23:49 UTC+5:30, deepak manupati wrote:
>
> how should i make a non downloadable image in my django website
>
--
You received this message bec
I have 3 models, the idea is that i can do many test on one product and a
product can be removed of my stock (insert values in out table) by peoples.
In django admin how can i do for blocking to insert values in Test table
when the product is in the out table(inserted in the out table)? Wher
If you actually are inside the profile create view, the profile probably
does not have an id yet and thats why the url lookup is failing. The ID
will be created on first save of the object.
Am Dienstag, 6. März 2018 00:11:53 UTC+1 schrieb anyi.lloyd:
>
> Am new to Django, please i need help here
11 matches
Mail list logo