Re: Random different values on each request

2022-11-19 Thread RANGA BHARATH JINKA
Hi,

You can use random module in python to generate random numbers

Thanks and Regards

J. Ranga Bharath
Cell: 9110334114


On Thu, 17 Nov 2022, 7:51 pm cs.s...@gmail.com,  wrote:

> Hello friends,
> I am trying to get 2 random values on each response using
> order_by('?')[:2], but getting the same response each time.  also tried
> RandomManager() as described here.
> https://stackoverflow.com/questions/962619/how-to-pull-a-random-record-using-djangos-orm
> , but still getting the same response.   (SQL query:  SELECT TOP 2 * FROM
> QuizBank ORDER BY NEWID())
>
> views.py:
> class GetEssayQuestion(APIView):
> def get(self, request):
> data = Quizbank.objects.all().filter(status=1,
> section=5).order_by('?')[:2]
> serializer = QuizbankSerializer(data, many=True)
> return Response(serializer.data)
>
> Appreciate any reference? 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/800a6bc3-9870-47dd-8f41-54f13de108bdn%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/CAK5m317RvY8e3zW-e1hHS5r66grz5KvztWuuwJ0KzvPTODAUKA%40mail.gmail.com.


Re: Template inheritance not working

2022-11-19 Thread Alec Delaney
Hello, would you be available for zoom?


On Fri, Nov 18, 2022 at 10:04 PM Chukwudi Onwusa 
wrote:

> What error is it showing you?
> Please send a picture of it. Remember you can save your base with your
> desired name, but you should also not that you should register your
> templates directory in settings template list as [BASE_DIRS/ "templates"]
> and Incase your template files are in an embedded directory inside your
> templates directory, kindly do well to correct it as
> "embeddedDirectory/baseName.html" and also correct your views for other
> templates references too if need be.
> Thanks.
> Best Regards.
>
> On Fri, Nov 18, 2022, 22:01 David Emanuel Sandoval <
> davidemanuelsando...@gmail.com> wrote:
>
>> The base template contains the default content, and blocks with default
>> contents in it. Then, in the child template, you can override those blocks.
>>
>> El vie, 18 nov 2022 17:54, Alec Delaney <96alecpatr...@gmail.com>
>> escribió:
>>
>>> Hello. How are you? Can I see another example of template inheritance?
>>>
>>> On Mon, Oct 31, 2022 at 2:34 PM Ammar Mohammed 
>>> wrote:
>>>
 Hello dear
 There is a little mistake in your code :
 You should put the {%block block_name %} in your base template with no
 code and the put the code you want to be displayed in your child template
 file
 Here is an example :

 // file.html :

 {% extends "index.html" %}

 {% block content %}
 Hello, this is a test.
 Help me.
 {% endblock %}

 //index.html:
 
 
 
 
 
 Document
 
 
 {% block content %}

 {% endblock %}
 
 


 --
 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/CAFGN%3DGjpkAW6NBXLZ%3DYL7eXy3FXmJ6DqWfNMh%2BikMrp7om361Q%40mail.gmail.com
 
 .


 On Mon, 31 Oct 2022, 8:09 PM Alec Delaney, <96alecpatr...@gmail.com>
 wrote:

> I have been trying to get my templates to work but they have been
> ineffective. here is my code:
> {% extends "index.html" %}
>
> 
> 
> 
> 
> 
> Document
> 
> 
> 
> {% block content %}
>
>
> {% endblock %}
> 
> 
> 
>
> //index.html:
>
> 
> 
> 
> 
> 
> Document
> 
> 
> {% block content %}
> Hello, this is a test.
> Help me.
> {% endblock %}
> 
> 
>
> --
> 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/CAFGN%3DGjpkAW6NBXLZ%3DYL7eXy3FXmJ6DqWfNMh%2BikMrp7om361Q%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/CAHs1H7sS6tndz4j8wiK_Dfpwqnb7sUcrc814Zp3eTndDJ%2B5Ewg%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/CAFGN%3DGitQmZVFG_v1kKOk5s5r53NYCYKEGFZ1Pdi%2Bm%2BiMAFRig%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 disc

Re: Template inheritance not working

2022-11-19 Thread Chukwudi Onwusa
On WhatsApp

On Sat, Nov 19, 2022, 17:14 Alec Delaney <96alecpatr...@gmail.com> wrote:

> Hello, would you be available for zoom?
>
>
> On Fri, Nov 18, 2022 at 10:04 PM Chukwudi Onwusa 
> wrote:
>
>> What error is it showing you?
>> Please send a picture of it. Remember you can save your base with your
>> desired name, but you should also not that you should register your
>> templates directory in settings template list as [BASE_DIRS/ "templates"]
>> and Incase your template files are in an embedded directory inside your
>> templates directory, kindly do well to correct it as
>> "embeddedDirectory/baseName.html" and also correct your views for other
>> templates references too if need be.
>> Thanks.
>> Best Regards.
>>
>> On Fri, Nov 18, 2022, 22:01 David Emanuel Sandoval <
>> davidemanuelsando...@gmail.com> wrote:
>>
>>> The base template contains the default content, and blocks with default
>>> contents in it. Then, in the child template, you can override those blocks.
>>>
>>> El vie, 18 nov 2022 17:54, Alec Delaney <96alecpatr...@gmail.com>
>>> escribió:
>>>
 Hello. How are you? Can I see another example of template inheritance?

 On Mon, Oct 31, 2022 at 2:34 PM Ammar Mohammed 
 wrote:

> Hello dear
> There is a little mistake in your code :
> You should put the {%block block_name %} in your base template with no
> code and the put the code you want to be displayed in your child template
> file
> Here is an example :
>
> // file.html :
>
> {% extends "index.html" %}
>
> {% block content %}
> Hello, this is a test.
> Help me.
> {% endblock %}
>
> //index.html:
> 
> 
> 
> 
> 
> Document
> 
> 
> {% block content %}
>
> {% endblock %}
> 
> 
>
>
> --
> 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/CAFGN%3DGjpkAW6NBXLZ%3DYL7eXy3FXmJ6DqWfNMh%2BikMrp7om361Q%40mail.gmail.com
> 
> .
>
>
> On Mon, 31 Oct 2022, 8:09 PM Alec Delaney, <96alecpatr...@gmail.com>
> wrote:
>
>> I have been trying to get my templates to work but they have been
>> ineffective. here is my code:
>> {% extends "index.html" %}
>>
>> 
>> 
>> 
>> 
>> 
>> Document
>> 
>> 
>> 
>> {% block content %}
>>
>>
>> {% endblock %}
>> 
>> 
>> 
>>
>> //index.html:
>>
>> 
>> 
>> 
>> 
>> 
>> Document
>> 
>> 
>> {% block content %}
>> Hello, this is a test.
>> Help me.
>> {% endblock %}
>> 
>> 
>>
>> --
>> 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/CAFGN%3DGjpkAW6NBXLZ%3DYL7eXy3FXmJ6DqWfNMh%2BikMrp7om361Q%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/CAHs1H7sS6tndz4j8wiK_Dfpwqnb7sUcrc814Zp3eTndDJ%2B5Ewg%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/CAFGN%3DGitQmZVFG_v1kKOk5s5r53NYCYKEGFZ1Pdi%2Bm%2BiMAFRig%40mail.gmail.com
 
 .

>>> --
>>> You received 

Re: Template inheritance not working

2022-11-19 Thread Alec Delaney
Okay, Cause I am looking for another example for template inheritance


On Sat, Nov 19, 2022 at 11:54 AM Chukwudi Onwusa 
wrote:

> On WhatsApp
>
> On Sat, Nov 19, 2022, 17:14 Alec Delaney <96alecpatr...@gmail.com> wrote:
>
>> Hello, would you be available for zoom?
>>
>>
>> On Fri, Nov 18, 2022 at 10:04 PM Chukwudi Onwusa 
>> wrote:
>>
>>> What error is it showing you?
>>> Please send a picture of it. Remember you can save your base with your
>>> desired name, but you should also not that you should register your
>>> templates directory in settings template list as [BASE_DIRS/ "templates"]
>>> and Incase your template files are in an embedded directory inside your
>>> templates directory, kindly do well to correct it as
>>> "embeddedDirectory/baseName.html" and also correct your views for other
>>> templates references too if need be.
>>> Thanks.
>>> Best Regards.
>>>
>>> On Fri, Nov 18, 2022, 22:01 David Emanuel Sandoval <
>>> davidemanuelsando...@gmail.com> wrote:
>>>
 The base template contains the default content, and blocks with default
 contents in it. Then, in the child template, you can override those blocks.

 El vie, 18 nov 2022 17:54, Alec Delaney <96alecpatr...@gmail.com>
 escribió:

> Hello. How are you? Can I see another example of template inheritance?
>
> On Mon, Oct 31, 2022 at 2:34 PM Ammar Mohammed 
> wrote:
>
>> Hello dear
>> There is a little mistake in your code :
>> You should put the {%block block_name %} in your base template with
>> no code and the put the code you want to be displayed in your child
>> template file
>> Here is an example :
>>
>> // file.html :
>>
>> {% extends "index.html" %}
>>
>> {% block content %}
>> Hello, this is a test.
>> Help me.
>> {% endblock %}
>>
>> //index.html:
>> 
>> 
>> 
>> 
>> 
>> Document
>> 
>> 
>> {% block content %}
>>
>> {% endblock %}
>> 
>> 
>>
>>
>> --
>> 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/CAFGN%3DGjpkAW6NBXLZ%3DYL7eXy3FXmJ6DqWfNMh%2BikMrp7om361Q%40mail.gmail.com
>> 
>> .
>>
>>
>> On Mon, 31 Oct 2022, 8:09 PM Alec Delaney, <96alecpatr...@gmail.com>
>> wrote:
>>
>>> I have been trying to get my templates to work but they have been
>>> ineffective. here is my code:
>>> {% extends "index.html" %}
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Document
>>> 
>>> 
>>> 
>>> {% block content %}
>>>
>>>
>>> {% endblock %}
>>> 
>>> 
>>> 
>>>
>>> //index.html:
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Document
>>> 
>>> 
>>> {% block content %}
>>> Hello, this is a test.
>>> Help me.
>>> {% endblock %}
>>> 
>>> 
>>>
>>> --
>>> 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/CAFGN%3DGjpkAW6NBXLZ%3DYL7eXy3FXmJ6DqWfNMh%2BikMrp7om361Q%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/CAHs1H7sS6tndz4j8wiK_Dfpwqnb7sUcrc814Zp3eTndDJ%2B5Ewg%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-use

Re: Template inheritance not working

2022-11-19 Thread Alec Delaney
you dont have zoom?


On Sat, Nov 19, 2022 at 12:09 PM Alec Delaney <96alecpatr...@gmail.com>
wrote:

> Okay, Cause I am looking for another example for template inheritance
>
>
> On Sat, Nov 19, 2022 at 11:54 AM Chukwudi Onwusa 
> wrote:
>
>> On WhatsApp
>>
>> On Sat, Nov 19, 2022, 17:14 Alec Delaney <96alecpatr...@gmail.com> wrote:
>>
>>> Hello, would you be available for zoom?
>>>
>>>
>>> On Fri, Nov 18, 2022 at 10:04 PM Chukwudi Onwusa 
>>> wrote:
>>>
 What error is it showing you?
 Please send a picture of it. Remember you can save your base with your
 desired name, but you should also not that you should register your
 templates directory in settings template list as [BASE_DIRS/ "templates"]
 and Incase your template files are in an embedded directory inside your
 templates directory, kindly do well to correct it as
 "embeddedDirectory/baseName.html" and also correct your views for other
 templates references too if need be.
 Thanks.
 Best Regards.

 On Fri, Nov 18, 2022, 22:01 David Emanuel Sandoval <
 davidemanuelsando...@gmail.com> wrote:

> The base template contains the default content, and blocks with
> default contents in it. Then, in the child template, you can override 
> those
> blocks.
>
> El vie, 18 nov 2022 17:54, Alec Delaney <96alecpatr...@gmail.com>
> escribió:
>
>> Hello. How are you? Can I see another example of template inheritance?
>>
>> On Mon, Oct 31, 2022 at 2:34 PM Ammar Mohammed 
>> wrote:
>>
>>> Hello dear
>>> There is a little mistake in your code :
>>> You should put the {%block block_name %} in your base template with
>>> no code and the put the code you want to be displayed in your child
>>> template file
>>> Here is an example :
>>>
>>> // file.html :
>>>
>>> {% extends "index.html" %}
>>>
>>> {% block content %}
>>> Hello, this is a test.
>>> Help me.
>>> {% endblock %}
>>>
>>> //index.html:
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Document
>>> 
>>> 
>>> {% block content %}
>>>
>>> {% endblock %}
>>> 
>>> 
>>>
>>>
>>> --
>>> 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/CAFGN%3DGjpkAW6NBXLZ%3DYL7eXy3FXmJ6DqWfNMh%2BikMrp7om361Q%40mail.gmail.com
>>> 
>>> .
>>>
>>>
>>> On Mon, 31 Oct 2022, 8:09 PM Alec Delaney, <96alecpatr...@gmail.com>
>>> wrote:
>>>
 I have been trying to get my templates to work but they have been
 ineffective. here is my code:
 {% extends "index.html" %}

 
 
 
 
 
 Document
 
 
 
 {% block content %}


 {% endblock %}
 
 
 

 //index.html:

 
 
 
 
 
 Document
 
 
 {% block content %}
 Hello, this is a test.
 Help me.
 {% endblock %}
 
 

 --
 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/CAFGN%3DGjpkAW6NBXLZ%3DYL7eXy3FXmJ6DqWfNMh%2BikMrp7om361Q%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/CAHs1H7sS6tndz4j8wiK_Dfpwqnb7sUcrc814Zp3eTndDJ%2B5Ewg%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google
>

Re: Template inheritance not working

2022-11-19 Thread subin
Hi

On Sat, Nov 19, 2022 at 5:53 PM Chukwudi Onwusa 
wrote:

> On WhatsApp
>
> On Sat, Nov 19, 2022, 17:14 Alec Delaney <96alecpatr...@gmail.com> wrote:
>
>> Hello, would you be available for zoom?
>>
>>
>> On Fri, Nov 18, 2022 at 10:04 PM Chukwudi Onwusa 
>> wrote:
>>
>>> What error is it showing you?
>>> Please send a picture of it. Remember you can save your base with your
>>> desired name, but you should also not that you should register your
>>> templates directory in settings template list as [BASE_DIRS/ "templates"]
>>> and Incase your template files are in an embedded directory inside your
>>> templates directory, kindly do well to correct it as
>>> "embeddedDirectory/baseName.html" and also correct your views for other
>>> templates references too if need be.
>>> Thanks.
>>> Best Regards.
>>>
>>> On Fri, Nov 18, 2022, 22:01 David Emanuel Sandoval <
>>> davidemanuelsando...@gmail.com> wrote:
>>>
 The base template contains the default content, and blocks with default
 contents in it. Then, in the child template, you can override those blocks.

 El vie, 18 nov 2022 17:54, Alec Delaney <96alecpatr...@gmail.com>
 escribió:

> Hello. How are you? Can I see another example of template inheritance?
>
> On Mon, Oct 31, 2022 at 2:34 PM Ammar Mohammed 
> wrote:
>
>> Hello dear
>> There is a little mistake in your code :
>> You should put the {%block block_name %} in your base template with
>> no code and the put the code you want to be displayed in your child
>> template file
>> Here is an example :
>>
>> // file.html :
>>
>> {% extends "index.html" %}
>>
>> {% block content %}
>> Hello, this is a test.
>> Help me.
>> {% endblock %}
>>
>> //index.html:
>> 
>> 
>> 
>> 
>> 
>> Document
>> 
>> 
>> {% block content %}
>>
>> {% endblock %}
>> 
>> 
>>
>>
>> --
>> 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/CAFGN%3DGjpkAW6NBXLZ%3DYL7eXy3FXmJ6DqWfNMh%2BikMrp7om361Q%40mail.gmail.com
>> 
>> .
>>
>>
>> On Mon, 31 Oct 2022, 8:09 PM Alec Delaney, <96alecpatr...@gmail.com>
>> wrote:
>>
>>> I have been trying to get my templates to work but they have been
>>> ineffective. here is my code:
>>> {% extends "index.html" %}
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Document
>>> 
>>> 
>>> 
>>> {% block content %}
>>>
>>>
>>> {% endblock %}
>>> 
>>> 
>>> 
>>>
>>> //index.html:
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Document
>>> 
>>> 
>>> {% block content %}
>>> Hello, this is a test.
>>> Help me.
>>> {% endblock %}
>>> 
>>> 
>>>
>>> --
>>> 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/CAFGN%3DGjpkAW6NBXLZ%3DYL7eXy3FXmJ6DqWfNMh%2BikMrp7om361Q%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/CAHs1H7sS6tndz4j8wiK_Dfpwqnb7sUcrc814Zp3eTndDJ%2B5Ewg%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/CAFGN%3DGitQmZVFG_v1kKOk5s5r53NYCYKEGFZ1Pdi%2Bm%2BiMAFRig%40mail.g

Re: Template inheritance not working

2022-11-19 Thread subin
Season’s greetings! Our offices will be closed on Dec. 24 and 25. However

On Sat, Nov 19, 2022 at 5:53 PM Chukwudi Onwusa 
wrote:

> On WhatsApp
>
> On Sat, Nov 19, 2022, 17:14 Alec Delaney <96alecpatr...@gmail.com> wrote:
>
>> Hello, would you be available for zoom?
>>
>>
>> On Fri, Nov 18, 2022 at 10:04 PM Chukwudi Onwusa 
>> wrote:
>>
>>> What error is it showing you?
>>> Please send a picture of it. Remember you can save your base with your
>>> desired name, but you should also not that you should register your
>>> templates directory in settings template list as [BASE_DIRS/ "templates"]
>>> and Incase your template files are in an embedded directory inside your
>>> templates directory, kindly do well to correct it as
>>> "embeddedDirectory/baseName.html" and also correct your views for other
>>> templates references too if need be.
>>> Thanks.
>>> Best Regards.
>>>
>>> On Fri, Nov 18, 2022, 22:01 David Emanuel Sandoval <
>>> davidemanuelsando...@gmail.com> wrote:
>>>
 The base template contains the default content, and blocks with default
 contents in it. Then, in the child template, you can override those blocks.

 El vie, 18 nov 2022 17:54, Alec Delaney <96alecpatr...@gmail.com>
 escribió:

> Hello. How are you? Can I see another example of template inheritance?
>
> On Mon, Oct 31, 2022 at 2:34 PM Ammar Mohammed 
> wrote:
>
>> Hello dear
>> There is a little mistake in your code :
>> You should put the {%block block_name %} in your base template with
>> no code and the put the code you want to be displayed in your child
>> template file
>> Here is an example :
>>
>> // file.html :
>>
>> {% extends "index.html" %}
>>
>> {% block content %}
>> Hello, this is a test.
>> Help me.
>> {% endblock %}
>>
>> //index.html:
>> 
>> 
>> 
>> 
>> 
>> Document
>> 
>> 
>> {% block content %}
>>
>> {% endblock %}
>> 
>> 
>>
>>
>> --
>> 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/CAFGN%3DGjpkAW6NBXLZ%3DYL7eXy3FXmJ6DqWfNMh%2BikMrp7om361Q%40mail.gmail.com
>> 
>> .
>>
>>
>> On Mon, 31 Oct 2022, 8:09 PM Alec Delaney, <96alecpatr...@gmail.com>
>> wrote:
>>
>>> I have been trying to get my templates to work but they have been
>>> ineffective. here is my code:
>>> {% extends "index.html" %}
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Document
>>> 
>>> 
>>> 
>>> {% block content %}
>>>
>>>
>>> {% endblock %}
>>> 
>>> 
>>> 
>>>
>>> //index.html:
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Document
>>> 
>>> 
>>> {% block content %}
>>> Hello, this is a test.
>>> Help me.
>>> {% endblock %}
>>> 
>>> 
>>>
>>> --
>>> 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/CAFGN%3DGjpkAW6NBXLZ%3DYL7eXy3FXmJ6DqWfNMh%2BikMrp7om361Q%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/CAHs1H7sS6tndz4j8wiK_Dfpwqnb7sUcrc814Zp3eTndDJ%2B5Ewg%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-u

Re: Template inheritance not working

2022-11-19 Thread subin
I will continue learning more about .

On Sat, Nov 19, 2022 at 5:53 PM Chukwudi Onwusa 
wrote:

> On WhatsApp
>
> On Sat, Nov 19, 2022, 17:14 Alec Delaney <96alecpatr...@gmail.com> wrote:
>
>> Hello, would you be available for zoom?
>>
>>
>> On Fri, Nov 18, 2022 at 10:04 PM Chukwudi Onwusa 
>> wrote:
>>
>>> What error is it showing you?
>>> Please send a picture of it. Remember you can save your base with your
>>> desired name, but you should also not that you should register your
>>> templates directory in settings template list as [BASE_DIRS/ "templates"]
>>> and Incase your template files are in an embedded directory inside your
>>> templates directory, kindly do well to correct it as
>>> "embeddedDirectory/baseName.html" and also correct your views for other
>>> templates references too if need be.
>>> Thanks.
>>> Best Regards.
>>>
>>> On Fri, Nov 18, 2022, 22:01 David Emanuel Sandoval <
>>> davidemanuelsando...@gmail.com> wrote:
>>>
 The base template contains the default content, and blocks with default
 contents in it. Then, in the child template, you can override those blocks.

 El vie, 18 nov 2022 17:54, Alec Delaney <96alecpatr...@gmail.com>
 escribió:

> Hello. How are you? Can I see another example of template inheritance?
>
> On Mon, Oct 31, 2022 at 2:34 PM Ammar Mohammed 
> wrote:
>
>> Hello dear
>> There is a little mistake in your code :
>> You should put the {%block block_name %} in your base template with
>> no code and the put the code you want to be displayed in your child
>> template file
>> Here is an example :
>>
>> // file.html :
>>
>> {% extends "index.html" %}
>>
>> {% block content %}
>> Hello, this is a test.
>> Help me.
>> {% endblock %}
>>
>> //index.html:
>> 
>> 
>> 
>> 
>> 
>> Document
>> 
>> 
>> {% block content %}
>>
>> {% endblock %}
>> 
>> 
>>
>>
>> --
>> 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/CAFGN%3DGjpkAW6NBXLZ%3DYL7eXy3FXmJ6DqWfNMh%2BikMrp7om361Q%40mail.gmail.com
>> 
>> .
>>
>>
>> On Mon, 31 Oct 2022, 8:09 PM Alec Delaney, <96alecpatr...@gmail.com>
>> wrote:
>>
>>> I have been trying to get my templates to work but they have been
>>> ineffective. here is my code:
>>> {% extends "index.html" %}
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Document
>>> 
>>> 
>>> 
>>> {% block content %}
>>>
>>>
>>> {% endblock %}
>>> 
>>> 
>>> 
>>>
>>> //index.html:
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Document
>>> 
>>> 
>>> {% block content %}
>>> Hello, this is a test.
>>> Help me.
>>> {% endblock %}
>>> 
>>> 
>>>
>>> --
>>> 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/CAFGN%3DGjpkAW6NBXLZ%3DYL7eXy3FXmJ6DqWfNMh%2BikMrp7om361Q%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/CAHs1H7sS6tndz4j8wiK_Dfpwqnb7sUcrc814Zp3eTndDJ%2B5Ewg%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/CAFGN%3DGitQmZVFG_v1kKOk5s5r53N

Re: Template inheritance not working

2022-11-19 Thread Chukwudi Onwusa
You can WhatsApp me on 08125409314, screenshot short your error page and
send, together with with inherited template and your parent template.

On Sat, Nov 19, 2022, 18:10 Alec Delaney <96alecpatr...@gmail.com> wrote:

> Okay, Cause I am looking for another example for template inheritance
>
>
> On Sat, Nov 19, 2022 at 11:54 AM Chukwudi Onwusa 
> wrote:
>
>> On WhatsApp
>>
>> On Sat, Nov 19, 2022, 17:14 Alec Delaney <96alecpatr...@gmail.com> wrote:
>>
>>> Hello, would you be available for zoom?
>>>
>>>
>>> On Fri, Nov 18, 2022 at 10:04 PM Chukwudi Onwusa 
>>> wrote:
>>>
 What error is it showing you?
 Please send a picture of it. Remember you can save your base with your
 desired name, but you should also not that you should register your
 templates directory in settings template list as [BASE_DIRS/ "templates"]
 and Incase your template files are in an embedded directory inside your
 templates directory, kindly do well to correct it as
 "embeddedDirectory/baseName.html" and also correct your views for other
 templates references too if need be.
 Thanks.
 Best Regards.

 On Fri, Nov 18, 2022, 22:01 David Emanuel Sandoval <
 davidemanuelsando...@gmail.com> wrote:

> The base template contains the default content, and blocks with
> default contents in it. Then, in the child template, you can override 
> those
> blocks.
>
> El vie, 18 nov 2022 17:54, Alec Delaney <96alecpatr...@gmail.com>
> escribió:
>
>> Hello. How are you? Can I see another example of template inheritance?
>>
>> On Mon, Oct 31, 2022 at 2:34 PM Ammar Mohammed 
>> wrote:
>>
>>> Hello dear
>>> There is a little mistake in your code :
>>> You should put the {%block block_name %} in your base template with
>>> no code and the put the code you want to be displayed in your child
>>> template file
>>> Here is an example :
>>>
>>> // file.html :
>>>
>>> {% extends "index.html" %}
>>>
>>> {% block content %}
>>> Hello, this is a test.
>>> Help me.
>>> {% endblock %}
>>>
>>> //index.html:
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Document
>>> 
>>> 
>>> {% block content %}
>>>
>>> {% endblock %}
>>> 
>>> 
>>>
>>>
>>> --
>>> 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/CAFGN%3DGjpkAW6NBXLZ%3DYL7eXy3FXmJ6DqWfNMh%2BikMrp7om361Q%40mail.gmail.com
>>> 
>>> .
>>>
>>>
>>> On Mon, 31 Oct 2022, 8:09 PM Alec Delaney, <96alecpatr...@gmail.com>
>>> wrote:
>>>
 I have been trying to get my templates to work but they have been
 ineffective. here is my code:
 {% extends "index.html" %}

 
 
 
 
 
 Document
 
 
 
 {% block content %}


 {% endblock %}
 
 
 

 //index.html:

 
 
 
 
 
 Document
 
 
 {% block content %}
 Hello, this is a test.
 Help me.
 {% endblock %}
 
 

 --
 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/CAFGN%3DGjpkAW6NBXLZ%3DYL7eXy3FXmJ6DqWfNMh%2BikMrp7om361Q%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/CAHs1H7sS6tndz4j8wiK_Dfpwqnb7sUcrc814Zp3eTndDJ%2B5Ewg%40mail.gmail.com
>>>