Re: Set-Cookie is not working in Chrome

2019-12-11 Thread אורי
Hi,


On Thu, Dec 12, 2019 at 8:07 AM Mike Dewhirst  wrote:

> On 12/12/2019 4:48 pm, אורי wrote:
> > Hi,
> >
> > I want to add, the users login or logout or sign up to one website,
> > and I want them to login or logout from the other website too,
> > automatically. Currently if they login or logout to one website, it
> > doesn't affect the other website.
>
> Can you detect the logout on one and invalidate the session in the other
> backend database? Might have to make an API to do that.
>
>
Yes, I think it's possible, but anyway I want to setup the cookie in both
domain names - for login and for logout. I want to setup the cookie on the
second website when the user is viewing a page on the first website (each
of the two websites can be the first in this sense).

Both of the websites run on the same server with the same database. Each
user has a user ID which is the same in both websites.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABD5YeGfhnUVxbg6PXsS17%2BvuMSmGh9-78AjC%3Dfj06crWX2bGw%40mail.gmail.com.


Re: Set-Cookie is not working in Chrome

2019-12-11 Thread Mike Dewhirst

On 12/12/2019 4:48 pm, אורי wrote:

Hi,

I want to add, the users login or logout or sign up to one website, 
and I want them to login or logout from the other website too, 
automatically. Currently if they login or logout to one website, it 
doesn't affect the other website.


Can you detect the logout on one and invalidate the session in the other 
backend database? Might have to make an API to do that.




אורי
u...@speedy.net 


‪On Thu, Dec 12, 2019 at 7:45 AM ‫אורי‬‎ > wrote:‬


Django users,

I have a problem with Set-Cookie not working in Chrome (I didn't
check other browsers). It worked in the past but it stopped
working recently. I have two websites with two domain names, and I
need to set the cookie in both websites. I'm calling a URL in each
of the domain names to set the cookie. But it doesn't set the
cookie on the other website (the website I'm not browsing now). Is
there any solution to this problem? I think this is due to recent
changes in Chrome.

אורי
u...@speedy.net 

--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-users+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABD5YeFCw_ofBMyEQ89v7hoDTpGqR5R3f9oVeTjwD8-x-sdG2Q%40mail.gmail.com 
.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cae194e4-c13b-eeb7-4f9d-89c96128926f%40dewhirst.com.au.


Re: Set-Cookie is not working in Chrome

2019-12-11 Thread אורי
Hi,

I asked a question on Stack Overflow:
https://stackoverflow.com/questions/59298548/set-cookie-is-not-working-in-chrome-with-two-websites

אורי
u...@speedy.net


‪On Thu, Dec 12, 2019 at 7:45 AM ‫אורי‬‎  wrote:‬

> Django users,
>
> I have a problem with Set-Cookie not working in Chrome (I didn't check
> other browsers). It worked in the past but it stopped working recently. I
> have two websites with two domain names, and I need to set the cookie in
> both websites. I'm calling a URL in each of the domain names to set the
> cookie. But it doesn't set the cookie on the other website (the website I'm
> not browsing now). Is there any solution to this problem? I think this is
> due to recent changes in Chrome.
>
> אורי
> u...@speedy.net
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABD5YeEfobdHEkupL36P_7t_4Za3%2B7xNgV5B7k--y%3Dm%3DPQ_vmQ%40mail.gmail.com.


Re: Set-Cookie is not working in Chrome

2019-12-11 Thread אורי
Hi,

I want to add, the users login or logout or sign up to one website, and I
want them to login or logout from the other website too, automatically.
Currently if they login or logout to one website, it doesn't affect the
other website.

אורי
u...@speedy.net


‪On Thu, Dec 12, 2019 at 7:45 AM ‫אורי‬‎  wrote:‬

> Django users,
>
> I have a problem with Set-Cookie not working in Chrome (I didn't check
> other browsers). It worked in the past but it stopped working recently. I
> have two websites with two domain names, and I need to set the cookie in
> both websites. I'm calling a URL in each of the domain names to set the
> cookie. But it doesn't set the cookie on the other website (the website I'm
> not browsing now). Is there any solution to this problem? I think this is
> due to recent changes in Chrome.
>
> אורי
> u...@speedy.net
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABD5YeFCw_ofBMyEQ89v7hoDTpGqR5R3f9oVeTjwD8-x-sdG2Q%40mail.gmail.com.


Set-Cookie is not working in Chrome

2019-12-11 Thread אורי
Django users,

I have a problem with Set-Cookie not working in Chrome (I didn't check
other browsers). It worked in the past but it stopped working recently. I
have two websites with two domain names, and I need to set the cookie in
both websites. I'm calling a URL in each of the domain names to set the
cookie. But it doesn't set the cookie on the other website (the website I'm
not browsing now). Is there any solution to this problem? I think this is
due to recent changes in Chrome.

אורי
u...@speedy.net

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABD5YeEGpvEzN6P181e8Q6Mun%3DrokdcBem8WLV0gjRy7pMpOxA%40mail.gmail.com.


Re: SuperUser not logging out after reboot

2019-12-11 Thread Mike Dewhirst

On 11/12/2019 8:19 pm, Bruckner de Villiers wrote:


Running Django 3, Python 3.7.3, Chrome Browser on MacOS Catalina.

All the code and db are on an external Volume.

After a reboot (Restart on Mac), http://127.0.0.1:8000/admin/ 
displayed the admin page without requesting a login.  Not good for 
serious apps.  Probably something in my Chrome setup.  Is there a way 
to log out a user automatically after a set period of time?




Django auth is based on sessions. If there is a cookie on your Mac which 
is still valid after reboot no login will be required. You need to 
logout to invalidate it.


https://docs.djangoproject.com/en/3.0/topics/http/sessions/

There is lots of scope to adjust default behaviour to suit particular 
requirements.


Cheers

Mike



Much obliged,

Bruckner de Villiers

083 625 1086

--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-users+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/B80B7331-65D7-41DE-A22E-601A764E6A07%40gmail.com 
.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fc9514fb-c6f0-dd3d-7ce6-9951de159d4b%40dewhirst.com.au.


Re: How to run django app runserver on Apache

2019-12-11 Thread Virendra Tripathi
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/modwsgi/


Virendra



On Wed, Dec 11, 2019 at 8:59 PM Rupam Hazra  wrote:

>
>   Please help me out.
>
>  How to run django app runserver on Apache ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4fa7f73b-a8d0-4784-9572-b7b07718ad8b%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFJ-21DX6eNVy-XDTY5ZxPMN1_bhDR%3Dx1nRZJ-8uNHmdreNPAQ%40mail.gmail.com.


How to run django app runserver on Apache

2019-12-11 Thread Rupam Hazra

  Please help me out.

 How to run django app runserver on Apache ?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4fa7f73b-a8d0-4784-9572-b7b07718ad8b%40googlegroups.com.


Django does not Override Settings in Template Tag Testing

2019-12-11 Thread Eray Erdin
I have actually provided quite much verbose information in Stackoverflow 
.
 
I have a problem overriding settings as testing template tags. I leave this 
here in case you are interested.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8fa4ce5c-cdd1-4c1c-a00d-97554cf86633%40googlegroups.com.


Re: Influencing order of internal migration operations

2019-12-11 Thread Simon Charette
Hello Rich,

Unfortunately the migration framework is not smart enough to resolve this 
kind of dependency.

The order of operation/migrations of the makemigrations is generated by the 
autodetector which
hardcodes most of its logic.

I would have assumed that constraints were generated _after_ 
unique_togethers though[0].

I suspect the operations are ordered this way because the index and 
constraints operations don't
implement the references_field and references_model operations.

Could you give a try at implementing them for `AddConstraint` based on your 
CompositeForeignKey
values and see if it helps anyhow?

They should likely be implemented in core but I suspect it will be hard for 
functional and conditional
indices just like constraints are. I think the best way forward will be to 
add a `referenced_fields`
property on Index and BaseConstraint that returns a set of (model_label, 
field_name) tuples and
have index and constraint operations rely on them.

Cheers,
Simon

[0] 
https://github.com/django/django/blob/8ea3ff155eda8c9aa55e01e756c13faf2eb542d6/django/db/migrations/autodetector.py#L187-L190

Le mercredi 11 décembre 2019 12:27:43 UTC-5, Rich Rauenzahn a écrit :
>
> I've created a CompositeForeignKey constraint derived from Django's new 
> BaseConstraint.  It requires that I manually make a unique_together in any 
> of the referenced models views due to the DB internal requirements of 
> composite foreign keys.
>
> It mostly works -- except that when the operations are defined in the 
> migration, the order is critical -- the unique_together's need to be made 
> before the composite key SQL.
>
> For now, I just went in and manually changed the order of operations in 
> the migration to put the CompositeForeignKeys last.   Another way around 
> would be to comment out all the CompositeForeignKey declarations in my 
> models, migrate my unique_together's first, and then re-add the 
> CompositeForeignKeys.
>
> ...I'm wondering if there is a supported way to hook into the migration 
> creation process, give priorities to certain kinds of constraints, and then 
> sort the operations by this priority before they are emitted into a 
> migration.py.
>
> Or any other ideas to make this a bit more seamless?
>
> Rich
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a41ba064-82b7-489d-9b57-7b48f57c4c94%40googlegroups.com.


Influencing order of internal migration operations

2019-12-11 Thread Rich Rauenzahn
I've created a CompositeForeignKey constraint derived from Django's new 
BaseConstraint.  It requires that I manually make a unique_together in any 
of the referenced models views due to the DB internal requirements of 
composite foreign keys.

It mostly works -- except that when the operations are defined in the 
migration, the order is critical -- the unique_together's need to be made 
before the composite key SQL.

For now, I just went in and manually changed the order of operations in the 
migration to put the CompositeForeignKeys last.   Another way around would 
be to comment out all the CompositeForeignKey declarations in my models, 
migrate my unique_together's first, and then re-add the 
CompositeForeignKeys.

...I'm wondering if there is a supported way to hook into the migration 
creation process, give priorities to certain kinds of constraints, and then 
sort the operations by this priority before they are emitted into a 
migration.py.

Or any other ideas to make this a bit more seamless?

Rich

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c5c30972-c5cb-402f-b88b-a072bb284318%40googlegroups.com.


Re: Django DEBUG magic, and a bizarre bug under django-extra-views

2019-12-11 Thread Alaina Rowe
Quick bump to see if anyone has insight on this.

On Friday, December 6, 2019 at 5:08:41 PM UTC-6, Alaina Rowe wrote:
>
> I have not been able to reproduce the bug I am about to describe when 
> DEBUG is True, whether in production on Apache or locally on the Django dev 
> server. So my first question is: What is all the magic that Django DEBUG 
> does behind the scenes? The documentation doesn't have very much 
> information about this.
>
> Now for the bug. I understand that the following description is too 
> bare-bones for anyone to reproduce, but I have IP to protect, and I don't 
> have much hope of the error being reproduced anyway.
>
> Suppose I have a Django project with at least two apps, app alice with 
> model A and app bob with model B.
>
> I am using UpdateWithInlinesView from django-extra-views. The error occurs 
> when this view constructs a formset from instances of model A. In my email 
> about the 500, I get a message like this:
>
> FieldError at /some/url/
> Cannot resolve keyword 'field_of_A' into field. Choices are: field_of_B_1, 
> field_of_B_2, field_of_B_3
>
> I've gotten this type of error before. It normally happens when you tell a 
> form "I'm using model C" and "I'm using a field called debbie" and model C 
> doesn't have a field called debbie. That part makes sense. But this error 
> makes it look like it's checking against the field names of model B when it 
> should be checking model A. I have been racking my brain trying to figure 
> out how in the world the construction of a form from one model would 
> consult a different model from a different app.
>
> Furthermore, this doesn't happen most of the time, it goes away on server 
> restart, and it doesn't happen under DEBUG = True. So I'm wondering if it's 
> an app registry issue, some sort of race condition that gets the registry 
> out of whack. If so, then I might get somewhere by either understanding the 
> app registry better or understanding what DEBUG does.
>
> Any thoughts?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e58145f7-36e6-4240-ae80-37e04bc038a8%40googlegroups.com.


Re: passing an argument to ListView class and accessing using kwargs

2019-12-11 Thread Patrick Carra
Thank you Dominick your second suggestion worked beautifully!  I appreciate 
your time and expertise!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fe6e98de-a0c3-42e4-ab36-d439243faf29%40googlegroups.com.


Nepal Government: Boycott Nepal until Gadhimai animal sacrifice ends!

2019-12-11 Thread pematg405
Hallo,

ich habe gerade die Petition „Nepal Government: Boycott Nepal until
Gadhimai animal sacrifice ends!" unterschrieben und wollte dich fragen, ob
du auch mitmachst.

Unser Ziel ist es, 5.000 Unterschriften zu sammeln und dafür brauchen wir
Unterstützung. Hier kannst du mehr über die Petition erfahren:

http://chng.it/BPPFcy8MxP

Vielen Dank!
Pema

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOoBob74aGs2terfk1U%3D3F4NjReLietDmgQMqpsE7gGV09SDaw%40mail.gmail.com.


Re: Code Inspect

2019-12-11 Thread Integr@te System
Hi,

You may need refer to ModelViewSet class that inherit from GenericAPIView
class

https://www.django-rest-framework.org/api-guide/viewsets/#modelviewset



On Wed, Dec 11, 2019, 16:38 Soumen Khatua  wrote:

>
>
>
>
>
>
>
>
> *class UserViewSet(viewsets.ModelViewSet):queryset =
> get_user_model().objectsserializer_class = UserSerializerdef
> get_permissions(self):if self.request.method == 'POST':
> self.permission_classes = (AllowAny,)return super(UserViewSet,
> self).get_permissions()*
>
> I didn't understand this code,So i have some questions like:
>
> In this Case I'm overriding ModelViewSet get_permissions class,right?
>
> After overriding self.permission_classes variable,I'm returning Parent
> class(ModelViewSet) get_permissions(), Which method(properties)
> will come after calling UserViewSet.
>
> Thank You in advance
>
> Regards,
> Soumen
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPUw6WbEBaiizem-Gi2zh5gT1kRpdf-zM75_op2pYOebwTANXw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpqLWg22Bo6rKEZSfNt%3DvzSPUcJAwEinThMid1envSmjQ%40mail.gmail.com.


Re: Multiple Apps in one project with one database

2019-12-11 Thread Bruckner de Villiers
OK, got it.  Changed polls2/views.py to “from polls.models import Choice, 
Question” instead of “from .models import Choice, Question”.  It works, but 
VSCode doesn’t like “polls.model” – it gives a warning “unresolved import”.

Much obliged,

 

Bruckner de Villiers

083 625 1086

 

From:  on behalf of Miracle 

Reply to: 
Date: Wednesday, 11 December 2019 at 12:26
To: 
Subject: Re: Multiple Apps in one project with one database

 

Multiple Apps can point to one database.

 

What happens is that django creates different tables in the database.

 

It uses this format to create the tables

 

'appname_modelname'

 

e.g.  polls_question

 

 

Infact, if you  remember earlier on before runnung your first "python manage.py 
migrate".  Django told you that you had "unapplied migrations"

 

When you applied the migrations you might have noticed some other tables were 
created in the database. Tables like auth, session, admin, etc

 

 

 

On Wed, 11 Dec 2019, 10:52 am Bruckner de Villiers, 
 wrote:

I got to generic views (CBV’s) in part 4 of the Django tutorials and decided 
instead of overwriting  the function views that I would get some practice by 
creating a new app (polls2).  The file structure is identical to the polls app, 
but obviously the code is different for the generic views and urls now pointing 
to polls2.  I ran migrate and makemigrations.  The makemigrations surprised me 
as it created Question & Choice tables again:

(pyfun) Bruckners-MacBook-Pro:mysite brucknerdevilliers$ python manage.py 
makemigrations

Migrations for 'polls2':

  polls2/migrations/0001_initial.py

- Create model Question

- Create model Choice

(pyfun) Bruckners-MacBook-Pro:mysite brucknerdevilliers$ python manage.py 
migrate

Operations to perform:

  Apply all migrations: admin, auth, contenttypes, polls, polls2, sessions

Running migrations:

  Applying polls2.0001_initial... OK

So, I looked at the folders and there is only one sqlite3 file.  The Database 
Structure is unchanged and the original data is still intact.  The admin page 
now displays 2 Question tables – the 2nd one contains no data.  Also, 
http://127.0.0.1:8000/polls2/ shows No Questions available.

 

 

 

I have probably messed up with models.py.  Any pointers please as how multiple 
apps can point to the same database?

Regards,

Bruckner de Villiers

+27(0)83 625 1086

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/63C629FA-DB68-4CC0-989D-1D346632CD94%40gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADZv-jDYH3c%2Brx-d%2BE9C50cCkFnsb80YztQ8V1RXQ_rLEfqojg%40mail.gmail.com.


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4F9BFA18-7303-4EF5-AD46-2014CACF0D19%40gmail.com.


Re: SuperUser not logging out after reboot

2019-12-11 Thread Bruckner de Villiers
Thank you – thought that this is the case.  However, I am trying to cater for 
the user who forgot to log out.

Regards,

 

Bruckner de Villiers

083 625 1086

 

From:  on behalf of Miracle 

Reply to: 
Date: Wednesday, 11 December 2019 at 12:09
To: 
Subject: Re: SuperUser not logging out after reboot

 

Hello,

 

If you don't want to be logged in, you can simply log out before closing the 
local server. 

Another way is to tell your browser not to save the password whenever you are 
logging in.

 

 

I suppose you have atleast one email account or social media account. And I 
believe it logs you in automatically even after reboot.

 

In a nutshell, this is an expected behaviour.

 

 You can also clear the clear your browser cache for the page with "shift + F5"

 

Regards 

 

 

On Wed, 11 Dec 2019, 10:20 am Bruckner de Villiers, 
 wrote:

Running Django 3, Python 3.7.3, Chrome Browser on MacOS Catalina.

 

All the code and db are on an external Volume.

 

After a reboot (Restart on Mac), http://127.0.0.1:8000/admin/ displayed the 
admin page without requesting a login.  Not good for serious apps.  Probably 
something in my Chrome setup.  Is there a way to log out a user automatically 
after a set period of time?

 

Much obliged,

 

Bruckner de Villiers

083 625 1086

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/B80B7331-65D7-41DE-A22E-601A764E6A07%40gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADZv-jACi8PXe5Q%2BtXWZ9YvD2UkfdGcbwc686qY03Bv-1FB9sA%40mail.gmail.com.


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/D973DEBF-27FE-4282-BA99-1BA110F9E2FC%40gmail.com.


Re: Looking for internship

2019-12-11 Thread Abhishek Satbhai
Which programing languages you know?

On Wednesday, December 11, 2019 at 9:33:37 AM UTC+5:30, Anirudh choudhary 
wrote:
>
> Hello all 
> I am looking for internship in Delhi or pune. I am currently in 6 sem of 
> engineering mechatronics in ADYPU. 
> I am ready to work as part time , full time, home based. 
> Thankyou 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/06076220-1c81-43ff-bd8c-280b6d1c1590%40googlegroups.com.


unable to execute 'workon' command

2019-12-11 Thread rishabh roy
I am unable get into a virtualenv in vscode:
 c:\Users\User\test\Lib\site-packages>python -m workon tygu
C:\Users\User\test\Scripts\python.exe: No module named workon.__main__; 
'workon' is a package and cannot be directly executed

workon is present in  c:\Users\User\test\Lib\site-packages
tygu is the venv

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d8065e6b-9643-4088-a3a4-ae013c53faca%40googlegroups.com.


Stuck trying to add an image display to admin

2019-12-11 Thread Joel Ricker
In my admin I have a section for editing products and for each product has 
a one to many of sample images. I wanted to display the image for convience 
in my StackedInline for the sample images. However after setting everything 
up to display the sample image, I am still getting an internal error when 
it tries to render the view. Can someone look at it and give me an idea of 
whats going on?

Here is my code so far:


admin.py: 

class SampleInline(admin.StackedInline):
model = SampleImage
extra = 3

 

verbose_name = "Sample Page"
verbose_name_plural = "Sample Pages"

 

fieldsets = (
(None, {
'fields' : ("sample_type", "sample_image", "order", 
"display_sample_image",)
}),
)
readonly_fields = ("display_sample_image",)

 

def display_sample_image(self, obj):
return obj.display_sample_image()
return "testing"


 models.py

class SampleImage(models.Model):
sheet = models.ForeignKey(Sheet, related_name = "samples", 
on_delete=models.CASCADE, null=True)
sample_type = models.IntegerField(choices=IMAGE_CHOICES, 
default=IMAGE_CHOICES[-1][0])
sample_image = models.ImageField(upload_to=sample_image_upload_to)
order = models.IntegerField(blank=True,  null=True)


def display_sample_image(self):
width = 200
height = width * self.sample_image.height / self.sample_image.width
return format_html('http://127.0.0.1:8000/admin/browse/sheet/3868/change/

Django Version: 2.2.7
Python Version: 3.7.0
Installed Applications:
['browse.apps.BrowseConfig',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']


Template error:
In template 
E:\Python\Python37\lib\site-packages\django\contrib\admin\templates\admin\includes\fieldset.html,
 
error at line 17
   2
   7 : 
   8 : {% if line.fields|length_is:'1' %}{{ line.errors }}{% 
endif %}
   9 : {% for field in line %}
   10 : 
   11 : {% if not line.fields|length_is:'1' and not 
field.is_readonly %}{{ field.errors }}{% endif %}
   12 : {% if field.is_checkbox %}
   13 : {{ field.field }}{{ field.label_tag }}
   14 : {% else %}
   15 : {{ field.label_tag }}
   16 : {% if field.is_readonly %}
   17 :  {{ 
field.contents }} 
   18 : {% else %}
   19 : {{ field.field }}
   20 : {% endif %}
   21 : {% endif %}
   22 : {% if field.field.help_text %}
   23 : {{ 
field.field.help_text|safe }}
   24 : {% endif %}
   25 : 
   26 : {% endfor %}
   27 : 


Traceback:

File "E:\Python\Python37\lib\site-packages\django\db\models\options.py" in 
get_field
  565. return self.fields_map[field_name]

During handling of the above exception ('display_sample_image'), another 
exception occurred:

File "E:\Python\Python37\lib\site-packages\django\contrib\admin\utils.py" 
in lookup_field
  262. f = _get_non_gfk_field(opts, name)

File "E:\Python\Python37\lib\site-packages\django\contrib\admin\utils.py" 
in _get_non_gfk_field
  293. field = opts.get_field(name)

File "E:\Python\Python37\lib\site-packages\django\db\models\options.py" in 
get_field
  567. raise FieldDoesNotExist("%s has no field named '%s'" % 
(self.object_name, field_name))

During handling of the above exception (SampleImage has no field named 
'display_sample_image'), another exception occurred:

File 
"E:\Python\Python37\lib\site-packages\django\core\handlers\exception.py" in 
inner
  34. response = get_response(request)

File "E:\Python\Python37\lib\site-packages\django\core\handlers\base.py" in 
_get_response
  145. response = self.process_exception_by_middleware(e, 
request)

File "E:\Python\Python37\lib\site-packages\django\core\handlers\base.py" in 
_get_response
  143. response = response.render()

File "E:\Python\Python37\lib\site-packages\django\template\response.py" in 
render
  106. self.content = self.rendered_content

File "E:\Python\Python37\lib\site-packages\django\template\response.py" in 
rendered_content
  83. content = template.render(context, self._request)

File 

How to search product in the integrated Google maps in the web applicaiton

2019-12-11 Thread Wasim Rana
Hi, how are you doing today? I am trying to build a web application where 
there will be buyer and seller. Buyer needs to create an account after that 
if he/she search for a service then it'll bring the seller information with 
location in the map. Also it'll show the distance and route. How can I do 
that? It's something like Uber. Can you help me please?

Thank you so much.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/569f26c4-77a0-4fad-8de9-e22d7ec1fa52%40googlegroups.com.


Re: ''workon' is not recognized as an internal or external command, operable program or batch file'

2019-12-11 Thread rishabh roy
hey hima i got the same error and installed workon package pip but now 
it still gives error :
(test) c:\Users\User\test\Lib\site-packages>python -m workon test
C:\Users\User\test\Scripts\python.exe: No module named workon.__main__; 
'workon' is a package and cannot be directly executed

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b762a1d9-adf3-409f-91a9-6a30fc4f2a44%40googlegroups.com.


Re: How to add navigatinon bar or Menu Bar in Django Admin Panel only

2019-12-11 Thread Integr@te System
Hi,

https://medium.com/crowdbotics/how-to-add-a-navigation-menu-in-django-admin-770b872a9531

On Wed, Dec 11, 2019, 15:22 Balaji Shetty  wrote:

> Hi
>
> Can anyone help me in adding Navigatinon Bar in Django Admin Panel in
> Backend.
>
> I have to generate some customized reports using Aggregate function link
> Sum, Count, Group by on models.
>
> Sample Demo example is shown in Attachment.
>
>
>
>
>
> --
> Mr Shetty Balaji
> Asst. Prof.
> IT Department
> SGGS I
> Nanded. My. India
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAECSbOvz%3DisaeDNZpr4TT9D1bLOKQENwNAjdOjY7-eJA2N_COw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWoSj21byGMnJ8MH0axv_O2%2BnrTLNF72oRqH8gYzzd8t3w%40mail.gmail.com.


Live notifications using channels

2019-12-11 Thread Suraj Thapa FC
Can anyone guide me to implement live notifications system in DRF.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPjsHcGmF8g-7gSfZQ2%3Dw7%3DhxnL015vrWYLaCv6SU_Fpi3FEYQ%40mail.gmail.com.


Re: Multiple Apps in one project with one database

2019-12-11 Thread Miracle
Multiple Apps can point to one database.

What happens is that django creates different tables in the database.

It uses this format to create the tables

'appname_modelname'

e.g.  polls_question


Infact, if you  remember earlier on before runnung your first "python
manage.py migrate".  Django told you that you had "unapplied migrations"

When you applied the migrations you might have noticed some other tables
were created in the database. Tables like auth, session, admin, etc



On Wed, 11 Dec 2019, 10:52 am Bruckner de Villiers, <
bruckner.devilli...@gmail.com> wrote:

> I got to generic views (CBV’s) in part 4 of the Django tutorials and
> decided instead of overwriting  the function views that I would get some
> practice by creating a new app (polls2).  The file structure is identical
> to the polls app, but obviously the code is different for the generic views
> and urls now pointing to polls2.  I ran migrate and makemigrations.  The
> makemigrations surprised me as it created Question & Choice tables again:
>
> (pyfun) Bruckners-MacBook-Pro:mysite brucknerdevilliers$ python manage.py
> makemigrations
>
> Migrations for 'polls2':
>
>   polls2/migrations/0001_initial.py
>
> - Create model Question
>
> - Create model Choice
>
> (pyfun) Bruckners-MacBook-Pro:mysite brucknerdevilliers$ python manage.py
> migrate
>
> Operations to perform:
>
>   Apply all migrations: admin, auth, contenttypes, polls, polls2, sessions
>
> Running migrations:
>
>   Applying polls2.0001_initial... OK
>
> So, I looked at the folders and there is only one sqlite3 file.  The
> Database Structure is unchanged and the original data is still intact.  The
> admin page now displays 2 Question tables – the 2nd one contains no
> data.  Also, http://127.0.0.1:8000/polls2/ shows No Questions available.
>
>
>
>
>
>
>
> I have probably messed up with models.py.  Any pointers please as how
> multiple apps can point to the same database?
>
> Regards,
>
> Bruckner de Villiers
>
> +27(0)83 625 1086
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/63C629FA-DB68-4CC0-989D-1D346632CD94%40gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADZv-jDYH3c%2Brx-d%2BE9C50cCkFnsb80YztQ8V1RXQ_rLEfqojg%40mail.gmail.com.


Re: I need any internship

2019-12-11 Thread Dvs Khamele
Sure, I am Divyesh Khamele from Pythonmate,
And we are looking for interns whom we can provide training and give back
to society,
You may mail your resume at pythonmatedivy...@gmail.com
Many Thanks,
Divyesh Khamele


On Thu, 28 Nov 2019 at 03:59, mohamed khaled 
wrote:

> I would like to work with any time anyone just works with someone to help
> any company or any startup I am good in English and I have a good skill not
> much because I am still junuior. I love so much programming and work with
> exciting projects. I just build projects alone I need to communicate with a
> team and other developers. in my country we have rare internships especial
> in Django. I hope anyone went through this stage to help me
> thank you guys
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/9e925270-8df9-43e1-8fb7-d168a23dae96%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAH9mneVzebVHfN11S%2Bji3Bho-y--qgigRvA6F7Xg-PJgidg45g%40mail.gmail.com.


Re: Internship

2019-12-11 Thread Dvs Khamele
Sure, I am Divyesh Khamele for Pythonmate,
And we are looking for interns whom we can provide training and give back
to society,
You may mail your resume at pythonmatedivy...@gmail.com
Many Thanks,
Divyesh Khamele

On Thu, 28 Nov 2019 at 20:29, Shubham Mishra 
wrote:

> sir , I want to join the internship program . Recently I have done my
> Python and Django course .
> Revert me as soon as possible.
>
> On Sat, Nov 23, 2019, 16:37 Atul Anand  wrote:
>
>> Forward the resume.
>>
>> On Fri, Nov 22, 2019, 5:04 PM Scyil sharma 
>> wrote:
>>
>>> I am sahil sharma, a student of btech 3rd year and I'm seeking for an
>>> internship in Winter vacation. I would like to be work as a backend
>>> developer.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/781ac56c-d22b-465e-9345-f629e077f2f6%40googlegroups.com
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAKHpVdRm-2%3DWTBKrVjxGxK6xywtCLGNgAk_%3DYGxTyPfXSM6hnA%40mail.gmail.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAGHpP%3DXeBhuKCbRJToKy%3D7B_6oZWM2LunWXJ-1C7j6N0kNu6nw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAH9mneUAgVH%3DX6aMmANi8QV_Z95LddNVV30XT%3DuzF%2BKSCjhyoQ%40mail.gmail.com.


Re: Looking for internship

2019-12-11 Thread Dvs Khamele
Sure, I am Divyesh Khamele for Pythonmate,
And we are looking for interns whom we can provide training and give back
to society,
You may mail your resume at pythonmatedivy...@gmail.com
Many Thanks,
Divyesh Khamele

On Wed, 11 Dec 2019 at 09:33, Anirudh choudhary <
anirudhchoudary...@gmail.com> wrote:

> Hello all
> I am looking for internship in Delhi or pune. I am currently in 6 sem of
> engineering mechatronics in ADYPU.
> I am ready to work as part time , full time, home based.
> Thankyou
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAL8_rkFJ7G2m5h-uO_TerHm%2B_Apb%3DMPp%2BsevvgWx4t0Xr8wZuA%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAH9mneV2VyiAdP7vOFdk%3DrMq_-BxBOLs2DshWTuv1ALw0TDu8Q%40mail.gmail.com.


Re: SuperUser not logging out after reboot

2019-12-11 Thread Miracle
Hello,

If you don't want to be logged in, you can simply log out before closing
the local server.
Another way is to tell your browser not to save the password whenever you
are logging in.


I suppose you have atleast one email account or social media account. And I
believe it logs you in automatically even after reboot.

In a nutshell, this is an expected behaviour.

 You can also clear the clear your browser cache for the page with "shift +
F5"

Regards


On Wed, 11 Dec 2019, 10:20 am Bruckner de Villiers, <
bruckner.devilli...@gmail.com> wrote:

> Running Django 3, Python 3.7.3, Chrome Browser on MacOS Catalina.
>
>
>
> All the code and db are on an external Volume.
>
>
>
> After a reboot (Restart on Mac), http://127.0.0.1:8000/admin/ displayed
> the admin page without requesting a login.  Not good for serious apps.
> Probably something in my Chrome setup.  Is there a way to log out a user
> automatically after a set period of time?
>
>
>
> Much obliged,
>
>
>
> Bruckner de Villiers
>
> 083 625 1086
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/B80B7331-65D7-41DE-A22E-601A764E6A07%40gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADZv-jACi8PXe5Q%2BtXWZ9YvD2UkfdGcbwc686qY03Bv-1FB9sA%40mail.gmail.com.


Re: Unable to create a new virtual environement 'test'

2019-12-11 Thread Hima Bindu chowdary
it worked! really appreciate the help!

On Wednesday, December 4, 2019 at 10:24:30 PM UTC+5:30, Manjunatha C wrote:
>
> Python -m venv envname 
>
> Try with this command

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d18ddcf1-0ad5-4a5e-a88e-bf605fb47943%40googlegroups.com.


Multiple Apps in one project with one database

2019-12-11 Thread Bruckner de Villiers
I got to generic views (CBV’s) in part 4 of the Django tutorials and decided 
instead of overwriting  the function views that I would get some practice by 
creating a new app (polls2).  The file structure is identical to the polls app, 
but obviously the code is different for the generic views and urls now pointing 
to polls2.  I ran migrate and makemigrations.  The makemigrations surprised me 
as it created Question & Choice tables again:

(pyfun) Bruckners-MacBook-Pro:mysite brucknerdevilliers$ python manage.py 
makemigrations

Migrations for 'polls2':

  polls2/migrations/0001_initial.py

    - Create model Question

    - Create model Choice

(pyfun) Bruckners-MacBook-Pro:mysite brucknerdevilliers$ python manage.py 
migrate

Operations to perform:

  Apply all migrations: admin, auth, contenttypes, polls, polls2, sessions

Running migrations:

  Applying polls2.0001_initial... OK

So, I looked at the folders and there is only one sqlite3 file.  The Database 
Structure is unchanged and the original data is still intact.  The admin page 
now displays 2 Question tables – the 2nd one contains no data.  Also, 
http://127.0.0.1:8000/polls2/ shows No Questions available.

 

 

 

I have probably messed up with models.py.  Any pointers please as how multiple 
apps can point to the same database?

Regards,

Bruckner de Villiers

+27(0)83 625 1086

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/63C629FA-DB68-4CC0-989D-1D346632CD94%40gmail.com.


Code Inspect

2019-12-11 Thread Soumen Khatua
*class UserViewSet(viewsets.ModelViewSet):queryset =
get_user_model().objectsserializer_class = UserSerializerdef
get_permissions(self):if self.request.method == 'POST':
self.permission_classes = (AllowAny,)return super(UserViewSet,
self).get_permissions()*

I didn't understand this code,So i have some questions like:

In this Case I'm overriding ModelViewSet get_permissions class,right?

After overriding self.permission_classes variable,I'm returning Parent
class(ModelViewSet) get_permissions(), Which method(properties)
will come after calling UserViewSet.

Thank You in advance

Regards,
Soumen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPUw6WbEBaiizem-Gi2zh5gT1kRpdf-zM75_op2pYOebwTANXw%40mail.gmail.com.


SuperUser not logging out after reboot

2019-12-11 Thread Bruckner de Villiers
Running Django 3, Python 3.7.3, Chrome Browser on MacOS Catalina.

 

All the code and db are on an external Volume.

 

After a reboot (Restart on Mac), http://127.0.0.1:8000/admin/ displayed the 
admin page without requesting a login.  Not good for serious apps.  Probably 
something in my Chrome setup.  Is there a way to log out a user automatically 
after a set period of time?

 

Much obliged,

 

Bruckner de Villiers

083 625 1086

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/B80B7331-65D7-41DE-A22E-601A764E6A07%40gmail.com.


Re: Need to Query complex django model

2019-12-11 Thread Kasper Laudrup

Hi Nitin,

On 11/12/2019 08.04, Nitin Kalmaste wrote:

Hello community,
I need to make django views for the models described below.
How do i create query to write in view

https://stackoverflow.com/questions/59280345/how-to-query-django-models-for-complex-models-like-this



You are approaching this the wrong way. You definitely shouldn't be 
formatting HTML the way you are doing it.


Read up on Django Templates:

https://docs.djangoproject.com/en/2.2/topics/templates/

Or at least start out by following the Django tutorial:

https://docs.djangoproject.com/en/2.2/intro/tutorial01/

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/55502fe8-35df-ca31-e864-6229bfe59ab2%40stacktrace.dk.