Re: Please help me in views.py

2019-09-04 Thread Amit Samanta
I want try is...
there will be a dashboard

which will show

Author name

all the books which the author written

details of the book published date , avout the book in the above format


On Wed, 4 Sep, 2019, 12:08 PM Anirudh Jain, 
wrote:

> Could you please elaborate/be more clear about what you are really trying
> to do ?
>
> On Wed, 4 Sep 2019, 10:26 Bhoopesh sisoudiya, 
> wrote:
>
>> Hi Amit,
>>
>> You can use
>> =≠=
>> Book.objects.select_related(FK).select_related(FK). values (select
>> column name which you want).all()
>>
>>
>> Thanks
>> Bhoopesh sisoudiya
>>
>> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
>> wrote:
>>
>>> Hi,
>>>
>>> I need help i am not understanding the keywords of joining and fetch
>>> value in veiw.py
>>> i have three tables in model.py
>>>
>>> Table 1(Author) :
>>>
>>> Table 2(books):
>>>
>>> Table 3 (details):
>>> FK of table1
>>> FK of table2
>>>
>>> Fk = foreign key
>>>
>>> I have to just show
>>>
>>> Author (author name) Books (dynamic) Books(author 2nd book)
>>>  ...
>>> details(dynamic) details(dtl
>>> of author 2nd book) ...
>>>
>>> I have created the template
>>>
>>> now in views.py i an confused
>>>
>>> book=books.object(i do not get what to do)
>>> Author= (same )
>>> details = (same)
>>>
>>> Please can anybody help that will be very greatfull.
>>> Thank you in advance
>>>
>>>
>>>
>>> Thanks and Regards
>>> Amit Samanta
>>>
>>> --
>>> 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/54483cc3-eadd-4559-8c61-c179cfbab933%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/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%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/CAC3mK7faT1yOHZXdHXc0DyeDYRtTpD_Pke39AJYmXRQW%2BOi09Q%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/CAP4hbAbWFvE0CRoeX45psThD7yWbKHR16aJXH866-dCFdHSfZw%40mail.gmail.com.


Re: Please help me in views.py

2019-09-04 Thread Amit Samanta
now how can i get the name for author and details??

On Wed, 4 Sep, 2019, 10:25 AM Bhoopesh sisoudiya, 
wrote:

> Hi Amit,
>
> You can use
> =≠=
> Book.objects.select_related(FK).select_related(FK). values (select column
> name which you want).all()
>
>
> Thanks
> Bhoopesh sisoudiya
>
> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta  wrote:
>
>> Hi,
>>
>> I need help i am not understanding the keywords of joining and fetch
>> value in veiw.py
>> i have three tables in model.py
>>
>> Table 1(Author) :
>>
>> Table 2(books):
>>
>> Table 3 (details):
>> FK of table1
>> FK of table2
>>
>> Fk = foreign key
>>
>> I have to just show
>>
>> Author (author name) Books (dynamic) Books(author 2nd book)
>>  ...
>> details(dynamic) details(dtl
>> of author 2nd book) ...
>>
>> I have created the template
>>
>> now in views.py i an confused
>>
>> book=books.object(i do not get what to do)
>> Author= (same )
>> details = (same)
>>
>> Please can anybody help that will be very greatfull.
>> Thank you in advance
>>
>>
>>
>> Thanks and Regards
>> Amit Samanta
>>
>> --
>> 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/54483cc3-eadd-4559-8c61-c179cfbab933%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/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%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/CAP4hbAY%3DvOB%2BEs6hZ77jcAU_-LuuG51LkqEPU3eB5nrgqS48ow%40mail.gmail.com.


Re: Please help me in views.py

2019-09-04 Thread Lim Kai Wey
Hey Amit,

I suggest you to follow this tutorial to build your project,
https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website

It teaches you all the basics that you need to know from scratch, which in
my opinion will answer all the questions you're asking.
The tutorial is about building a local library webpage which I believe is
very similar to what you are doing now.

Hope this helps.

Regards,
Kai Wey

On Wed, Sep 4, 2019 at 3:59 PM Amit Samanta  wrote:

> now how can i get the name for author and details??
>
> On Wed, 4 Sep, 2019, 10:25 AM Bhoopesh sisoudiya, 
> wrote:
>
>> Hi Amit,
>>
>> You can use
>> =≠=
>> Book.objects.select_related(FK).select_related(FK). values (select
>> column name which you want).all()
>>
>>
>> Thanks
>> Bhoopesh sisoudiya
>>
>> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
>> wrote:
>>
>>> Hi,
>>>
>>> I need help i am not understanding the keywords of joining and fetch
>>> value in veiw.py
>>> i have three tables in model.py
>>>
>>> Table 1(Author) :
>>>
>>> Table 2(books):
>>>
>>> Table 3 (details):
>>> FK of table1
>>> FK of table2
>>>
>>> Fk = foreign key
>>>
>>> I have to just show
>>>
>>> Author (author name) Books (dynamic) Books(author 2nd book)
>>>  ...
>>> details(dynamic) details(dtl
>>> of author 2nd book) ...
>>>
>>> I have created the template
>>>
>>> now in views.py i an confused
>>>
>>> book=books.object(i do not get what to do)
>>> Author= (same )
>>> details = (same)
>>>
>>> Please can anybody help that will be very greatfull.
>>> Thank you in advance
>>>
>>>
>>>
>>> Thanks and Regards
>>> Amit Samanta
>>>
>>> --
>>> 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/54483cc3-eadd-4559-8c61-c179cfbab933%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/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%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/CAP4hbAY%3DvOB%2BEs6hZ77jcAU_-LuuG51LkqEPU3eB5nrgqS48ow%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/CAPcVkjg11EAf-rYFvoz85Y5BLKBisD4FJQSOCzonzi0TFC91ZQ%40mail.gmail.com.


Re: Weird django.urls.exceptions.NoReverseMatch: 'review' is not a registered namespace

2019-09-04 Thread Julien Enselme
Did you do the reverse with 'reviews:detail'?
Can you post your new urls.py and the code you use to do the reverse?

Julien Enselme
Développeur chez BureauxLocaux


Le mer. 4 sept. 2019 à 00:35, Pasquale  a écrit :

> Applied your suggestion,now I get
> django.urls.exceptions.NoReverseMatch: Reverse for 'detail' not found.
> 'detail' is not a valid view function or pattern name.
>
> --
> 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/f2bd455e-2c0d-747f-343a-5f7d1135a45e%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/CAL%3D_h26YjniuZ1yX%2BK82gq-_h6hLsnEcBQvdp2feSgq9Qb%2BznA%40mail.gmail.com.


Django boilerplate with otp verification

2019-09-04 Thread Suraj Thapa FC
https://github.com/SurajFc/Django-DRF-Boilerplate-with-otp-verification

-- 
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/CAPjsHcFuU0r3uB5RpVT6hEGRZ8wU3XD3os9VqOoTyJ8dy7ptrA%40mail.gmail.com.


Re: Please help me in views.py

2019-09-04 Thread Amit Samanta
i just need the veiw.py after this done i will try your tutorial

On Wed, 4 Sep, 2019, 1:34 PM Lim Kai Wey,  wrote:

> Hey Amit,
>
> I suggest you to follow this tutorial to build your project,
>
> https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website
>
> It teaches you all the basics that you need to know from scratch, which in
> my opinion will answer all the questions you're asking.
> The tutorial is about building a local library webpage which I believe is
> very similar to what you are doing now.
>
> Hope this helps.
>
> Regards,
> Kai Wey
>
> On Wed, Sep 4, 2019 at 3:59 PM Amit Samanta 
> wrote:
>
>> now how can i get the name for author and details??
>>
>> On Wed, 4 Sep, 2019, 10:25 AM Bhoopesh sisoudiya, 
>> wrote:
>>
>>> Hi Amit,
>>>
>>> You can use
>>> =≠=
>>> Book.objects.select_related(FK).select_related(FK). values (select
>>> column name which you want).all()
>>>
>>>
>>> Thanks
>>> Bhoopesh sisoudiya
>>>
>>> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
>>> wrote:
>>>
 Hi,

 I need help i am not understanding the keywords of joining and fetch
 value in veiw.py
 i have three tables in model.py

 Table 1(Author) :

 Table 2(books):

 Table 3 (details):
 FK of table1
 FK of table2

 Fk = foreign key

 I have to just show

 Author (author name) Books (dynamic) Books(author 2nd book)
...
 details(dynamic)
  details(dtl of author 2nd book) ...

 I have created the template

 now in views.py i an confused

 book=books.object(i do not get what to do)
 Author= (same )
 details = (same)

 Please can anybody help that will be very greatfull.
 Thank you in advance



 Thanks and Regards
 Amit Samanta

 --
 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/54483cc3-eadd-4559-8c61-c179cfbab933%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/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%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/CAP4hbAY%3DvOB%2BEs6hZ77jcAU_-LuuG51LkqEPU3eB5nrgqS48ow%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/CAPcVkjg11EAf-rYFvoz85Y5BLKBisD4FJQSOCzonzi0TFC91ZQ%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/CAP4hbAbE21Cz1rfPohvhUbZ6DRO_5QHQTdVDZWotOU%3DjkjioDA%40mail.gmail.com.


Re: Please help me in views.py

2019-09-04 Thread Anirudh Jain
This can be done easily if you make a proper view function and render data
from it in template properly.
A view function can be written like this :-

Here I am assuming that you want get the details of all the books/auuthors
at one page. If you want details of a particular book, then the following
function will be different.

from .models import Details, Author, Books
from django.shortcuts import render

view.py :-
def getdetails(request):
template_name = 'showDetails.html'
objs = Details.objects.all()
context = {'objs; : objs}
return render(request, template_name, context}


showDetails.html :-
(use this block in your html code wherever you want to show this data)

{% if objs %}



Author
Book


{% for obj in objs %}

  {{ obj.author_name }} 
  {{ obj.book_name }} 

{% endfor %}


{% endif %}

(In above html code, I have assumed that author_name and book_name are the
FK in your Details table. Also, I am not sure


On Wed, Sep 4, 2019 at 1:34 PM Lim Kai Wey  wrote:

> Hey Amit,
>
> I suggest you to follow this tutorial to build your project,
>
> https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website
>
> It teaches you all the basics that you need to know from scratch, which in
> my opinion will answer all the questions you're asking.
> The tutorial is about building a local library webpage which I believe is
> very similar to what you are doing now.
>
> Hope this helps.
>
> Regards,
> Kai Wey
>
> On Wed, Sep 4, 2019 at 3:59 PM Amit Samanta 
> wrote:
>
>> now how can i get the name for author and details??
>>
>> On Wed, 4 Sep, 2019, 10:25 AM Bhoopesh sisoudiya, 
>> wrote:
>>
>>> Hi Amit,
>>>
>>> You can use
>>> =≠=
>>> Book.objects.select_related(FK).select_related(FK). values (select
>>> column name which you want).all()
>>>
>>>
>>> Thanks
>>> Bhoopesh sisoudiya
>>>
>>> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
>>> wrote:
>>>
 Hi,

 I need help i am not understanding the keywords of joining and fetch
 value in veiw.py
 i have three tables in model.py

 Table 1(Author) :

 Table 2(books):

 Table 3 (details):
 FK of table1
 FK of table2

 Fk = foreign key

 I have to just show

 Author (author name) Books (dynamic) Books(author 2nd book)
...
 details(dynamic)
  details(dtl of author 2nd book) ...

 I have created the template

 now in views.py i an confused

 book=books.object(i do not get what to do)
 Author= (same )
 details = (same)

 Please can anybody help that will be very greatfull.
 Thank you in advance



 Thanks and Regards
 Amit Samanta

 --
 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/54483cc3-eadd-4559-8c61-c179cfbab933%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/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%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/CAP4hbAY%3DvOB%2BEs6hZ77jcAU_-LuuG51LkqEPU3eB5nrgqS48ow%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/CAPcVkjg11EAf-rYFvoz85Y5BLKBisD4FJQSOCzonzi0TFC91ZQ%40mail.gmail.com
> 

Re: Please help me in views.py

2019-09-04 Thread Anirudh Jain
Also, I am not sure how you have written html code, so use it properly
according to your convinience.

On Wed, Sep 4, 2019 at 2:41 PM Anirudh Jain 
wrote:

> This can be done easily if you make a proper view function and render data
> from it in template properly.
> A view function can be written like this :-
>
> Here I am assuming that you want get the details of all the books/auuthors
> at one page. If you want details of a particular book, then the following
> function will be different.
>
> from .models import Details, Author, Books
> from django.shortcuts import render
>
> view.py :-
> def getdetails(request):
> template_name = 'showDetails.html'
> objs = Details.objects.all()
> context = {'objs; : objs}
> return render(request, template_name, context}
>
>
> showDetails.html :-
> (use this block in your html code wherever you want to show this data)
>
> {% if objs %}
>
> 
> 
> Author
> Book
> 
>
> {% for obj in objs %}
> 
>   {{ obj.author_name }} 
>   {{ obj.book_name }} 
> 
> {% endfor %}
> 
>
> {% endif %}
>
> (In above html code, I have assumed that author_name and book_name are the
> FK in your Details table. Also, I am not sure
>
>
> On Wed, Sep 4, 2019 at 1:34 PM Lim Kai Wey  wrote:
>
>> Hey Amit,
>>
>> I suggest you to follow this tutorial to build your project,
>>
>> https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website
>>
>> It teaches you all the basics that you need to know from scratch, which
>> in my opinion will answer all the questions you're asking.
>> The tutorial is about building a local library webpage which I believe is
>> very similar to what you are doing now.
>>
>> Hope this helps.
>>
>> Regards,
>> Kai Wey
>>
>> On Wed, Sep 4, 2019 at 3:59 PM Amit Samanta 
>> wrote:
>>
>>> now how can i get the name for author and details??
>>>
>>> On Wed, 4 Sep, 2019, 10:25 AM Bhoopesh sisoudiya, 
>>> wrote:
>>>
 Hi Amit,

 You can use
 =≠=
 Book.objects.select_related(FK).select_related(FK). values (select
 column name which you want).all()


 Thanks
 Bhoopesh sisoudiya

 On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
 wrote:

> Hi,
>
> I need help i am not understanding the keywords of joining and fetch
> value in veiw.py
> i have three tables in model.py
>
> Table 1(Author) :
>
> Table 2(books):
>
> Table 3 (details):
> FK of table1
> FK of table2
>
> Fk = foreign key
>
> I have to just show
>
> Author (author name) Books (dynamic) Books(author 2nd book)
>...
> details(dynamic)
>  details(dtl of author 2nd book) ...
>
> I have created the template
>
> now in views.py i an confused
>
> book=books.object(i do not get what to do)
> Author= (same )
> details = (same)
>
> Please can anybody help that will be very greatfull.
> Thank you in advance
>
>
>
> Thanks and Regards
> Amit Samanta
>
> --
> 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/54483cc3-eadd-4559-8c61-c179cfbab933%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/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%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/CAP4hbAY%3DvOB%2BEs6hZ77jcAU_-LuuG51LkqEPU3eB5nrgqS48ow%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and sto

Re: Please help me in views.py

2019-09-04 Thread Amit Samanta
You have gussed correctly..
but i have taked book id as fk but i need the book name

On Wed, 4 Sep, 2019, 2:41 PM Anirudh Jain, 
wrote:

> This can be done easily if you make a proper view function and render data
> from it in template properly.
> A view function can be written like this :-
>
> Here I am assuming that you want get the details of all the books/auuthors
> at one page. If you want details of a particular book, then the following
> function will be different.
>
> from .models import Details, Author, Books
> from django.shortcuts import render
>
> view.py :-
> def getdetails(request):
> template_name = 'showDetails.html'
> objs = Details.objects.all()
> context = {'objs; : objs}
> return render(request, template_name, context}
>
>
> showDetails.html :-
> (use this block in your html code wherever you want to show this data)
>
> {% if objs %}
>
> 
> 
> Author
> Book
> 
>
> {% for obj in objs %}
> 
>   {{ obj.author_name }} 
>   {{ obj.book_name }} 
> 
> {% endfor %}
> 
>
> {% endif %}
>
> (In above html code, I have assumed that author_name and book_name are the
> FK in your Details table. Also, I am not sure
>
>
> On Wed, Sep 4, 2019 at 1:34 PM Lim Kai Wey  wrote:
>
>> Hey Amit,
>>
>> I suggest you to follow this tutorial to build your project,
>>
>> https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website
>>
>> It teaches you all the basics that you need to know from scratch, which
>> in my opinion will answer all the questions you're asking.
>> The tutorial is about building a local library webpage which I believe is
>> very similar to what you are doing now.
>>
>> Hope this helps.
>>
>> Regards,
>> Kai Wey
>>
>> On Wed, Sep 4, 2019 at 3:59 PM Amit Samanta 
>> wrote:
>>
>>> now how can i get the name for author and details??
>>>
>>> On Wed, 4 Sep, 2019, 10:25 AM Bhoopesh sisoudiya, 
>>> wrote:
>>>
 Hi Amit,

 You can use
 =≠=
 Book.objects.select_related(FK).select_related(FK). values (select
 column name which you want).all()


 Thanks
 Bhoopesh sisoudiya

 On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
 wrote:

> Hi,
>
> I need help i am not understanding the keywords of joining and fetch
> value in veiw.py
> i have three tables in model.py
>
> Table 1(Author) :
>
> Table 2(books):
>
> Table 3 (details):
> FK of table1
> FK of table2
>
> Fk = foreign key
>
> I have to just show
>
> Author (author name) Books (dynamic) Books(author 2nd book)
>...
> details(dynamic)
>  details(dtl of author 2nd book) ...
>
> I have created the template
>
> now in views.py i an confused
>
> book=books.object(i do not get what to do)
> Author= (same )
> details = (same)
>
> Please can anybody help that will be very greatfull.
> Thank you in advance
>
>
>
> Thanks and Regards
> Amit Samanta
>
> --
> 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/54483cc3-eadd-4559-8c61-c179cfbab933%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/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%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/CAP4hbAY%3DvOB%2BEs6hZ77jcAU_-LuuG51LkqEPU3eB5nrgqS48ow%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 

Re: Please help me in views.py

2019-09-04 Thread Anirudh Jain
Then simply use {{ obj.book_name.name }} in template where again, I am
assuming 'name' is the column name you have give to book name in Books model

On Wed, Sep 4, 2019 at 3:25 PM Amit Samanta  wrote:

> You have gussed correctly..
> but i have taked book id as fk but i need the book name
>
> On Wed, 4 Sep, 2019, 2:41 PM Anirudh Jain, 
> wrote:
>
>> This can be done easily if you make a proper view function and render
>> data from it in template properly.
>> A view function can be written like this :-
>>
>> Here I am assuming that you want get the details of all the
>> books/auuthors at one page. If you want details of a particular book, then
>> the following function will be different.
>>
>> from .models import Details, Author, Books
>> from django.shortcuts import render
>>
>> view.py :-
>> def getdetails(request):
>> template_name = 'showDetails.html'
>> objs = Details.objects.all()
>> context = {'objs; : objs}
>> return render(request, template_name, context}
>>
>>
>> showDetails.html :-
>> (use this block in your html code wherever you want to show this data)
>>
>> {% if objs %}
>>
>> 
>> 
>> Author
>> Book
>> 
>>
>> {% for obj in objs %}
>> 
>>   {{ obj.author_name }} 
>>   {{ obj.book_name }} 
>> 
>> {% endfor %}
>> 
>>
>> {% endif %}
>>
>> (In above html code, I have assumed that author_name and book_name are
>> the FK in your Details table. Also, I am not sure
>>
>>
>> On Wed, Sep 4, 2019 at 1:34 PM Lim Kai Wey  wrote:
>>
>>> Hey Amit,
>>>
>>> I suggest you to follow this tutorial to build your project,
>>>
>>> https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website
>>>
>>> It teaches you all the basics that you need to know from scratch, which
>>> in my opinion will answer all the questions you're asking.
>>> The tutorial is about building a local library webpage which I believe
>>> is very similar to what you are doing now.
>>>
>>> Hope this helps.
>>>
>>> Regards,
>>> Kai Wey
>>>
>>> On Wed, Sep 4, 2019 at 3:59 PM Amit Samanta 
>>> wrote:
>>>
 now how can i get the name for author and details??

 On Wed, 4 Sep, 2019, 10:25 AM Bhoopesh sisoudiya, 
 wrote:

> Hi Amit,
>
> You can use
> =≠=
> Book.objects.select_related(FK).select_related(FK). values (select
> column name which you want).all()
>
>
> Thanks
> Bhoopesh sisoudiya
>
> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
> wrote:
>
>> Hi,
>>
>> I need help i am not understanding the keywords of joining and fetch
>> value in veiw.py
>> i have three tables in model.py
>>
>> Table 1(Author) :
>>
>> Table 2(books):
>>
>> Table 3 (details):
>> FK of table1
>> FK of table2
>>
>> Fk = foreign key
>>
>> I have to just show
>>
>> Author (author name) Books (dynamic) Books(author 2nd book)
>>  ...
>> details(dynamic)
>>  details(dtl of author 2nd book) ...
>>
>> I have created the template
>>
>> now in views.py i an confused
>>
>> book=books.object(i do not get what to do)
>> Author= (same )
>> details = (same)
>>
>> Please can anybody help that will be very greatfull.
>> Thank you in advance
>>
>>
>>
>> Thanks and Regards
>> Amit Samanta
>>
>> --
>> 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/54483cc3-eadd-4559-8c61-c179cfbab933%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/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%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/CAP4hbAY%3DvOB%2BEs6hZ77jcAU_-LuuG51LkqEPU3eB5nr

how can we use single serializer with 2 differnt viewsets for registration considering the both reg form have different fields

2019-09-04 Thread shubham joshi
as you  can see 
https://github.com/shubham1507/school/blob/trial/users/serializers.py I 
have created two serizer for two registrtion form

shubham1507/school
Contribute to shubham1507/school development by creating an account on 
GitHub.


how can we use single serializer with 2 differnt viewsets for registration 
considering the both reg form have different fields

-- 
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/cf92009c-3182-4df5-930a-9025f195d058%40googlegroups.com.


Re: Please help me in views.py

2019-09-04 Thread Amit Samanta
by the above it is not giving any error but it is not showing the
correspondence names and also it is showing all the fields in detail :-((

please help

On Wed, 4 Sep, 2019, 4:10 PM Anirudh Jain, 
wrote:

> Then simply use {{ obj.book_name.name }} in template where again, I am
> assuming 'name' is the column name you have give to book name in Books model
>
> On Wed, Sep 4, 2019 at 3:25 PM Amit Samanta 
> wrote:
>
>> You have gussed correctly..
>> but i have taked book id as fk but i need the book name
>>
>> On Wed, 4 Sep, 2019, 2:41 PM Anirudh Jain, 
>> wrote:
>>
>>> This can be done easily if you make a proper view function and render
>>> data from it in template properly.
>>> A view function can be written like this :-
>>>
>>> Here I am assuming that you want get the details of all the
>>> books/auuthors at one page. If you want details of a particular book, then
>>> the following function will be different.
>>>
>>> from .models import Details, Author, Books
>>> from django.shortcuts import render
>>>
>>> view.py :-
>>> def getdetails(request):
>>> template_name = 'showDetails.html'
>>> objs = Details.objects.all()
>>> context = {'objs; : objs}
>>> return render(request, template_name, context}
>>>
>>>
>>> showDetails.html :-
>>> (use this block in your html code wherever you want to show this data)
>>>
>>> {% if objs %}
>>>
>>> 
>>> 
>>> Author
>>> Book
>>> 
>>>
>>> {% for obj in objs %}
>>> 
>>>   {{ obj.author_name }} 
>>>   {{ obj.book_name }} 
>>> 
>>> {% endfor %}
>>> 
>>>
>>> {% endif %}
>>>
>>> (In above html code, I have assumed that author_name and book_name are
>>> the FK in your Details table. Also, I am not sure
>>>
>>>
>>> On Wed, Sep 4, 2019 at 1:34 PM Lim Kai Wey  wrote:
>>>
 Hey Amit,

 I suggest you to follow this tutorial to build your project,

 https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website

 It teaches you all the basics that you need to know from scratch, which
 in my opinion will answer all the questions you're asking.
 The tutorial is about building a local library webpage which I believe
 is very similar to what you are doing now.

 Hope this helps.

 Regards,
 Kai Wey

 On Wed, Sep 4, 2019 at 3:59 PM Amit Samanta 
 wrote:

> now how can i get the name for author and details??
>
> On Wed, 4 Sep, 2019, 10:25 AM Bhoopesh sisoudiya, <
> bhoop23...@gmail.com> wrote:
>
>> Hi Amit,
>>
>> You can use
>> =≠=
>> Book.objects.select_related(FK).select_related(FK). values (select
>> column name which you want).all()
>>
>>
>> Thanks
>> Bhoopesh sisoudiya
>>
>> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
>> wrote:
>>
>>> Hi,
>>>
>>> I need help i am not understanding the keywords of joining and fetch
>>> value in veiw.py
>>> i have three tables in model.py
>>>
>>> Table 1(Author) :
>>>
>>> Table 2(books):
>>>
>>> Table 3 (details):
>>> FK of table1
>>> FK of table2
>>>
>>> Fk = foreign key
>>>
>>> I have to just show
>>>
>>> Author (author name) Books (dynamic) Books(author 2nd book)
>>>  ...
>>> details(dynamic)
>>>  details(dtl of author 2nd book) ...
>>>
>>> I have created the template
>>>
>>> now in views.py i an confused
>>>
>>> book=books.object(i do not get what to do)
>>> Author= (same )
>>> details = (same)
>>>
>>> Please can anybody help that will be very greatfull.
>>> Thank you in advance
>>>
>>>
>>>
>>> Thanks and Regards
>>> Amit Samanta
>>>
>>> --
>>> 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/54483cc3-eadd-4559-8c61-c179cfbab933%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/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%40mail.gmail.com
>> 
>> .
>>
> --

Re: Please help me in views.py

2019-09-04 Thread Devdutt Bhati
wiil get resolve the issue revert me.

On Wed, Sep 4, 2019 at 1:07 AM Devdutt Bhati 
wrote:

> if you created table in models.py. you can import table at view file like
> : from  appname .models import table/class name .
> when you got the table data at views file then use it as
> *variable=Tablename.objects.all()* now get all values in variable. it can
> render in render function and use values at html page.
> use for loop.
>
> On Wed, Sep 4, 2019 at 12:58 AM Amit Samanta 
> wrote:
>
>> I want try is...
>> there will be a dashboard
>>
>> which will show
>>
>> Author name
>>
>> all the books which the author written
>>
>> details of the book published date , avout the book in the above format
>>
>>
>> On Wed, 4 Sep, 2019, 12:08 PM Anirudh Jain, 
>> wrote:
>>
>>> Could you please elaborate/be more clear about what you are really
>>> trying to do ?
>>>
>>> On Wed, 4 Sep 2019, 10:26 Bhoopesh sisoudiya, 
>>> wrote:
>>>
 Hi Amit,

 You can use
 =≠=
 Book.objects.select_related(FK).select_related(FK). values (select
 column name which you want).all()


 Thanks
 Bhoopesh sisoudiya

 On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
 wrote:

> Hi,
>
> I need help i am not understanding the keywords of joining and fetch
> value in veiw.py
> i have three tables in model.py
>
> Table 1(Author) :
>
> Table 2(books):
>
> Table 3 (details):
> FK of table1
> FK of table2
>
> Fk = foreign key
>
> I have to just show
>
> Author (author name) Books (dynamic) Books(author 2nd book)
>...
> details(dynamic)
>  details(dtl of author 2nd book) ...
>
> I have created the template
>
> now in views.py i an confused
>
> book=books.object(i do not get what to do)
> Author= (same )
> details = (same)
>
> Please can anybody help that will be very greatfull.
> Thank you in advance
>
>
>
> Thanks and Regards
> Amit Samanta
>
> --
> 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/54483cc3-eadd-4559-8c61-c179cfbab933%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/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%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/CAC3mK7faT1yOHZXdHXc0DyeDYRtTpD_Pke39AJYmXRQW%2BOi09Q%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/CAP4hbAbWFvE0CRoeX45psThD7yWbKHR16aJXH866-dCFdHSfZw%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/CAP1z-%3DK%2B2htPjgzrmY8Gqr-OZF3bWcRei6V0axqAOpYd-Y2XVA%40mail.gmail.com.


Re: How can i share one Database Sqlite between 2 app on pythonanywhere

2019-09-04 Thread Jay Vasant
It isn't possible to share a local db between two apps.

Here are the alternatives you can use:

   - Create api's for all the operations you want to perform.
   - Use an hosted db service(e.g. Postgres on heroku).


On Wed, Sep 4, 2019 at 10:39 AM Balaji Shetty 
wrote:

> Hi Everyone
>
> Can anybody suggest me
> How can i share one Database Sqlite between 2 app on pythonanywhere.
>
> Currently i have deployed one project on PythonAnywhere.
> I have purchases 2 App.
> Now i can execute 2 App simultaneous.
>
> I have deployed app1.pythonanywhere.com and app2.pythonanywhere.com
>
> app1.pythonanywhere.com is my real time hosted project. Before making any
> changes, i create mirror copy of code and Database Sqlite on
> app2.pythonanywhere.com, make changes and if changes are proper. I make
> changes in
> app1.pythonanywhere.com.
>
> But it is time consuming Process. Better solution may be share database
> and make changes in Business Logic and reflect in orignal one.
>
> My Simple Question is
> How can i share sqlite database between two Project here.
>
> OR
>
> Is there any other way to do the same thing more efficiently?
>
> Thanks in Advance.
> --
>
>
> *Mr. Shetty Balaji S.Asst. ProfessorDepartment of Information Technology,*
> *SGGS Institute of Engineering & Technology, Vishnupuri, Nanded.MH.India*
> *Official: bsshe...@sggs.ac.in  *
> *  Mobile: +91-9270696267*
>
> --
> 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/CAECSbOv7vBQ8hxZBoPf2PvVgUY2NS-44-yvLuprbphdvN1ZJYw%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/CA%2BG34NBKyjK5WHkhqBS9f0JADeXU5mwu129MK_UHGF8pfXry2g%40mail.gmail.com.


Re: Please help me in views.py

2019-09-04 Thread Devdutt Bhati
def getdetails(request11):
 objs = Details.objects.all()
 context = {'objs; : objs}
return render(request, 'full_path_of_template', context}

templates in which folders path should set in setting file. try this all
the best and revert me.
view.py :-
def getdetails(request):
template_name = 'showDetails.html'
objs = Details.objects.all()
context = {'objs; : objs}
return render(request, template_name, context}


On Wed, Sep 4, 2019 at 3:40 AM Anirudh Jain 
wrote:

> Then simply use {{ obj.book_name.name }} in template where again, I am
> assuming 'name' is the column name you have give to book name in Books model
>
> On Wed, Sep 4, 2019 at 3:25 PM Amit Samanta 
> wrote:
>
>> You have gussed correctly..
>> but i have taked book id as fk but i need the book name
>>
>> On Wed, 4 Sep, 2019, 2:41 PM Anirudh Jain, 
>> wrote:
>>
>>> This can be done easily if you make a proper view function and render
>>> data from it in template properly.
>>> A view function can be written like this :-
>>>
>>> Here I am assuming that you want get the details of all the
>>> books/auuthors at one page. If you want details of a particular book, then
>>> the following function will be different.
>>>
>>> from .models import Details, Author, Books
>>> from django.shortcuts import render
>>>
>>> view.py :-
>>> def getdetails(request):
>>> template_name = 'showDetails.html'
>>> objs = Details.objects.all()
>>> context = {'objs; : objs}
>>> return render(request, template_name, context}
>>>
>>>
>>> showDetails.html :-
>>> (use this block in your html code wherever you want to show this data)
>>>
>>> {% if objs %}
>>>
>>> 
>>> 
>>> Author
>>> Book
>>> 
>>>
>>> {% for obj in objs %}
>>> 
>>>   {{ obj.author_name }} 
>>>   {{ obj.book_name }} 
>>> 
>>> {% endfor %}
>>> 
>>>
>>> {% endif %}
>>>
>>> (In above html code, I have assumed that author_name and book_name are
>>> the FK in your Details table. Also, I am not sure
>>>
>>>
>>> On Wed, Sep 4, 2019 at 1:34 PM Lim Kai Wey  wrote:
>>>
 Hey Amit,

 I suggest you to follow this tutorial to build your project,

 https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website

 It teaches you all the basics that you need to know from scratch, which
 in my opinion will answer all the questions you're asking.
 The tutorial is about building a local library webpage which I believe
 is very similar to what you are doing now.

 Hope this helps.

 Regards,
 Kai Wey

 On Wed, Sep 4, 2019 at 3:59 PM Amit Samanta 
 wrote:

> now how can i get the name for author and details??
>
> On Wed, 4 Sep, 2019, 10:25 AM Bhoopesh sisoudiya, <
> bhoop23...@gmail.com> wrote:
>
>> Hi Amit,
>>
>> You can use
>> =≠=
>> Book.objects.select_related(FK).select_related(FK). values (select
>> column name which you want).all()
>>
>>
>> Thanks
>> Bhoopesh sisoudiya
>>
>> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
>> wrote:
>>
>>> Hi,
>>>
>>> I need help i am not understanding the keywords of joining and fetch
>>> value in veiw.py
>>> i have three tables in model.py
>>>
>>> Table 1(Author) :
>>>
>>> Table 2(books):
>>>
>>> Table 3 (details):
>>> FK of table1
>>> FK of table2
>>>
>>> Fk = foreign key
>>>
>>> I have to just show
>>>
>>> Author (author name) Books (dynamic) Books(author 2nd book)
>>>  ...
>>> details(dynamic)
>>>  details(dtl of author 2nd book) ...
>>>
>>> I have created the template
>>>
>>> now in views.py i an confused
>>>
>>> book=books.object(i do not get what to do)
>>> Author= (same )
>>> details = (same)
>>>
>>> Please can anybody help that will be very greatfull.
>>> Thank you in advance
>>>
>>>
>>>
>>> Thanks and Regards
>>> Amit Samanta
>>>
>>> --
>>> 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/54483cc3-eadd-4559-8c61-c179cfbab933%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/djang

Re: Please help me in views.py

2019-09-04 Thread Devdutt Bhati
if you created table in models.py. you can import table at view file
like : from
appname .models import table/class name .
when you got the table data at views file then use it as
*variable=Tablename.objects.all()* now get all values in variable. it can
render in render function and use values at html page.
use for loop.

On Wed, Sep 4, 2019 at 12:58 AM Amit Samanta 
wrote:

> I want try is...
> there will be a dashboard
>
> which will show
>
> Author name
>
> all the books which the author written
>
> details of the book published date , avout the book in the above format
>
>
> On Wed, 4 Sep, 2019, 12:08 PM Anirudh Jain, 
> wrote:
>
>> Could you please elaborate/be more clear about what you are really trying
>> to do ?
>>
>> On Wed, 4 Sep 2019, 10:26 Bhoopesh sisoudiya, 
>> wrote:
>>
>>> Hi Amit,
>>>
>>> You can use
>>> =≠=
>>> Book.objects.select_related(FK).select_related(FK). values (select
>>> column name which you want).all()
>>>
>>>
>>> Thanks
>>> Bhoopesh sisoudiya
>>>
>>> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
>>> wrote:
>>>
 Hi,

 I need help i am not understanding the keywords of joining and fetch
 value in veiw.py
 i have three tables in model.py

 Table 1(Author) :

 Table 2(books):

 Table 3 (details):
 FK of table1
 FK of table2

 Fk = foreign key

 I have to just show

 Author (author name) Books (dynamic) Books(author 2nd book)
...
 details(dynamic)
  details(dtl of author 2nd book) ...

 I have created the template

 now in views.py i an confused

 book=books.object(i do not get what to do)
 Author= (same )
 details = (same)

 Please can anybody help that will be very greatfull.
 Thank you in advance



 Thanks and Regards
 Amit Samanta

 --
 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/54483cc3-eadd-4559-8c61-c179cfbab933%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/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%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/CAC3mK7faT1yOHZXdHXc0DyeDYRtTpD_Pke39AJYmXRQW%2BOi09Q%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/CAP4hbAbWFvE0CRoeX45psThD7yWbKHR16aJXH866-dCFdHSfZw%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/CAP1z-%3DLZqkq38wgz7w%2Bv%2BuzWcWkJsx1xUr-kdkpOGTKgBuwOQA%40mail.gmail.com.


Re: Please help me in views.py

2019-09-04 Thread Amit Samanta
i get all thank you for your help..
the actuall funda is
i have to show author name with related to that i have to show books name
of the same author now the detail related to the books
this is wht i need
:-(

On Wed, 4 Sep, 2019, 6:01 PM Devdutt Bhati, 
wrote:

> if you created table in models.py. you can import table at view file like
> : from  appname .models import table/class name .
> when you got the table data at views file then use it as
> *variable=Tablename.objects.all()* now get all values in variable. it can
> render in render function and use values at html page.
> use for loop.
>
> On Wed, Sep 4, 2019 at 12:58 AM Amit Samanta 
> wrote:
>
>> I want try is...
>> there will be a dashboard
>>
>> which will show
>>
>> Author name
>>
>> all the books which the author written
>>
>> details of the book published date , avout the book in the above format
>>
>>
>> On Wed, 4 Sep, 2019, 12:08 PM Anirudh Jain, 
>> wrote:
>>
>>> Could you please elaborate/be more clear about what you are really
>>> trying to do ?
>>>
>>> On Wed, 4 Sep 2019, 10:26 Bhoopesh sisoudiya, 
>>> wrote:
>>>
 Hi Amit,

 You can use
 =≠=
 Book.objects.select_related(FK).select_related(FK). values (select
 column name which you want).all()


 Thanks
 Bhoopesh sisoudiya

 On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
 wrote:

> Hi,
>
> I need help i am not understanding the keywords of joining and fetch
> value in veiw.py
> i have three tables in model.py
>
> Table 1(Author) :
>
> Table 2(books):
>
> Table 3 (details):
> FK of table1
> FK of table2
>
> Fk = foreign key
>
> I have to just show
>
> Author (author name) Books (dynamic) Books(author 2nd book)
>...
> details(dynamic)
>  details(dtl of author 2nd book) ...
>
> I have created the template
>
> now in views.py i an confused
>
> book=books.object(i do not get what to do)
> Author= (same )
> details = (same)
>
> Please can anybody help that will be very greatfull.
> Thank you in advance
>
>
>
> Thanks and Regards
> Amit Samanta
>
> --
> 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/54483cc3-eadd-4559-8c61-c179cfbab933%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/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%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/CAC3mK7faT1yOHZXdHXc0DyeDYRtTpD_Pke39AJYmXRQW%2BOi09Q%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/CAP4hbAbWFvE0CRoeX45psThD7yWbKHR16aJXH866-dCFdHSfZw%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/CAP1z-%3DLZqkq38wgz7w%2Bv%2BuzWcWkJsx1xUr-kdkpOGTKgBuwOQA%40ma

Re: Regarding to nested serilizers

2019-09-04 Thread Ronit Mishra
Hey RJ,

All your views have the same name, that is probably the reason you're not
able to view the salary field, since its displaying the first view i.e for
employe_hireSerializer always.

On Wed, Sep 4, 2019 at 7:11 PM RONAK JAIN  wrote:

> Hello
>
>
> I am trying to do nested but I am not getting my* salaries fileds* in
> nested form can you see my screen shots.
>
>
> Thanks
>
> --
> 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/CA%2BAqMUd9TYRz%3D%3D%3D%3DZ-Hooj21CD15y2h9aP%2BBntyCCuON_AbMSg%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/CACh0Ehyt1iFtPowOqW83CN_-_FomV5EfjJed54iKWqH2vf_wsw%40mail.gmail.com.


Re: Please help me in views.py

2019-09-04 Thread Amit Samanta
Its done now.. thank u everybody

Now i want to do that it will show only the latest book with detail of a
author



On Wed, 4 Sep, 2019, 6:07 PM Amit Samanta,  wrote:

> i get all thank you for your help..
> the actuall funda is
> i have to show author name with related to that i have to show books name
> of the same author now the detail related to the books
> this is wht i need
> :-(
>
> On Wed, 4 Sep, 2019, 6:01 PM Devdutt Bhati, 
> wrote:
>
>> if you created table in models.py. you can import table at view file
>> like : from  appname .models import table/class name .
>> when you got the table data at views file then use it as
>> *variable=Tablename.objects.all()* now get all values in variable. it
>> can render in render function and use values at html page.
>> use for loop.
>>
>> On Wed, Sep 4, 2019 at 12:58 AM Amit Samanta 
>> wrote:
>>
>>> I want try is...
>>> there will be a dashboard
>>>
>>> which will show
>>>
>>> Author name
>>>
>>> all the books which the author written
>>>
>>> details of the book published date , avout the book in the above format
>>>
>>>
>>> On Wed, 4 Sep, 2019, 12:08 PM Anirudh Jain, 
>>> wrote:
>>>
 Could you please elaborate/be more clear about what you are really
 trying to do ?

 On Wed, 4 Sep 2019, 10:26 Bhoopesh sisoudiya, 
 wrote:

> Hi Amit,
>
> You can use
> =≠=
> Book.objects.select_related(FK).select_related(FK). values (select
> column name which you want).all()
>
>
> Thanks
> Bhoopesh sisoudiya
>
> On Wed, Sep 4, 2019, 9:38 AM Amit Samanta 
> wrote:
>
>> Hi,
>>
>> I need help i am not understanding the keywords of joining and fetch
>> value in veiw.py
>> i have three tables in model.py
>>
>> Table 1(Author) :
>>
>> Table 2(books):
>>
>> Table 3 (details):
>> FK of table1
>> FK of table2
>>
>> Fk = foreign key
>>
>> I have to just show
>>
>> Author (author name) Books (dynamic) Books(author 2nd book)
>>  ...
>> details(dynamic)
>>  details(dtl of author 2nd book) ...
>>
>> I have created the template
>>
>> now in views.py i an confused
>>
>> book=books.object(i do not get what to do)
>> Author= (same )
>> details = (same)
>>
>> Please can anybody help that will be very greatfull.
>> Thank you in advance
>>
>>
>>
>> Thanks and Regards
>> Amit Samanta
>>
>> --
>> 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/54483cc3-eadd-4559-8c61-c179cfbab933%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/CAAk3c1OzGXKSQg8GK1C8_5Ck-iQ%2B1WjsYMdD%2B%2B0_q3inb94jyw%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/CAC3mK7faT1yOHZXdHXc0DyeDYRtTpD_Pke39AJYmXRQW%2BOi09Q%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/CAP4hbAbWFvE0CRoeX45psThD7yWbKHR16aJXH866-dCFdHSfZw%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google 

Re: How can i share one Database Sqlite between 2 app on pythonanywhere

2019-09-04 Thread Mario R. Osorio
You have at least 2 possibilities, depending on your exact needs:

1- The preferred method is to Import the models from the app they reside 
at, like in:

*from foo_app.models import bar_model*

2- You could also have the models you need to share created at the project 
level thus making them available to all and any of your apps (this method 
is rather frowned upon)

3- If what you need is not the share the data among your apps but the 
structure of the tables, you could also use "abstract base classes". and 
use use them like in the 2 previous options.

HTH

On Wednesday, September 4, 2019 at 1:10:39 AM UTC-4, Balaji wrote:
>
> Hi Everyone
>
> Can anybody suggest me
> How can i share one Database Sqlite between 2 app on pythonanywhere.
>
> Currently i have deployed one project on PythonAnywhere.
> I have purchases 2 App.
> Now i can execute 2 App simultaneous.
>
> I have deployed app1.pythonanywhere.com and app2.pythonanywhere.com
>
> app1.pythonanywhere.com is my real time hosted project. Before making any 
> changes, i create mirror copy of code and Database Sqlite on 
> app2.pythonanywhere.com, make changes and if changes are proper. I make 
> changes in
> app1.pythonanywhere.com.
>
> But it is time consuming Process. Better solution may be share database 
> and make changes in Business Logic and reflect in orignal one.
>
> My Simple Question is
> How can i share sqlite database between two Project here.
>
> OR
>
> Is there any other way to do the same thing more efficiently?
>
> Thanks in Advance.
> -- 
>
>
> *Mr. Shetty Balaji S.Asst. ProfessorDepartment of Information Technology,*
> *SGGS Institute of Engineering & Technology, Vishnupuri, Nanded.MH.India*
> *Official: bssh...@sggs.ac.in  *
> *  Mobile: +91-9270696267*
>
>

-- 
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/8208d80d-a0d3-422f-a79e-50f132df97ad%40googlegroups.com.


Staticfiles on S3

2019-09-04 Thread Elias Coutinho
Guys good afternoon,

I managed to put my static folder in s3, the problem is that my effects 
already lost power. lol

The staticfiles folder where the auxiliary applications are installed stop 
working, in my case it was django-material, select2 and others.



If I comment this code 
 
that is in the settings of my project it works but does not send anything 
to Amazon s3.



Any suggestion?

-- 
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/70f224ee-f7a4-468f-9609-db2f8a0be161%40googlegroups.com.


Re: Staticfiles on S3

2019-09-04 Thread mohammed habib
Did you run python manage.py collectstatic

Are you using static template tags to heed your html link href fields 

Sent from my iPhone

> On 4 Sep 2019, at 23:06, Elias Coutinho  wrote:
> 
> Guys good afternoon,
> 
> I managed to put my static folder in s3, the problem is that my effects 
> already lost power. lol
> 
> The staticfiles folder where the auxiliary applications are installed stop 
> working, in my case it was django-material, select2 and others.
> 
> 
> 
> If I comment this code that is in the settings of my project it works but 
> does not send anything to Amazon s3.
> 
> 
> 
> Any suggestion?
> -- 
> 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/70f224ee-f7a4-468f-9609-db2f8a0be161%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/D42D2706-9340-4450-BC92-35AB0D2C47DB%40gmail.com.


model object query

2019-09-04 Thread Dev Gis


Hi All,

How to get the ForeignKey value while querying the model object.


I was trying to query a model object "mla" to fetch a specific sets of columns 
and its working fine but the field ForeignKey "instuid" returning a numeric 
value instant of actual associated value.


Do I need to edit the query in views.py


def mlas_datasets(request):

 mlaAll = 
list(mla.objects.values('mla_name_short','mla_name_full','inst_acronym','mla_type','year_adopted',*'**instuid**'*,'mla_uid'))
 mlaAll = JsonResponse(mlaAll,safe=False)
 return HttpResponse(mlaAll,content_type='json')


Regards

Deb

-- 
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/71e89d44-8beb-4968-bd94-749b5878b43b%40googlegroups.com.


Apache reverse proxy for django app running in singularity container

2019-09-04 Thread bhuffman


I'm trying to set up an Apache reverse proxy for a django app that is 
running in a singularity container.  I'm also trying to enforce HTTPS on 
the Apache frontend.

I've tried the following in my apache conf.d/app.conf:

ProxyPreserveHost OnRequestHeader set X-Forwarded-Proto 'https' 
env=HTTPSProxyPass "/app_prefix/"  "http://localhost:8101/"ProxyPassReverse 
"/app_prefix/"  "http://localhost:8101/";

I've tried using the following in the mysite/sittings (django):

SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
USE_X_FORWARDED_HOST = True
FORCE_SCRIPT_NAME = '/app_prefix/'

None of these seem to work.

Here's how I'm starting the django app:

/software/singularity/bin/singularity exec -B /basedir:/mnt 
/basedir/container.simg /mnt/bin/run_in_singularity.sh

The 'run_in_singularity.sh' is as follows:

cd /mnt/simple-ajax-crud/
python manage.py runserver 0.0.0.0:8101

The app loads, but the app isn't creating relative URLs, so includes are 
referenced under /static (which can't be found b/c it doesn't match the 
proxy/reverse proxy).

If I work around '/static' by adding additional reverse proxies, then I run 
into other URLs in the app with the same problem. So I need to figure out 
how to inform the app to create the correct URLs.


Can anyone help?


Thanks, Brian

-- 
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/247cf1c4-5ccb-40db-9545-68ae5714c4f1%40googlegroups.com.


ForeignKey value while querying the model object

2019-09-04 Thread dev


Hi All,

How to get the ForeignKey value while querying the model object.

 

I was trying to query a model object "mla" to fetch a specific sets of columns 
and its working fine but the field ForeignKey i.e "instuid" returning a numeric 
value instant of actual associated value.

 

Do I need to edit the query





*def mlas_datasets(request): mlaAll = 
list(mla.objects.values('mla_name_short','mla_name_full','inst_acronym','mla_type','year_adopted','instuid','mla_uid'))
 mlaAll = JsonResponse(mlaAll,safe=False) return 
HttpResponse(mlaAll,content_type='json')*


Regards

Deb

-- 
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/2ca903ba-5105-4983-a1bd-f36c17078f27%40googlegroups.com.


Apache reverse proxy for django app running in singularity container

2019-09-04 Thread bhuffman


I'm trying to set up an Apache reverse proxy for a django app that is 
running in a singularity container.

I've tried the following in my apache conf.d/app.conf:

ProxyPreserveHost OnRequestHeader set X-Forwarded-Proto 'https' 
env=HTTPSProxyPass "/app_prefix/"  "http://localhost:8101/"ProxyPassReverse 
"/app_prefix/"  "http://localhost:8101/";

I've tried using the following in the mysite/sittings (django):

SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
USE_X_FORWARDED_HOST = True
FORCE_SCRIPT_NAME = '/app_prefix/'

None of these seem to work.

Here's how I'm starting the django app:

/software/singularity/bin/singularity exec -B /basedir:/mnt 
/basedir/container.simg /mnt/bin/run_in_singularity.sh

The 'run_in_singularity.sh' is as follows:

cd /mnt/simple-ajax-crud/
python manage.py runserver 0.0.0.0:8101

The app loads, but the app isn't creating relative URLs, so includes are 
referenced under /static (which can't be found b/c it doesn't match the 
proxy/reverse proxy).

If I work around '/static' by adding additional reverse proxies, then I run 
into other URLs in the app with the same problem. So I need to figure out 
how to inform the app to create the correct URLs.


Any help is greatly appreciated.

Thanks, Brian

-- 
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/aa03bc92-07c9-4142-9411-0540eabaa29d%40googlegroups.com.


Re: Staticfiles on S3

2019-09-04 Thread sachinbg sachin
Mention aws key value in setting

On Thu, Sep 5, 2019, 2:06 AM mohammed habib  wrote:

> Did you run python manage.py collectstatic
>
> Are you using static template tags to heed your html link href fields
>
> Sent from my iPhone
>
> On 4 Sep 2019, at 23:06, Elias Coutinho  wrote:
>
> Guys good afternoon,
>
> I managed to put my static folder in s3, the problem is that my effects
> already lost power. lol
>
> The staticfiles folder where the auxiliary applications are installed stop
> working, in my case it was django-material, select2 and others.
>
>
>
> If I comment this code
> 
> that is in the settings of my project it works but does not send anything
> to Amazon s3.
>
>
>
> Any suggestion?
>
> --
> 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/70f224ee-f7a4-468f-9609-db2f8a0be161%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/D42D2706-9340-4450-BC92-35AB0D2C47DB%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/CAOs61rziOACLNEH8jhT95zOcJWX6uomoxSLiQAVuU6eb43rNkQ%40mail.gmail.com.


PLS Help Me in Securing Project - Application on PythonAnyWhere hosted

2019-09-04 Thread Balaji Shetty
Hello Every one

I am new to Django.  I have been working from 4 to 5 months only.
I have deployed the real time Project on PythonAnywhere.
Client is using this now.

My Basic question is

How to Secure our Project. What are the Preventive Steps We must take
before deployment of Project.

Some measures considered here are
I have made DEBUG = False
Secret Key
Hash Password

-- 


*Mr. Shetty Balaji S.Asst. ProfessorDepartment of Information Technology,*
*SGGS Institute of Engineering & Technology, Vishnupuri, Nanded.MH.India*
*Official: bsshe...@sggs.ac.in  *
*  Mobile: +91-9270696267*

-- 
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/CAECSbOudUftPApPoAFDmtANRXP%2BeZ24%3DOcX%2BvQ1SenyTGwm0fQ%40mail.gmail.com.