error extending base template

2022-10-10 Thread Namanya Daniel
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.


Re: NEW BIE HERE HOW CAN I LEARN DJANGO FAST

2022-12-25 Thread Namanya Daniel
While learning Django, pay attention to URLs and settings and models, the 
rest you need basic python skills 

On Sunday, December 25, 2022 at 2:14:06 AM UTC+3 guru...@gmail.com wrote:

> Hey, I just want to know how you've learned django framework and what 
> resources did you use. It would be great if anyone can suggest me some 
> studying resources.
> Thank you.
>

-- 
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/1dd19704-2e56-47b9-815a-6d76b0e9adfen%40googlegroups.com.


Re: If Statement django template

2023-01-12 Thread Namanya Daniel
Replace supplier with related_name

On Thu, 12 Jan 2023 at 16:13, 'dtdave' via Django users <
django-users@googlegroups.com> wrote:

> I have the following relationship in a model
>
> class Contract(models.Model):
> supplier = models.ForeignKey(
> Supplier,
> on_delete=models.CASCADE,
> verbose_name="Supplier Name",
> related_name="contract_suppliers",
> )
>
> I am trying to include an if statement in my template but the following
> does not work:
> {% if contract.supplier == 'IBM' %}
>
> If I replace this with a non-foreign key item then it works fine.
>
> Any help would be appreciated.
>
>
>
> --
> 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/4343a170-b193-4c91-aac4-8d773404353dn%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/CAP4VW2V7HfijNHaCX5G_6ACmkQwLvHVXK%2BfgVdMEjTUOF8jYKA%40mail.gmail.com.


Serving Media and Static files on Shared Hosting

2023-01-13 Thread Namanya Daniel
Hello members, 

Has anyone ever used Namecheap shared hosting to serve static and media 
files? Apparently nginx can't be used, i only have WhiteNoise which serves 
static files only.

kindly  share you've done it before.. thanks in advance

-- 
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/44a6e29d-65f1-443f-94d4-c9d119abbf77n%40googlegroups.com.


Re: Serving Media and Static files on Shared Hosting

2023-01-13 Thread Namanya Daniel
Have you done it before? You can share knowledge

On Fri, 13 Jan 2023 at 15:25, Jeff Kingsley 
wrote:

> Why
>
> On Fri, Jan 13, 2023 at 11:56 AM Namanya Daniel 
> wrote:
>
>> Hello members,
>>
>> Has anyone ever used Namecheap shared hosting to serve static and media
>> files? Apparently nginx can't be used, i only have WhiteNoise which serves
>> static files only.
>>
>> kindly  share you've done it before.. thanks in advance
>>
>> --
>> 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/44a6e29d-65f1-443f-94d4-c9d119abbf77n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/44a6e29d-65f1-443f-94d4-c9d119abbf77n%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/CAA9WjmFd%3DC-eOv%3DeKw5%3DKg7JMCPLiFs%3DwNv0zU07_vDMw59woQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAA9WjmFd%3DC-eOv%3DeKw5%3DKg7JMCPLiFs%3DwNv0zU07_vDMw59woQ%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/CAP4VW2V%2BWjeyakDn%2BSrpywpJ7BnQi5WwWVwfHQ32_dyEsM9qhA%40mail.gmail.com.


thena.thenadaka.com

2023-01-19 Thread Namanya Daniel
Hello esteemed members,

I hope all is well. I am reaching out to you today to invite you to check 
out thena.thenadaka.com and give me your honest opinions and guidance. 

Is it a good idea for portifolio building, i believe this is important to 
know most especially to us looking for jobs.. 

Thanks in advance

-- 
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/73b703d8-79ca-4277-b735-bc1aa3afbff5n%40googlegroups.com.


Re: configuration

2023-01-19 Thread Namanya Daniel
Profile, shipments and species are models? Or your stored data in one model

On Thu, 19 Jan 2023 at 01:56, frank dilorenzo  wrote:

> I cannot seem to resolve this configuration correctly.
>
> I have a list of suppliers.
> A supplier can have one profile
> A supplier can have many shipments.
> A shipment can have many species
>
> I have tried several ways and I always end up with some kind of circular
> problem.
> Any thoughts are appreciated.
>
> --
> 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/60f10b20-ddff-46b6-ac89-63756a192831n%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/CAP4VW2UEDkToWe%2BSGLM9ta5UVi39xKG_Nv6roP3EM5EzFveiRg%40mail.gmail.com.


Re: Please i need help in creating a Login page with Django

2023-01-19 Thread Namanya Daniel
Explain where you’re failing exactly, is it views, forms, templates or
models

On Thu, 19 Jan 2023 at 01:56, Michael R. KOOMSON 
wrote:

> I am trying everything possible to create a basic login page with Django.,
> i have tried so many videos and online tutorial, but still can't make
> anything meaningful out of it. Can anyone please take me through a
> systematic process please, since i am new here and want to take Django to
> be my friend
>
> --
> 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/0c495fc8-ce4e-4d6f-a2d7-7b2d8478b06an%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/CAP4VW2V%3DuVe2p%3DCQJBWup%3DDcn4FGs5dLFp-zGEqXLQK6xwD6VQ%40mail.gmail.com.


Re: Custom user model password is not hashed

2023-01-26 Thread Namanya Daniel
Did you try make_password before saving data from registration form ?

On Wed, 25 Jan 2023 at 18:36, Roger Mukai  wrote:

> @Tejas or @Sebs, do you still have a question how to do this? I think I
> figured it out
>
> On Tuesday, December 6, 2022 at 7:25:08 PM UTC-5 sebs...@gmail.com wrote:
>
>> Hey *Ben*, please help with the repo for the same code. I'm getting same 
>> error
>> here.
>>
>> On Saturday, 7 May 2022 at 22:37:32 UTC Tejas Agrawal wrote:
>>
>>> Hey Benjamin, can you please share your github repo for the same code.
>>> I'm also getting the same error in one of my project, can't figure out how
>>> to solve it.
>>>
>>> On Friday, November 13, 2015 at 6:11:09 PM UTC+5:30
>>> benjamin...@gmail.com wrote:
>>>
 The problem was, when creating a custom user, one has to define a
 custom model form and model admin that handles the password properly. After
 that it was solved.

 Thank you.

 On Thu, Nov 12, 2015 at 9:25 PM, Andreas Kuhne 
 wrote:

> Try to debug and check what your password value is after the
> set_password() statement.  Also have you checked the database after trying
> to create a user with the new method? It should be hashed in the database.
> This is stuff that should "just work" in django (it's regulated by the
> AbstractBaseUser and is the same that I am using in a project).
>
> You did restart the django shell after changing the code?
>
> 2015-11-12 16:44 GMT+01:00 Benjamin Smith :
>
>> I have changed user.set_password(self.cleaned_data["password"]) to 
>> user.set_password(password).
>> But I am getting the same result.
>>
>> On Thu, Nov 12, 2015 at 8:57 PM, Andreas Kuhne <
>> andrea...@suitopia.com> wrote:
>>
>>> As aRkadeFR says, you seam to have mixed code there
>>>
>>> The row:
>>> user.set_password(self.cleaned_data["password"])
>>>
>>> is taken from a form somewhere and won't work. It should instead be
>>> :
>>> user.set_password(password)
>>>
>>> I suppose the password is going through to the create method via the
>>> kwargs argument at the end of you create method. But if you change like 
>>> I
>>> said, everything should work.
>>>
>>>
>>> Med vänliga hälsningar,
>>>
>>> Andréas Kühne
>>> Software Development Manager
>>> Suitopia Scandinavia AB
>>>
>>> 2015-11-12 16:20 GMT+01:00 aRkadeFR :
>>>
 Hello,

 I don't quite get the code in your method: '
 MyUserManager.create_user':
 user.set_password(self.cleaned_data["password"])

 You're in your Manager method but call self.cleaned_data ?

 You can set a breakpoint inside your method with pdb to see
 what's going on with your fields?


 On 11/12/2015 04:11 PM, Benjamin Smith wrote:

 I have my own custom User model, and its own Manger too.

 Models:

 class MyUser(AbstractBaseUser, PermissionsMixin):
 email = models.EmailField(max_length=255, unique=True)
 first_name = models.CharField(max_length=35)
 last_name = models.CharField(max_length=35)
 username = models.CharField(max_length=70, unique=True)
 date_of_birth = models.DateField()
 is_active = models.BooleanField(default=True)
 is_admin = models.BooleanField(default=False)

 @property
 def is_staff(self):
 return self.is_admin

 def get_full_name(self):
 return ('%s %s') % (self.first_name, self.last_name)

 def get_short_name(self):
 return self.username

 objects = MyUserManager()
 USERNAME_FIELD = 'email'
 REQUIRED_FIELDS = ['first_name', 'last_name', 'username',
 'date_of_birth']


 Manager:

 class MyUserManager(BaseUserManager):
 def create_user(self, email, first_name, last_name, username,
 date_of_birth, password=None, **kwargs):
 if not email:
 raise ValueError('User must have an email address')

 user = self.model(
 email=self.normalize_email(email),
 first_name=first_name,
 last_name=last_name,
 username=username,
 date_of_birth=date_of_birth,
 **kwargs
 )
 user.set_password(self.cleaned_data["password"])
 user.save(using=self._db)
 return user

 def create_superuser(self, email, first_name, last_name,
 username, date_of_birth, password, **kwargs):
 user = self.create_user(
 email,
   

Re: Reply: Re: Hosting django with Namecheap

2022-11-08 Thread Namanya Daniel
Thanks Jeff, 

i re-uploaded the website and it worked but now i have an issue with static 
files.

i've static_url= *"/static/"*
static_root ="*/home/username/url/static*"
i ran* collectstatic *

in my *templates*,

i * loaded static*

and set *src = folder/image.jpg*

and these images are there in that folder... what could be the issue

On Tuesday, November 8, 2022 at 11:34:18 AM UTC-8 jeffkin...@gmail.com 
wrote:

> Do you have root access oba you are just using cpanel. I do think you will 
> be able to succeed with cpanel, you need VSP.
>
> On Tue, Nov 8, 2022 at 3:58 PM bradie poa  wrote:
>
>> its not a good idea
>>
>> i have settings.py in the same folder with wsgi.py
>>
>>
>> On Tuesday, November 8, 2022 at 4:07:09 AM UTC-8 Kasper Laudrup wrote:
>>
>>> On 08/11/2022 10.41, Namanya Daniel wrote: 
>>> > Hello, am hosting a django application with namecheap for the very 
>>> first 
>>> > time and am getting " Internal Server ErrorError 500" , in the error 
>>> > log, wsgi.py shows that there's not settings 
>>> > 
>>> > how do i handle this 
>>> > 
>>>
>>> You add the settings. 
>>>
>>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/9f4bfc65-8319-4c19-85b2-7ac7ff1d7ff9n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/9f4bfc65-8319-4c19-85b2-7ac7ff1d7ff9n%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...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/03931t9smoccio3p86jn4id8.1667912304054%40email.vivo.com
>>  
>> <https://groups.google.com/d/msgid/django-users/03931t9smoccio3p86jn4id8.1667912304054%40email.vivo.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/e867ff52-2a67-4d4e-8147-a4d2a15f1952n%40googlegroups.com.


Hosting django with Namecheap

2022-11-08 Thread Namanya Daniel
Hello, am hosting a django application with namecheap for the very first 
time and am getting " Internal Server ErrorError 500" , in the error log, 
wsgi.py shows that there's not settings

how do i handle this

-- 
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/28c46b62-8abb-4e46-8492-c4007f26dbe1n%40googlegroups.com.


Re: Hosting django with Namecheap

2022-11-08 Thread Namanya Daniel
i have settings.py in the same folder with wsgi.py


On Tuesday, November 8, 2022 at 4:07:09 AM UTC-8 Kasper Laudrup wrote:

> On 08/11/2022 10.41, Namanya Daniel wrote:
> > Hello, am hosting a django application with namecheap for the very first 
> > time and am getting " Internal Server ErrorError 500" , in the error 
> > log, wsgi.py shows that there's not settings
> > 
> > how do i handle this
> >
>
> You add the settings.
>
> 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/9f4bfc65-8319-4c19-85b2-7ac7ff1d7ff9n%40googlegroups.com.


Re: Reply: Re: Hosting django with Namecheap

2022-11-08 Thread Namanya Daniel
[image: Capture 1.PNG]

On Tuesday, November 8, 2022 at 5:10:20 AM UTC-8 Kasper Laudrup wrote:

> On 08/11/2022 13.58, bradie poa wrote:
> > its not a good idea
> > 
>
> Agreed. It's a horrible idea.
>
> 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/ee352400-ddc8-4228-a7c3-d8b37c2591efn%40googlegroups.com.


Re: Need help with Authenticating and Authorizing

2023-03-10 Thread Namanya Daniel
how have you saved your password in registration?

On Fri, 10 Mar 2023 at 18:02, linda jean-philippe <
jeanphilippe.li...@gmail.com> wrote:

> I do not know what I am missing. My login page and register page have
> rendered, but when I try to sign up with new credentials, it does not save.
> And on the Django Admin page, it says invalid password and username with
> each attempt.
>
> --
> 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/b9c56cc4-6ab6-4f2b-81f0-48e256ff3685n%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/CAP4VW2X_K03C1ZoZZoCVfCbRBia5SX6OqsPygMixPReHWXe75Q%40mail.gmail.com.


Re: sub-list not showing

2023-03-16 Thread Namanya Daniel
You need to achieve related fields to achieve the most of this… thank you

On Thu, 16 Mar 2023 at 23:59, Namanya Daniel 
wrote:

> Hello… am using a phone to reply this but I would love to give a hint on
> something. When you have a child, it’s means there’s a parent foreign key
> in the child model. You can use grouper to group child model results so
> that every is grouped together under a particular parent field.
>
> On Thu, 16 Mar 2023 at 21:22, nef  wrote:
>
>> Hi all,
>> I am facing problem to display a sub-list.
>> In my model, I ahave a Student and Parent models. A prent can have one or
>> more students.
>> I want to list all the student in the parent page, but it is not showing.
>> Please see here my code.
>> Models
>>
>> class Student(models.Model):
>> #std_matricule = models.CharField(verbose_name='Student matricule',
>> max_length=6, null=False, unique=True, primary_key=True)
>> std_matricule = models.CharField(verbose_name='Matricule', unique=
>> True, max_length=16, null=False, blank=False, help_text='Matricule of
>> the student')
>> std_parents = models.ForeignKey(Parents, on_delete=models.DO_NOTHING,
>> related_name='Parents', unique=False, null=True, blank=True, verbose_name
>> ='Student parents')
>> std_email = models.EmailField(verbose_name='Email', null=False, blank
>> =True, help_text='Enter the email of the student or leave blank if not
>> exist')
>> std_password = models.CharField(verbose_name='Password', max_length=
>> 512, null=False, blank=True, help_text='Type the password with 6
>> characters minimum')
>> std_surname = models.CharField(verbose_name='Surname', null=False,
>> blank=False, max_length=128, help_text='Type the Surname of the student
>> as in the birth certificate')
>> std_firstname = models.CharField(verbose_name='First name', null=
>> False, blank=True, max_length=128, help_text='Type the student first
>> name')
>> std_midlename = models.CharField(verbose_name='Midle name', null=
>> False, blank=True, max_length=128, help_text='Type the student first
>> name')
>> std_nickname = models.CharField(verbose_name='Student Nickname',
>> max_length=64, null=False, blank=True, help_text='If exist, type student
>> nickname here')
>>
>> lass Parents(models.Model):
>> father_surname = models.CharField(verbose_name='Father surname',
>> max_length=128, null=False, blank=True, help_text='Student Father
>> surname as in the birth certificate')
>> father_firstName = models.CharField(verbose_name='Father name',
>> max_length=128, null=False, blank=True)
>> father_phone = models.CharField(verbose_name='Father phone number',
>> max_length=24, null=False, blank=True, help_text='Phone number of the
>> Father')
>> father_dateOfBirth = models.DateField(verbose_name='Father date of
>> birth', null=True, blank=True)
>> father_placeOfBirth = models.CharField(verbose_name='Father place of
>> birth', max_length=512, null=True, blank=True)
>> father_nationality = models.CharField('Father nationality',
>> max_length=256, null=False, blank=True)
>> father_adress = models.CharField(verbose_name='Father resident
>> adress', max_length=512, null=False, blank=True)
>> father_occupation = models.CharField(verbose_name='Father occupation',
>> max_length=512, null=False, blank=True)
>> mother_surname = models.CharField(verbose_name='Mother surname', null
>> =False, max_length=128, help_text='Student Father name as in the birth
>> certificate')
>> mother_firstName = models.CharField(verbose_name='Mother name',
>> max_length=128, null=False, blank=True)
>> mother_phone = models.CharField(verbose_name='Mother phone number',
>> max_length=64, null=False, blank=True, help_text='Phone number of the
>> mother')
>> mother_dateOfBirth = models.DateField(verbose_name='Mother date of
>> birth', null=True, blank=True)
>> mother_placeOfBirth = models.CharField(verbose_name='Mother place of
>> birth', max_length=512, null=False, blank=True)
>> mother_nationality = models.CharField('Mother nationality',
>> max_length=512, null=False, blank=True)
>> mother_adress = models.CharField(verbose_name='Mother resident
>> adress', max_length=512, null=False, blank=True)
>> mother_occupation = models.CharField(verbose_name='Mother occupation',
>> max_length=512, null=False, blank=True)
>>
>>
>> View
>> def parentsDetails(request, pk):
>> parentObj = Parents.objects.get(parent_id=pk)
>> context = {'parentObj': parentObj}
>> 

Re: sub-list not showing

2023-03-16 Thread Namanya Daniel
Hello… am using a phone to reply this but I would love to give a hint on
something. When you have a child, it’s means there’s a parent foreign key
in the child model. You can use grouper to group child model results so
that every is grouped together under a particular parent field.

On Thu, 16 Mar 2023 at 21:22, nef  wrote:

> Hi all,
> I am facing problem to display a sub-list.
> In my model, I ahave a Student and Parent models. A prent can have one or
> more students.
> I want to list all the student in the parent page, but it is not showing.
> Please see here my code.
> Models
>
> class Student(models.Model):
> #std_matricule = models.CharField(verbose_name='Student matricule',
> max_length=6, null=False, unique=True, primary_key=True)
> std_matricule = models.CharField(verbose_name='Matricule', unique=True,
> max_length=16, null=False, blank=False, help_text='Matricule of the
> student')
> std_parents = models.ForeignKey(Parents, on_delete=models.DO_NOTHING,
> related_name='Parents', unique=False, null=True, blank=True, 
> verbose_name='Student
> parents')
> std_email = models.EmailField(verbose_name='Email', null=False, blank=
> True, help_text='Enter the email of the student or leave blank if not
> exist')
> std_password = models.CharField(verbose_name='Password', max_length=
> 512, null=False, blank=True, help_text='Type the password with 6
> characters minimum')
> std_surname = models.CharField(verbose_name='Surname', null=False,
> blank=False, max_length=128, help_text='Type the Surname of the student
> as in the birth certificate')
> std_firstname = models.CharField(verbose_name='First name', null=False,
> blank=True, max_length=128, help_text='Type the student first name')
> std_midlename = models.CharField(verbose_name='Midle name', null=False,
> blank=True, max_length=128, help_text='Type the student first name')
> std_nickname = models.CharField(verbose_name='Student Nickname',
> max_length=64, null=False, blank=True, help_text='If exist, type student
> nickname here')
>
> lass Parents(models.Model):
> father_surname = models.CharField(verbose_name='Father surname',
> max_length=128, null=False, blank=True, help_text='Student Father surname
> as in the birth certificate')
> father_firstName = models.CharField(verbose_name='Father name',
> max_length=128, null=False, blank=True)
> father_phone = models.CharField(verbose_name='Father phone number',
> max_length=24, null=False, blank=True, help_text='Phone number of the
> Father')
> father_dateOfBirth = models.DateField(verbose_name='Father date of
> birth', null=True, blank=True)
> father_placeOfBirth = models.CharField(verbose_name='Father place of
> birth', max_length=512, null=True, blank=True)
> father_nationality = models.CharField('Father nationality', max_length
> =256, null=False, blank=True)
> father_adress = models.CharField(verbose_name='Father resident adress',
> max_length=512, null=False, blank=True)
> father_occupation = models.CharField(verbose_name='Father occupation',
> max_length=512, null=False, blank=True)
> mother_surname = models.CharField(verbose_name='Mother surname', null=
> False, max_length=128, help_text='Student Father name as in the birth
> certificate')
> mother_firstName = models.CharField(verbose_name='Mother name',
> max_length=128, null=False, blank=True)
> mother_phone = models.CharField(verbose_name='Mother phone number',
> max_length=64, null=False, blank=True, help_text='Phone number of the
> mother')
> mother_dateOfBirth = models.DateField(verbose_name='Mother date of
> birth', null=True, blank=True)
> mother_placeOfBirth = models.CharField(verbose_name='Mother place of
> birth', max_length=512, null=False, blank=True)
> mother_nationality = models.CharField('Mother nationality', max_length
> =512, null=False, blank=True)
> mother_adress = models.CharField(verbose_name='Mother resident adress',
> max_length=512, null=False, blank=True)
> mother_occupation = models.CharField(verbose_name='Mother occupation',
> max_length=512, null=False, blank=True)
>
>
> View
> def parentsDetails(request, pk):
> parentObj = Parents.objects.get(parent_id=pk)
> context = {'parentObj': parentObj}
> return render(request, "students_management_app/parents-single.html",
> context)
>
> Template
> {% extends 'main.html' %}
>
> {% block content %}
>
> A parent page for more details 
> 
> {{parentObj.std_matricule}}
> 
> Father full name: {{parentObj.father_firstName}}
> {{parentObj.father_surname}}
> 
> Mother full name: {{parentObj.mother_firstName}}
> {{parentObj.mother_surname}}
> 
> Register date: {{parentObj.parent_createDate}}
> 
> Add parents
> 
>
> {% if parentObj.student_set.all %}
> {% for student in parentObj.students_set.all %}
>
> List of students
> 

Re: Need help with Authenticating and Authorizing

2023-03-10 Thread Namanya Daniel
1. Have you tried to check from the django admin end, the user is not
saved?
2. If the user is saved, did you create a hashed password before saving
data in your views?

On Fri, 10 Mar 2023 at 21:15, linda jean-philippe <
jeanphilippe.li...@gmail.com> wrote:

> I created 2 accounts with the django admin page, but the credentials do
> not work on the login page. When I create new credentials with the register
> page I made, it doesn’t save. I think it’s supposed to save to the database.
>
> On Mar 10, 2023, at 1:06 PM, Namanya Daniel 
> wrote:
>
> 
>
> how have you saved your password in registration?
>
> On Fri, 10 Mar 2023 at 18:02, linda jean-philippe <
> jeanphilippe.li...@gmail.com> wrote:
>
>> I do not know what I am missing. My login page and register page have
>> rendered, but when I try to sign up with new credentials, it does not save.
>> And on the Django Admin page, it says invalid password and username with
>> each attempt.
>>
>> --
>> 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/b9c56cc4-6ab6-4f2b-81f0-48e256ff3685n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/b9c56cc4-6ab6-4f2b-81f0-48e256ff3685n%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/CAP4VW2X_K03C1ZoZZoCVfCbRBia5SX6OqsPygMixPReHWXe75Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAP4VW2X_K03C1ZoZZoCVfCbRBia5SX6OqsPygMixPReHWXe75Q%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/C005769D-7154-43A2-9D0E-A9A53A62148F%40gmail.com
> <https://groups.google.com/d/msgid/django-users/C005769D-7154-43A2-9D0E-A9A53A62148F%40gmail.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/CAP4VW2XfYKiajXg5GYbEs75BRDLa5aD1%2Bbiii__YnWHT0YyE8w%40mail.gmail.com.


Re: Need help with Authenticating and Authorizing

2023-03-10 Thread Namanya Daniel
Right there, all the best

On Fri, 10 Mar 2023 at 22:31, linda jean-philippe <
jeanphilippe.li...@gmail.com> wrote:

> Yes the user is saved and I can see it on the django admin page and no I
> have not hashed the password.
>
> On Fri, Mar 10, 2023 at 1:33 PM Namanya Daniel 
> wrote:
>
>> 1. Have you tried to check from the django admin end, the user is not
>> saved?
>> 2. If the user is saved, did you create a hashed password before saving
>> data in your views?
>>
>> On Fri, 10 Mar 2023 at 21:15, linda jean-philippe <
>> jeanphilippe.li...@gmail.com> wrote:
>>
>>> I created 2 accounts with the django admin page, but the credentials do
>>> not work on the login page. When I create new credentials with the register
>>> page I made, it doesn’t save. I think it’s supposed to save to the database.
>>>
>>> On Mar 10, 2023, at 1:06 PM, Namanya Daniel 
>>> wrote:
>>>
>>> 
>>>
>>> how have you saved your password in registration?
>>>
>>> On Fri, 10 Mar 2023 at 18:02, linda jean-philippe <
>>> jeanphilippe.li...@gmail.com> wrote:
>>>
>>>> I do not know what I am missing. My login page and register page have
>>>> rendered, but when I try to sign up with new credentials, it does not save.
>>>> And on the Django Admin page, it says invalid password and username with
>>>> each attempt.
>>>>
>>>> --
>>>> 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/b9c56cc4-6ab6-4f2b-81f0-48e256ff3685n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/b9c56cc4-6ab6-4f2b-81f0-48e256ff3685n%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/CAP4VW2X_K03C1ZoZZoCVfCbRBia5SX6OqsPygMixPReHWXe75Q%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAP4VW2X_K03C1ZoZZoCVfCbRBia5SX6OqsPygMixPReHWXe75Q%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/C005769D-7154-43A2-9D0E-A9A53A62148F%40gmail.com
>>> <https://groups.google.com/d/msgid/django-users/C005769D-7154-43A2-9D0E-A9A53A62148F%40gmail.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/CAP4VW2XfYKiajXg5GYbEs75BRDLa5aD1%2Bbiii__YnWHT0YyE8w%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAP4VW2XfYKiajXg5GYbEs75BRDLa5aD1%2Bbiii__YnWHT0YyE8w%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/CAAeZjhhHaER0308c704JeKrf-P91q8FrF2KjWJpBzwZFmK22bA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAAeZjhhHaER0308c704JeKrf-P91q8FrF2KjWJpBzwZFmK22bA%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/CAP4VW2UXPnxm_Lmch18E5jqRNPx-Aprpe2QMe%2B2cVTY-13ey-w%40mail.gmail.com.


Re: Django-allauth & Facebook login

2023-04-01 Thread Namanya Daniel
Follow the following link, it shows you how to create a custom ssl
certificate and how to run ssl server
https://medium.com/@millienakiganda/creating-an-ssl-certificate-for-localhost-in-django-framework-45290d905b88



On Sat, 1 Apr 2023 at 15:32, Marcelo A. Robin 
wrote:

> Hi, I'm trying to use django-allauth to create a facebook login system.  i
> managed to get it all done but in my local test i get an error where
> facebook tells me my app path is not safe.  I understand that my
> http://localhost is missing the https://localhost.  this is so ?  How can
> I add https to my Django test server?
>
> I think there is an add-on that by installing it creates the https at the
> beginning of the route 127.0.0.1:8000.  What I don't know is if, when
> uploading the project to production, I should remove that library along
> with all the configurations that I have to do in settings.py
>
> --
> 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/a2e6588d-9808-485d-8099-82d043833922n%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/CAP4VW2Xdukfpuy%2Bxv4gmpcTzdx%3De8kenzp0aZkZwm2VAfx0_5w%40mail.gmail.com.