hello i am not from the py community so please remove me from this section.
thanks
On Sat, Nov 5, 2022 at 12:06 AM Ammar Mohammed
wrote:
> *Get your Locations object :*
> obj = Locations.objects.get(pk=1)
> *Then get the region:*
>
>
*Get your Locations object :*
obj = Locations.objects.get(pk=1)
*Then get the region:*
obj.region.region_name
On Fri, 4 Nov 2022, 7:29 PM Kala Rani, wrote:
> models.py
> class Regions(models.Model):
> region_name = models.CharField(max_length=255)
>
> class Locations(models.Model): region =
My models.py
class Regions(models.Model):
region_name = models.CharField(max_length=255)
class Locations(models.Model):
region = models.ForeignKey(Regions,
on_delete=models.CASCADE,blank=True,null=True) name =
models.CharField(max_length=255)
How to do this query in django?
select
[image: attribute_error.png]Hello,
I wanted to migrate my app to using psycopg 3. However, I got an error that
insists using psycopg2, even when it was not installed in venv. So I
decided to ammend some django code as illustrated by the inventor of
psycopg3. However,
1. django complained
models.py
class Regions(models.Model):
region_name = models.CharField(max_length=255)
class Locations(models.Model): region = models.ForeignKey(Regions,
on_delete=models.CASCADE,blank=True,null=True) name =
models.CharField(max_length=255)
How to do this query in django?
select
I have a problem
El jue., 3 nov. 2022 16:40, subin escribió:
> Please let me know if that is okay.
>
> On Wed, Nov 2, 2022 at 5:03 PM Marcelo A. Robin
> wrote:
>
>> I have a processors.py file where I generate a context processor to load
>> static data into my project's base template. I have
Thanks, that worked, Thanks for your help
On Wed, Nov 2, 2022, 9:57 PM Julio Cojom wrote:
> When you change the status to Verified, you are only changing the object
> instance in memory, to save it to the database, you need to call the method
> save.
>
> verification.save() at the end should
7 matches
Mail list logo