lag and
> providing the path to the custom settings file . For example:
> ./runtests.py --settings=new_app.test_settings
>
> What do you want to do exactly?
>
> On Fri, Mar 17, 2023 at 1:00 AM Ayush Bisht
> wrote:
>
>> Seems like, it is for defining how actually we a
Seems like, it is for defining how actually we are selecting the specific
test case. It is very confusing at first.
Can't we just explain it with an example..
On Friday, March 17, 2023 at 12:54:27 AM UTC+5:30 Ayush Bisht wrote:
> * ./runtests.py --settings=path.to.
* ./runtests.py --settings=path.to.settings i18n.tests.TranslationTests*
what exactly is the purpose of *path.to.settings,* I'm getting an error
while running the above line.
Can anyone please explain?
*Error*
Testing against Django installed in '/home/ayush/OS/django/django' with up
to 8 pro
Hey everyone,
I need a help, regarding use of proxy models at foreignKey field.
class User(AbstractUser):
is_customer = models.BooleanField(default=False)
...
class Customer(User):
objects = CustomerManger() # get_queryset will filtered out all the
models based on
If you specifically trying to validate the form on the basis of empty input
field, then simply include *required* attribute in you input field
**
and for more validation , you just validate all the thing in HTML only
using django template tags...
here I am including a descent approach ...
I think there is 2 method which you can do to get the work done. ...
*1 : first one* .. you can declare a property decorator which just return
the url of that image
class Banner(BaseModel):
image = ResizedImageField(upload_to="banner", null=True,
blank=True)
gt; Good day,
> Please how can this be achieved?
> Best regards.
>
> On Wed, Jun 16, 2021, 7:01 PM Ridwan Adeyemo
> wrote:
>
>> Thanks man.👍
>>
>> On Wed, Jun 16, 2021, 5:22 PM Ayush Bisht wrote:
>>
>>> I think you are trying to sum up the value of
thanks, It works for me
On Wednesday, June 16, 2021 at 12:08:20 PM UTC-7 Nikeet NA wrote:
> Or you can store the url in the variable then use it.
>
> On Thursday, 17 June 2021 at 00:29:00 UTC+5:30 Nikeet NA wrote:
>
>> Do like this use
>> var obj_slug = object.slug inside script tag below
I think you are trying to sum up the value of two model fields and store
them in some other field.
so for that u can proceed from base.
simple you just have to update that field in save method
for example :
*class Student(models.Model):*
maths_score = models.DecimalField()
en
while doing great stuff with django I have found some clumsy behaviour of
django in handling .js file. Is there a way to effectively integrate all
the stuff of in a separate file and effectively used it
with rest of the html code.
for example :
// *file.html
..
gnKey(Patient, related_name="patient") # new
> line
> apply this line and your patient model will be linked with Vaccine model
>
> On Tue, Jun 1, 2021 at 11:06 AM Ayush Bisht wrote:
>
>> class Patient(models.Model):
>> patient_id = models.CharField
ELOPER
> wrote:
>
>> class Vaccine(models.Model)
>> vaccine = models.ForeignKey(PatientVaccineStatus,
>> related_name="vaccine_status")
>> patient = models.ForeignKey(Patient, related_name="patient") # new
>> line
>> apply
class Patient(models.Model):
patient_id = models.CharField(max_length=60)
class PatientVaccineStatus(models.Model):
patient = models.ForeignKey(Patient,
related_name="patient_vaccine_status")
class Vaccine(models.Model)
vaccine = models.ForeignKey(PatientVaccineStatus,
related_
# admin.py
class InputFilter(admin.SimpleListFilter):
template = 'patient/input_filter.html'
def lookups(self, request, model_admin):
# Dummy, required to show the filter.
return ((),)
class PatientProfilePastDataFilter(InputFilter):
parameter_name = 'patient'
tit
# admin.py
class CustomUserAdmin(UserAdmin):
model = CustomUser
add_form = CustomUserCreationForm
fieldsets = (
*UserAdmin.fieldsets, (
'User type',{
'fields' : (
'is_admin',
'is_doctor',
'i
15 matches
Mail list logo