Re: Forbidden (403) - CSRF verification failed. Request aborted.

2022-11-22 Thread Chukwudi Onwusa
Check your template, immediately after the  opening tag add
{% csrf_token %}
If you have it already, kindly check to ensure it's correctly spelt and
placed and then restart your server.
Best Regards.

On Wed, Nov 23, 2022, 00:58 Carlos Roberto  wrote:

> Hi everyone!
>
> I use ngrok to make my projects available in django. I'm having trouble
> accessing the admin page. After I enter the username and password I get the
> error 403.
>
> Has anyone had the same problem and could help me?
>
> Regards
>
>
> --
> 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/de5c4738-f540-4596-b1bf-0b0b16aabbf2n%40googlegroups.com
> 
> .
>


On Nov 23, 2022 00:58, "Carlos Roberto"  wrote:

Hi everyone!

I use ngrok to make my projects available in django. I'm having trouble
accessing the admin page. After I enter the username and password I get the
error 403.

Has anyone had the same problem and could help me?

Regards



-- 
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/de5c4738-f540-4596-b1bf-0b0b16aabbf2n%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/CAGoV8nm8QO1LKP4x7%2Bm%3DuM%3DMzdTryt-DYQOw%2BsdJREnm18c1gQ%40mail.gmail.com.


Re: i got error 'type' object is not subscriptable

2022-11-21 Thread Chukwudi Onwusa
Use Win Key + prt SC
To screenshot of you are using windows 10 OS

On Mon, Nov 21, 2022, 14:55 Chukwudi Onwusa  wrote:

> Your screenshots are not clear enough.
>
> On Thu, Nov 17, 2022, 15:21 Sagar Singh  wrote:
>
>> i created three model relation table
>>
>> onetoone()
>> manytoone(foreignkey)
>> manytomanyfield()
>>
>> i try to show data of manytpmany field on admin panel but they give error
>>
>> 'type' object is not subscriptable
>>
>> --
>> 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/5054dcaa-d896-487c-8dee-177d281049cen%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/5054dcaa-d896-487c-8dee-177d281049cen%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/CAGoV8nk6wL2b0Z5gtN%3DG4yf4G6xbW2_L-htPKaxeaP27zSLt5w%40mail.gmail.com.


Re: i got error 'type' object is not subscriptable

2022-11-21 Thread Chukwudi Onwusa
Your screenshots are not clear enough.

On Thu, Nov 17, 2022, 15:21 Sagar Singh  wrote:

> i created three model relation table
>
> onetoone()
> manytoone(foreignkey)
> manytomanyfield()
>
> i try to show data of manytpmany field on admin panel but they give error
>
> 'type' object is not subscriptable
>
> --
> 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/5054dcaa-d896-487c-8dee-177d281049cen%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/CAGoV8nnARB84wQ4YX62T4C4H4%3DwtwKDHWQrL4HVx9qNgyodpVA%40mail.gmail.com.


Re: Public and Private Chat Room Creation with Django Python Framework

2022-11-21 Thread Chukwudi Onwusa
Thanks man.

On Mon, Nov 21, 2022, 00:50 Lakshyaraj Dash 
wrote:

> class Room(models.Model):
>...
>is_private = models.BooleanField(default=False)
>
> In views.py
> def chat_room(request):
> if room.is_private:
>return redirect ("/")
> else:
>...
>
> On Mon, Nov 21, 2022, 04:03 Chukwudi Onwusa  wrote:
>
>> Please can you help me with a sample.
>> Please.
>>
>> On Sun, Nov 20, 2022, 15:53 Lakshyaraj Dash 
>> wrote:
>>
>>> Provide is_private to the rooms model of your app.
>>> If you make the default as true, then the room is private by default and
>>> vice versa
>>>
>>> On Sun, Nov 20, 2022, 20:21 Chukwudi Onwusa 
>>> wrote:
>>>
>>>> Greetings and good tidings!
>>>> Please how do I create with django the above mail subject(private and
>>>> public chat room).
>>>> I need help and references to work on.
>>>> 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/CAGoV8nnwKZa%3DSYCfbcOX-n-3GRSOGTNgQKgz2%3DqF%2BMEddHGFig%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAGoV8nnwKZa%3DSYCfbcOX-n-3GRSOGTNgQKgz2%3DqF%2BMEddHGFig%40mail.gmail.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> --
>>> 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/CAF7qQgARiTfseCC3uu8iNJ7cAMDqo6joFmAwoO0KJCYAjL36QQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAF7qQgARiTfseCC3uu8iNJ7cAMDqo6joFmAwoO0KJCYAjL36QQ%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> 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/CAGoV8n%3D7TrvjqCr_xuN2gojmMRntS4eUmxnzhuDQAY%3DYpeoSng%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAGoV8n%3D7TrvjqCr_xuN2gojmMRntS4eUmxnzhuDQAY%3DYpeoSng%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/CAF7qQgDgX8ampbdvgx5apQ4RUxD9OuCbHjr%3D09vownBpPCFu7Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAF7qQgDgX8ampbdvgx5apQ4RUxD9OuCbHjr%3D09vownBpPCFu7Q%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAGoV8n%3D2WqneBR%2BaCJiU%2Bo2xgpVh%3DHp6%2B2-5h1QVPnqUODVp-Q%40mail.gmail.com.


Re: Public and Private Chat Room Creation with Django Python Framework

2022-11-20 Thread Chukwudi Onwusa
Please can you help me with a sample.
Please.

On Sun, Nov 20, 2022, 15:53 Lakshyaraj Dash 
wrote:

> Provide is_private to the rooms model of your app.
> If you make the default as true, then the room is private by default and
> vice versa
>
> On Sun, Nov 20, 2022, 20:21 Chukwudi Onwusa  wrote:
>
>> Greetings and good tidings!
>> Please how do I create with django the above mail subject(private and
>> public chat room).
>> I need help and references to work on.
>> 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/CAGoV8nnwKZa%3DSYCfbcOX-n-3GRSOGTNgQKgz2%3DqF%2BMEddHGFig%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAGoV8nnwKZa%3DSYCfbcOX-n-3GRSOGTNgQKgz2%3DqF%2BMEddHGFig%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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/CAF7qQgARiTfseCC3uu8iNJ7cAMDqo6joFmAwoO0KJCYAjL36QQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAF7qQgARiTfseCC3uu8iNJ7cAMDqo6joFmAwoO0KJCYAjL36QQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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/CAGoV8n%3D7TrvjqCr_xuN2gojmMRntS4eUmxnzhuDQAY%3DYpeoSng%40mail.gmail.com.


Public and Private Chat Room Creation with Django Python Framework

2022-11-20 Thread Chukwudi Onwusa
Greetings and good tidings!
Please how do I create with django the above mail subject(private and
public chat room).
I need help and references to work on.
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/CAGoV8nnwKZa%3DSYCfbcOX-n-3GRSOGTNgQKgz2%3DqF%2BMEddHGFig%40mail.gmail.com.


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
>>>>>>> <https://groups.google.com/d/msgid/django-users/CAFGN%3DGjpkAW6NBXLZ%3DYL7eXy3FXmJ6DqWfNMh%2BikMrp7om361Q%40mail.gmail.com?utm_medium=email_source=footer>
>>>>>>> .
>>>>>>>
>>>>>>>
>>>>>>> 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" %}
>>>>>>>>
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>

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
>>>>> <https://groups.google.com/d/msgid/django-users/CAFGN%3DGjpkAW6NBXLZ%3DYL7eXy3FXmJ6DqWfNMh%2BikMrp7om361Q%40mail.gmail.com?utm_medium=email_source=footer>
>>>>> .
>>>>>
>>>>>
>>>>> 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&qu

Re: Template inheritance not working

2022-11-18 Thread Chukwudi Onwusa
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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHUWMCY_ftGaikC3Sie91CZmdm4Rbs%3DfQrHDPftGqju-PmxPCA%40mail.gmail.com
> 

Re: writing most common queries as model class method!

2022-11-12 Thread Chukwudi Onwusa
Write that method in your views, and return
render(request,'templateName.html', optional) and go to your templates
 and call your desired or important attribute with the instance of the
class using Django template tag
{{class_instanceInMethodInsideView.modelsAtrributeName}} as many attribute
as you desire.

Regards

On Fri, Nov 11, 2022, 19:38 Amir Jamshidi 
wrote:

> Hi,
> I tried to write a classmothods/ instance method in a Model in order to
> run most common query from the model but got errors like below :
>
> ""AttributeError: Manager isn't accessible via ... instances""
>
> example code:
>
> class Profile(model.Model):
> name = model.Charfield(...)
> address = model.Charfield(...)
> 
>
> @classmethod
>  def count_of_users(cls):
>return cls.objects.all()  #example query
>
>  def all_users(self):
>   return self.objects
>
>
> *My purpose is to have most common and important queries in a method to be
> called within application. (Its a good way for documenting most common
> queries as well).What is the best practice for this case?*
>
>
> --
> 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/e58df10a-e5c0-40e8-8e0d-5439c04281d8n%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/CAGoV8n%3DjAsjwKDt3DwczWrpD02SE8mWa7nxrhf0ng5_0yLeOGg%40mail.gmail.com.


Re: Page Integration

2022-11-10 Thread Chukwudi Onwusa
If you are using function based view in your views.py . After you must have
equated the input values through the name attribute to the instance of the
class in your model, then instance.save() before you redirect.
This should be done in the views.py not models.

On Thu, Nov 10, 2022, 20:07 Pooja Kumari  wrote:

> Where I have to use save() method? In models or somewhere else?
>
> On Thu, Nov 10, 2022, 9:19 PM Lakshyaraj Dash <
> dashlakshyaraj2...@gmail.com> wrote:
>
>> Please see that if you're calling the .save() method or not
>>
>> On Thu, Nov 10, 2022, 21:02 Pooja Kumari  wrote:
>>
>>> Hi.. Can anyone help me with django templates? Actually I have a
>>> registration page where user can signup and data will be saved in admin
>>> panel or database but I am not able to do that. Registration page is
>>> working when I hit URL but data is not saving in database. Let me know If
>>> anyone have idea about this type of project. I'll be very grateful for your
>>> help.
>>>
>>> --
>>> 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/CAHYvwbWDVFjuddPah3WUX8M9H6ojvDSjQD_mn7W6AgcT_pQsGQ%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/CAF7qQgBrQoWDSpStS9quQ1jSWxpAD9s7kJqHgFCgiCnEMtd%2BfQ%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/CAHYvwbUCfTxMRgaxfgGK_yOwth7VAHr35hNK8JgnhDGNVsq%2BTQ%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/CAGoV8n%3DXZ02ScGLztCWTgceLxhQc%2BB7H5um7TxFbJiavE4tNxA%40mail.gmail.com.


Re: STATIC FILE

2022-11-09 Thread Chukwudi Onwusa
I think you should make your work more organized, iff I truly understand
you, by putting your static directory inside your working directory.

On Thu, Nov 10, 2022, 04:25 Mh Raffi  wrote:

> Media url in settings I have.
>
> On Thu, Nov 10, 2022, 8:50 AM ritik sahoo  wrote:
>
>> You must import media url
>>
>> On Wed, 9 Nov, 2022, 8:58 pm Mh Raffi,  wrote:
>>
>>> Hi,
>>> I run cmd to collect static files but files are stored in c:\ but not in
>>> the actual project folder.
>>> My project folder is on the desktop.
>>> while running the command am into that root folder of the project.
>>> and i have images that are also not stored. I have an app in railway
>>> host and debug in a false  mode.
>>> I tried the option of white noise and it was still the same.
>>> Can anyone let me know where I am missing?
>>>
>>>
>>> Thanks & Regards
>>> Mohammed Raffi.J
>>>
>>>
>>> --
>>> 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/CAKfPRhVnz55d%2B%3Dw2N5Q2pJwj96ksnOWFO0njWPExGwNrzA6mMA%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/CAJwehCvguwsmDq9C9ohWWSmt%2BrORyT03ZSKhGStj1h9e8aLzDg%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/CAKfPRhV6POFbXFhiK%2BvyyZguAyk5WEw4LGt506V2kV2MWg8EYg%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/CAGoV8n%3DjC5r%2BRo-9ma7OXBczg0792dp%2BW-B-NFQLR4UWHWw%2BXg%40mail.gmail.com.


Re: You are seeing this page because DEBUG=True is in your settings file and you have not configured any URLs.

2022-11-09 Thread Chukwudi Onwusa
Please What exactly is the name of your error?
Is it showing 'page not found' ?
If so, then kindly apply the urls to your localhost:8000/urls_name
Regards...

On Wed, Nov 9, 2022, 18:26 'Kasper Laudrup' via Django users <
django-users@googlegroups.com> wrote:

> On 09/11/2022 10.52, Priyanka Sivaratri wrote:
> > Hi,
> > I am new to django and I appreciate your quick help. I am able to run
> > django server on localhost:8000 but I am seeing this error :
> > *You are seeing this page because DEBUG=True is in your settings file
> > and you have not configured any URLs.*
>
> The error message tells you exactly what is wrong. If you don't
> understand it I highly suggest you follow the official Django tutorial
> before going any further:
>
> https://docs.djangoproject.com/en/4.1/intro/
>
> After that it should be much clearer what is wrong with your URL
> configuration.
>
> Kind regards,
> Kasper Laudrup
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/84b0068d-2441-ad9f-aa6e-dfea764b51fa%40stacktrace.dk
> .
>

-- 
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/CAGoV8nk43zs%3D%3Dn7RX_c3vUb24-zQUOX-fUhz3qJ0qtU1c%3D0mEQ%40mail.gmail.com.


Image Fetching

2022-10-23 Thread Chukwudi Onwusa
I am only being able to fetch image registered only through the admin on
browser user interface. But the one I registered on browser user interface,
whenever I try fetching it through the user interface, it only shows image
icon, but if I upon the image in the admin interface it shows me error like
the one below.
But the one registered through the admin interface has no error, I have
done all the do-ables , but yet no positive results

-- 
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/CAGoV8nmhGrgGh44z6kUHDHrLo7xRfct%2Bzr07kYb0mmFHLkVuGA%40mail.gmail.com.


Image Fetching

2022-10-23 Thread Chukwudi Onwusa
I am only being able to fetch image registered only through the admin on
browser user interface. But the one I registered on browser user interface,
whenever I try fetching it through the user interface, it only shows image
icon, but if I upon the image in the admin interface it shows me error like
the one below.
But the one registered through the admin interface has no error, I have
done all the do-ables , but yet no positive results

-- 
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/CAGoV8n%3DvD0pT2LTBvRcyJZSt-zaMeNg8EKFSR7ThaRBYyh_nUA%40mail.gmail.com.


CRUD Operation

2022-10-23 Thread Chukwudi Onwusa
Please, what can I do to retrieve my already entered date and select option
during my process of editing details on browser user interface not admin, I
used value= instance of the class.  Date variable name, but it not working

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


Re: PLEASE HELP ME KNOW HOW TO ARRANGE INSTALLED APPS.

2022-10-18 Thread Chukwudi Onwusa
Lets take App Directory name tiles.
So inthe installed app list it will be

'tiles.apps.TilesConfig',
Or put simply
'tiles',
Hope it helps .


On Tue, Oct 18, 2022, 06:16 regan opere  wrote:

> Hello, I am new to django and I am still learning.
> I have created two apps core and store and I have registered them in the
> settings file of my root directory.
>  This is the error I get:
> django.core.exceptions.ImproperlyConfigured: Application labels aren't
> unique, duplicates: apps
>
> my settings look like this
> INSTALLED_APPS = [
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
>
> 'apps.core.apps',
>
> 'apps.store.apps',
>
>
> and their individual apps.py look like this:
>
> class CoreConfig(AppConfig):
> default_auto_field = 'django.db.models.BigAutoField'
> name = 'core'
>
>
> and
>
> class StoreConfig(AppConfig):
> default_auto_field = 'django.db.models.BigAutoField'
> name = 'store'
>
>
>
> without the second app 'store" the server runs just fine
>
> --
> 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/fab8949f-1012-4fad-8259-b63c67195f69n%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/CAGoV8nnQ7giNodE94_Rma_asWGR2-%3DEVzjcH99zaAEx2_VCPnQ%40mail.gmail.com.


Re: error extending base template

2022-10-11 Thread Chukwudi Onwusa
Give space in the html template tag
I mean {% extends 'base.html' %}
But if the base is nested inside a directory inside the template directory
pls name the '../base.html' according.
Thanks
Hope it will be help.

On Mon, Oct 10, 2022, 16:11 Namanya Daniel 
wrote:

> hello, someone help me out. am new to django and i face an issue with
> templates extending base.html
>
> i have created a base.html template which is basically a skeleton for
> other templates, they are all in templates/another directory but when i use
> {%extends 'base.html'%}  I get this error... thanks in advance
>
>
> Request Method:
> GET
> Request URL:
> http://127.0.0.1:8000/
> Django Version:
> 4.1.2
> Exception Type:
> TemplateDoesNotExist
> Exception Value:
> base.html
>
> --
> 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/b46cebb4-fca2-49b8-a836-309a2c4a4024n%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/CAGoV8n%3DxS3Zm_NmK7L8TqGg-vwX_5VAN%2BMxSwpM05TNK3Kc4rg%40mail.gmail.com.