Re: Exciting Opportunity: Join Our Django WhatsApp Bulk Messaging Project!

2024-02-24 Thread Daniel Joseph
I will like to join
Number:08166262610

On Sun, 18 Feb 2024, 5:48 pm SURAJ TIWARI,  wrote:

>  Join Our Django WhatsApp Bulk Messaging Project!
>
>  Hello everyone,
>
> Are you looking for an exciting opportunity to gain hands-on experience in
> Django development? Do you want to work on a meaningful project that
> leverages WhatsApp for bulk messaging? We're thrilled to invite you to join
> our dynamic team!
>
>  Benefits:
>
>- Get hands-on experience working on a real-world Django project.
>- Learn how to leverage WhatsApp for bulk messaging, a valuable skill
>in today's digital landscape.
>- Opportunities for hybrid work, allowing flexibility in your schedule.
>- Collaborate with experienced developers and gain valuable mentorship.
>- Access to cutting-edge tools and technologies.
>
>  Opportunities Available:
>
>- Django developers
>- Frontend developers
>- UI/UX designers
>- Quality assurance testers
>
> 欄 How to Join: Simply reply to this message expressing your interest,
> and we'll provide you with all the necessary details to get started on our
> project.
>
> Let's work together to create something amazing and gain valuable
> experience along the way! ✨
>
> Best regards,
>
> Suraj Tiwari
>
>
> --
> 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/e8a705fd-10d9-4c1a-b4ba-0a7b896dbfean%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/CAMHD5ZRUCo66_rvkEXSXEYYyjbmoxX5bMv4278yyBgcC5BmiJA%40mail.gmail.com.


Re: Need help in python Django project "online train ticket booking system"

2024-02-22 Thread Daniel Martinez
Hello, what is the problem you are experimenting? Canyou please provide
code?

On Mon, Feb 19, 2024, 9:21 AM Surya Santhosh 
wrote:

> Need help in python Django project "online train ticket booking system"
>
> --
> 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/4b192345-549f-466f-96a8-429037e14875n%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/CANp4oeuWD%2BNmQWonAuUh-7cQCZUkXgnOY33y1%2Bts5bKnJqZv0g%40mail.gmail.com.


Re: My first project

2024-01-06 Thread Daniel Martinez
Hello Om khade
Thank you so much for your feedback I was able to resolve and fix the
security question in the recovery password
and I continue to working in the project.
Thank you again for your time and help
Sincerely
Daniel Martinez

On Sat, Dec 16, 2023, 6:44 AM Om Khade  wrote:

> Hi Daniel,
>
> Nice app. I think you also need to show security questions after we click
> on forget password.
>
> I have attached screenshot for your reference.
>
> Thank you
> Om khade
>
> On Sat, 16 Dec, 2023, 11:39 Daniel Martinez,  wrote:
>
>> Hello everyone,
>>
>> I'm Daniel, a recent college graduate as of July 2023. Since then, I've
>> been actively seeking job opportunities as a Django developer. During my
>> job search, I took the initiative to start my first project in Django. I'm
>> excited to share with you my debut as a full-stack developer: a telehealth
>> app that leverages AI to predict diseases.
>>
>> The app https://telehealthconnex.com is designed to enhance healthcare
>> delivery by integrating advanced AI algorithms. I would greatly appreciate
>> any feedback or suggestions you might have!
>>
>> Thank you for your support!
>>
>>
>> --
>> 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/CANp4oev4DbNi7cRpvsTVTFhyCq-ozxmfL9gMUpxQGMwfHam1kg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CANp4oev4DbNi7cRpvsTVTFhyCq-ozxmfL9gMUpxQGMwfHam1kg%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/CAMaQUUqXxnK9jJf-Sg1CA6TuJkN2DsqtwMcwG6ZJOdiia6NRfg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAMaQUUqXxnK9jJf-Sg1CA6TuJkN2DsqtwMcwG6ZJOdiia6NRfg%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/CANp4oeu09KxcjrPKphBgk50%3Da210UgLG93Y%2BkXKpvXE6Zhp5Zg%40mail.gmail.com.


My first project

2023-12-15 Thread Daniel Martinez
Hello everyone,

I'm Daniel, a recent college graduate as of July 2023. Since then, I've
been actively seeking job opportunities as a Django developer. During my
job search, I took the initiative to start my first project in Django. I'm
excited to share with you my debut as a full-stack developer: a telehealth
app that leverages AI to predict diseases.

The app https://telehealthconnex.com is designed to enhance healthcare
delivery by integrating advanced AI algorithms. I would greatly appreciate
any feedback or suggestions you might have!

Thank you for your support!

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


Re: Encrypt entire Django project and decrypt in ram to start server.

2023-11-14 Thread Daniel Martinez
A solution for that is add a IP blocker in your server to avoid brutal
forces attacks that way you can use.

Or a tool for monitoring you traffic such Snoft.

Happy coding 

On Mon, Nov 13, 2023, 6:54 AM Om Khade  wrote:

> I want to save my Django project on a shared server in encrypted format
> and build a script that decrypts the Django project files in ram and start
> the server so that code is not leaked or anyone is not able to tamper with
> it.
>
> Is there a way to do 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/d53bd68b-9a3d-4bb8-a56a-c2092808b903n%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/CANp4oevnerJifg3WVCMmkTfvD9g3fN4pCVvKZfUdSEEZq_K7Yw%40mail.gmail.com.


Re: associate Developers for Google

2023-06-19 Thread Daniel Joseph
Yes I'm in

On Sat, Jun 17, 2023, 3:09 PM Lucifer Black 
wrote:

> Is there anyone that wants a job at google developer at home looking for
> three people
>
>
> Get Outlook for Android 
>
> --
> 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/DB9P193MB15964FB814BFEBE1A8A33AEFF45BA%40DB9P193MB1596.EURP193.PROD.OUTLOOK.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/CAMHD5ZR%3DRjSdh2Q1RitWhberF_gicEfFPZWV9xSD7FBxAGkURQ%40mail.gmail.com.


Re: Looking for a Learning Buddy

2023-06-19 Thread Daniel Joseph
Hi I' am Daniel and I think it a great idea, I myself will be going to the
university this year. I am good in web development and python programming
and a little knowledge on AI/ML using Python and will like to be your
learning partner

On Fri, Jun 16, 2023, 11:00 PM John Ayodele  wrote:

> Hi! It's John.
>
> I am currently looking for a learning buddy, for Machine Learning.
> I have little experience in Django and I code in Python.
>
> The learning buddy would have one-on-one meetings with me so we can share
> ideas and learn together.
> It is really going to be a fun experience.
> The reason I am looking for a learning buddy is because I find it more fun
> learning with people rather than just being self-taught alone.
> I will be going to university later this year or next year.
> 
> If this sounds like you, please do not hesitate to contact me.
> 
>
> Thanks.
> John Ayodele
>
> --
> 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/CAP7pJ3gsn_bkOfP-8k-SNZ%2BmmJ8riuc1cdUVXzoQXN31BS4W4g%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAP7pJ3gsn_bkOfP-8k-SNZ%2BmmJ8riuc1cdUVXzoQXN31BS4W4g%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/CAMHD5ZS302u21rmcEjrh-cBf977cqD4wp4N2WxnzSazGeNm-sg%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.


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
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: 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
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: 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: 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.


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: 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.


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: 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.


Accessing Data Linked in One-To-One to Current User from a Table

2023-01-05 Thread G Daniel
Hello All!

I need your help. I have a table, PersonWife, that's linked in a one-to-one 
fashion with the users (using Django's  user authentication system). See 
attached models and admin control panel screenshots.

I can get the username of the currently logged in user ( attached 
screenshots). What I'm trying to do is that having the username of the 
currently logged in user, I now want to access with whom the user is linked 
to that one-to-one table and have the name of that person (wife's name).
For example, in my test the user's username is test_user1 and the name of 
the wife is Carol. How to I get Carol to find Carol in the code?
This is my script so far:

from django.shortcuts import render, get_object_or_404
from django.http import HttpResponseRedirect
from django.contrib.sessions.models import Session
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from . models import PersonWife

def home(request):
context = {}
return render(request, 'myapp/index.html', context)


@login_required
def get_wife_name(request):
#  Check if user is authenticated to get his id
if request.user.is_authenticated:
user_username = request.user
username = user_username.username
print(username)
context = {'username':username}
return render(request, 'myapp/relationship.html', context)

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/9a0e67ee-d27b-468c-9879-22d2890ff234n%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: 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.


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: 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.


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.


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: group

2022-09-28 Thread Daniel Hirner
Kindly add me 
Name: Charles
Number: +233 204070043

On Wed, Sep 28, 2022 at 10:29 Basith  wrote:

> Kindly add me also,
> Name: Basith
> Number: +919544716586
>
> On Mon, 26 Sept 2022 at 20:49, yassin kamanyile 
> wrote:
>
>> Add me +255763023477
>>
>> On Mon, 26 Sept 2022, 15:53 Abdulfarid Olakunle, 
>> wrote:
>>
>>> Hello fellow developers, I will be creating a WhatsApp group chat later
>>> in the day, So I will like my fellow Python Django Developers to join the
>>> group. It will be much easier to discuss there and I will sacrifice myself
>>> out for anyone who need my service.
>>>
>>> God bless you all
>>> Enjoy your day
>>> Biliaminu
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CA%2BccuR0goa8Mu9MqNLyZtCAJedHKpVZ6pFfrpXKFJdjaRrgttQ%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/CAOyeOe9tKFCogEZv1NfTVVRMpFcXxayH9vp0JU3XYiFO4fYU%2Bw%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/CAADw1sz3_Qmg3bRmyZkG7EqpTpC%3DiB4dxR_NV-mONn3dGUEH6w%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/CAPBnVR1mNAAJ0OFFQ5XGmsgcFn7dpA4Cwnuxz%2BanVMZXozSk8w%40mail.gmail.com.


Re:

2022-09-26 Thread Daniel Joseph
Daniel Joseph
+2348036267282

On Mon, 26 Sept 2022 at 13:53, Abdulfarid Olakunle 
wrote:

> Hello fellow developers, I will be creating a WhatsApp group chat later in
> the day, So I will like my fellow Python Django Developers to join the
> group. It will be much easier to discuss there and I will sacrifice myself
> out for anyone who need my service.
>
> God bless you all
> Enjoy your day
> Biliaminu
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2BccuR0goa8Mu9MqNLyZtCAJedHKpVZ6pFfrpXKFJdjaRrgttQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CA%2BccuR0goa8Mu9MqNLyZtCAJedHKpVZ6pFfrpXKFJdjaRrgttQ%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/CAMHD5ZQi5ydGYETT6BKfkzJhUs7ncVn4fYTugqsAQtLVPnuj1g%40mail.gmail.com.


Re: group

2022-09-26 Thread Daniel Joseph
Add me also +2348036267282

On Mon, 26 Sept 2022 at 18:49, yassin kamanyile 
wrote:

> Add me +255763023477
>
> On Mon, 26 Sept 2022, 15:53 Abdulfarid Olakunle, 
> wrote:
>
>> Hello fellow developers, I will be creating a WhatsApp group chat later
>> in the day, So I will like my fellow Python Django Developers to join the
>> group. It will be much easier to discuss there and I will sacrifice myself
>> out for anyone who need my service.
>>
>> God bless you all
>> Enjoy your day
>> Biliaminu
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CA%2BccuR0goa8Mu9MqNLyZtCAJedHKpVZ6pFfrpXKFJdjaRrgttQ%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/CAOyeOe9tKFCogEZv1NfTVVRMpFcXxayH9vp0JU3XYiFO4fYU%2Bw%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/CAMHD5ZQkxTgqJCzguOxQ0i6rM0Ddx%3D8w5Q8i6Qcx23yYWB0XSw%40mail.gmail.com.


Re: How Important Is Writing Unit Tests For Django Applications?

2022-03-14 Thread Daniel Coker
Thanks for your response, Antonis.

Would you recommend testing views using the Client or RequestFactory 
classes?
On Sunday, 13 March 2022 at 13:41:26 UTC+1 carste...@cafu.de wrote:

> Am 13.03.22 um 10:53 schrieb Antonis Christofides:
> > This topic is always interesting for me.
> > 
> > [...]
> > I didn't expect this reply to become that long, neither that I would not 
> answer the question in the end. I hope it was helpful anyway. Good luck!
> > 
>
> A great text! Thank you!
>
> Best regards,
> Carsten
>

-- 
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/fbf7c6c8-c091-4eec-ad0c-ef0cef46dce5n%40googlegroups.com.


How Important Is Writing Unit Tests For Django Applications?

2022-03-12 Thread Daniel Coker
I understand the importance of unit testing. However, if we are going to 
write integration tests (testing the views), this test will step through 
all of the modules that we would otherwise unit test.

So, I'm wondering, it it really necessary to write unit test for Django 
Applications when we will still test the views?

-- 
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/d0cf2d7c-79cb-41a5-801a-4240c3c0c1c1n%40googlegroups.com.


Deploy help

2021-09-21 Thread Daniel Gauvin
Hi,

I am looking for support to deploy a Django application on cPanel.  The 
application itself is working, however the static files (CSS, JS and 
Images) do not load in the application. 

In my settings.py file, it is as such:

STATIC_URL = '/static/'
STATICFILES_DIRS = ['static']
STATIC_ROOT = os.path.join(BASE_DIR, 'assets') 

MEDIA_URL = '/media/' 
MEDIA_ROOT = os.path.join(BASE_DIR, '/home//public_html/media') 

The static files are located in : /home//public_html/app/static 
and a copy is located in  /home//public_html/static.

Thank you 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/6b3aa9ed-335b-4826-80a0-8a8852b18660n%40googlegroups.com.


Re: Problem when i turn debug False

2021-09-02 Thread Daniel Hepper
As far as I can tell a2hosting offers plain virtual servers. Have you read
the documentation on Serving static files in production?

https://docs.djangoproject.com/en/3.2/howto/static-files/deployment/


On Thu, Sep 2, 2021 at 10:46 AM luca72.b...@gmail.com <
luca72.bertolo...@gmail.com> wrote:

> Hello my web site is hosted on a2hosting
>  when i turn to False the image are not loaded.
>
> My settings.py have this line:
> STATIC_URL = '/static/'
> STATIC_ROOT = os.path.join(BASE_DIR, 'static_files')
>
> MEDIA_URL = '/media/'
> MEDIA_ROOT = os.path.join(BASE_DIR, "static_media")
>
> the file are located in:
> home///myapp/static_files/polls
>
> In the template I do as follow
>  {% load static %}
>
> 
> --
> 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/836ae997-cc6d-4d47-be45-fed85df79ab9n%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/CAHEnUVUjDmq3rEdw7nhnGwbxoxbRsSt6TDuxKF1MBhS97mUaXw%40mail.gmail.com.


loaddata - replace 'save' with 'bulk_create' with batch_size?

2021-08-19 Thread Daniel Edry
 

Hey, i was trying to upload about 500K results into my db with loaddata and 
saw that it saves the items one item at a time 

in "load_label" in line "obj.save(using=self.using)"

is there a reason no the save the objects to a list and then run:

bulk_create(objs, batch_size=bulk_size) (with maybe ignore_conflicts)

is there something that im missing?

-- 
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/781941bb-bc1a-4262-a4b4-4274bf57da35n%40googlegroups.com.


how to download django

2021-07-16 Thread Daniel Opeyemi
hello everyone, i am  new here. please, i need help on how to download 
django 

-- 
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/64b29b56-93b0-4275-ad28-3137c247a58en%40googlegroups.com.


Manager.raw() in a class method

2021-06-23 Thread Daniel Sears
I have a SQL function that works when I run it directly from an SQL script
and now I'm trying to run it with Manager.raw() in a model method. I wrote
a model instance method that worked fine:

def get_store_products_sql(self) -> list['Product']:
return Product.objects.raw(
 '''SELECT  prod_id AS id,
prod_name,
prod_price
  FROM  get_store_products(%s)''',
 [self.id]
  )

Now I'm trying to write a similar class method:

@classmethod
def get_products_by_color_sql(cls, color) -> list['Product']:
return Product.objects.raw(
 '''SELECT  prod_id AS id,
prod_name,
prod_price
  FROM
 get_products_by_color(%s)''',
 [color]
  )

This fails pretty silently without even entering
get_products_by_color(). color is a legal string and I've also tried simply
using "green" without any luck.

As I said, this isn't even getting into the get_products_by_color()
function, so I doubt that's the problem. It appears to be either a problem
with calling Manager.raw() in a class method or a problem with the color
string.

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


Re: Help me Please - Django and python program

2021-06-21 Thread Onyemordi Daniel
Hello, have your problem been solved if no kindly contact me on WhatsApp
08167997730 to assist you better.

On Mon, 21 Jun 2021, 07:07 mayank sandikar, 
wrote:

> https://github.com/Mayanksandikar/3-database
>
>
> On Sun, Jun 20, 2021 at 4:08 PM Luciano Martins 
> wrote:
>
>> Post your code on github and provide the link here
>>
>> Em sábado, 19 de junho de 2021 às 22:00:24 UTC-3, mayanksand...@gmail.com
>> escreveu:
>>
>>> I have a few errors in my program.
>>> 1. HTML
>>> In my front view only my last text box is working and all the upper text
>>> boxes are unassessable.
>>> 2. Database
>>> I am getting only the user quantity in the database but not getting the
>>> itemname, price and total amount in it.
>>>
>>> I don't know where it is going wrong, I've been stuck here for the last
>>> 4 days. I'm a beginner in django and python. Which logic is used for this
>>> program?
>>> Please, please help me.
>>>
>>> PFA
>>>
>> --
>> 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/9feed719-8ab5-4523-80a1-ad062fe1999en%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/CAOS5mPyWASHhqgx947GwftVcmMq9PD9D6PLyHA5Kgv9DqY5GHQ%40mail.gmail.com
> 
> .
>

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


Re: Hiring react developers

2021-05-13 Thread vineet daniel
Hi Arun

Please share your profile on vineet.dan...@paymeindia.in

On Thu, 13 May 2021, 18:39 Arun Kumar,  wrote:

> Interested
>
> On Thu, 13 May 2021 at 6:12 PM, John McClain 
> wrote:
>
>> Kasper,
>>
>> I think it means I am asking the community for help.
>>
>> Does that clear things up for you?
>>
>> On Thu, 13 May 2021 at 13:37, Kasper Laudrup 
>> wrote:
>>
>>> On 13/05/2021 14.34, John McClain wrote:
>>> > I need help with REACTjs url redirects for SSL
>>> >
>>> > I have reactjs front and django backend
>>> >
>>> > running nginx, gunicorn and cannot get ssl to slide in
>>> >
>>>
>>> Do you think that would make you a good candidate for a frontend
>>> development role using react?
>>>
>>> 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/2387f45e-8047-0d3c-6f9e-792c292c6882%40stacktrace.dk
>>> .
>>>
>>
>>
>> --
>> John McClain
>>
>> Cell: 085-1977-823
>> Skype: jmcclain0129
>> Email: jmcclain0...@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/CAN-hv_rCYzUHu2YQTqT3g-urMtJ6e%2B7t4w34mdHGihv%3DTGN1aw%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/CAKX%3DScZA6mE%2Bq4S9de37Q%2B56STPNxvR0A1AQrhq6NRTa9jv0Ug%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/CAJPbAW-X9sUDmnNznqW5p5w7xTLP6bceLgLtNWZ-MHrEXgMO%2BA%40mail.gmail.com.


Re: Hiring react developers

2021-05-10 Thread vineet daniel
Please share your resume with me on vineet.dan...@paymeindia.in

On Mon, 3 May 2021, 11:14 Akinfolarin Stephen, <
akinfolarinsteph...@gmail.com> wrote:

> Am a react developer .Am interested
>
> On Mon, May 3, 2021 at 6:11 AM vineet daniel 
> wrote:
>
>> Hi Group,
>>
>> Any one interested in Frontend development role using react?
>>
>> Please let me know.
>>
>> --
>> 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/CAJPbAW9RtG-KCB0sB68HeY_kDyscuWBVzg5bZ1WHNqtp21QRRw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAJPbAW9RtG-KCB0sB68HeY_kDyscuWBVzg5bZ1WHNqtp21QRRw%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/CAFujGLxaY1s6yX7RiVksuEBJYJzregf_PpdZXJd-n0QcT9cEkA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAFujGLxaY1s6yX7RiVksuEBJYJzregf_PpdZXJd-n0QcT9cEkA%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/CAJPbAW-AixdHzKjkAiKTtVyF%2BMc-C%2BvNh2c-ZnULwMhAVqoCpA%40mail.gmail.com.


Re: 'Question' object has no attribute 'choice_text'

2021-05-07 Thread Daniel Hepper
Hi Rishi,

please share your models.py, otherwise it will be difficult to help you.

Cheers,
Daniel

Rishipal Singh  schrieb am Fr. 7. Mai 2021 um
15:19:

> Hi Daniel,
> I am working on same tutorial and stuck at Tutorial # 4..
>
> I have checked your code too..
> Still getting below error
>
> 'Question' object has no attribute 'choice_set'
>  selected_choice = question.choice_set.get(pk=request.POST['choice'])
> Can you advice
>
> Regards
> Rishi
> On Monday, 25 December 2017 at 05:22:55 UTC+5:30 Daniel Hepper wrote:
>
>> Are you sure your polls/models.py is correct?
>> I assume you are at „Part 2: Playing with the API“. Here is what your
>> polls/models.py should look like at this point of the tutorial:
>>
>> https://github.com/consideratecode/django-tutorial-step-by-step/blob/2.0/2.4/mysite/polls/models.py
>>
>> My guess is that you have a typo in your __str__ method. This gets
>> triggered in the first session because your Question had Choices, which it
>> doesn‘t in your second session, maybe because you deleted them. But that‘s
>> really just a guess without looking at your code.
>>
>> I‘ve put together the complete code for the tutorial, step-by-step:
>> https://consideratecode.com/2017/12/15/django-tutorial-step-by-step/
>>
>> Hope that helps,
>> Daniel
>>
>> Am 24.12.2017 um 17:44 schrieb Artem Tantsura :
>>
>> I've made anything by site tutorial, just repeat all steps and code. And
>> when I wrote this:
>>
>>  >>> from polls.models import Question, Choice
>>
>> # Make sure our __str__() addition worked.>>> 
>> Question.objects.all()]>
>> # Django provides a rich database lookup API that's entirely driven by# 
>> keyword arguments.>>> Question.objects.filter(id=1)> What's up?>]>>>> 
>> Question.objects.filter(question_text__startswith='What')> []>
>> >>> from django.utils import timezone>>> current_year = 
>> >>> timezone.now().year>>> 
>> >>> Question.objects.get(pub_date__year=current_year)
>>
>> >>> Question.objects.get(id=2)Traceback (most recent call last):
>> ...DoesNotExist: Question matching query does not exist.
>>
>> >>> Question.objects.get(pk=1)
>> >>> q = Question.objects.get(pk=1)>>> q.was_published_recently()True
>> >>> q = Question.objects.get(pk=1)>>> q.choice_set.all()
>>
>>
>> Im getting 'Question' object has no attribute 'choice_text'.
>>
>> But then I have got some magic solution! I define if Im writting only this:
>>
>> >>>from polls.models import Choice, Question
>> >>>from django.utils import timezone
>>
>> >>>q = Question.objects.get(pk=1)
>>
>> >>>q.choice_set.all()
>> Out[4]: 
>>
>> Then I dont have any problems, but I have done the same main steps then
>> before(like in tutorial)! Sorry, but WTF is going on?
>>
>> --
>> 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 post to this group, send email to django...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/33e82e65-b97a-46f9-be2c-38905fccc01a%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/33e82e65-b97a-46f9-be2c-38905fccc01a%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
> 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/f8978213-d64c-412e-b65c-d55f1bd93db7n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/f8978213-d64c-412e-b65c-d55f1bd93db7n%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/CAHEnUVVpmGvfNa%2B5_oVvmifmyy%2BSNiK_SQsDcYy3H1SnwoHXtQ%40mail.gmail.com.


Re: Hiring react developers

2021-05-03 Thread vineet daniel
Hi,

Thanks for the response. Please share your profile and where are you based?

On Mon, 3 May 2021, 11:14 Akinfolarin Stephen, <
akinfolarinsteph...@gmail.com> wrote:

> Am a react developer .Am interested
>
> On Mon, May 3, 2021 at 6:11 AM vineet daniel 
> wrote:
>
>> Hi Group,
>>
>> Any one interested in Frontend development role using react?
>>
>> Please let me know.
>>
>> --
>> 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/CAJPbAW9RtG-KCB0sB68HeY_kDyscuWBVzg5bZ1WHNqtp21QRRw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAJPbAW9RtG-KCB0sB68HeY_kDyscuWBVzg5bZ1WHNqtp21QRRw%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/CAFujGLxaY1s6yX7RiVksuEBJYJzregf_PpdZXJd-n0QcT9cEkA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAFujGLxaY1s6yX7RiVksuEBJYJzregf_PpdZXJd-n0QcT9cEkA%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/CAJPbAW_ecZiRBp_0ChvccX0%2BZgN3yRjV8452hSc1es1Uo11iWw%40mail.gmail.com.


Hiring react developers

2021-05-02 Thread vineet daniel
Hi Group,

Any one interested in Frontend development role using react?

Please let me know.

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


Re: django.db.models.signals

2020-09-20 Thread Ricardo Daniel Quiroga
Hi
pre_save, post_save solved this problem with created flag [1]

# If you check only update in you
if not created:
   pass

[1] https://docs.djangoproject.com/en/dev/ref/signals/#post-save



El sáb., 19 sept. 2020 a las 12:14, Mohammad hassan Tahery (<
mo.ha.ta.1.2.1.mo.ha...@gmail.com>) escribió:

> It would be cool to have pre_update and post_update in set of built-in
> signals.
>
> --
> 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/df4b7a32-4c81-4d37-aeca-bc12dfd79602n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/df4b7a32-4c81-4d37-aeca-bc12dfd79602n%40googlegroups.com?utm_medium=email_source=footer>
> .
>


-- 

Ricardo Daniel Quiroga

-- 
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/CAO2-wHasnZPiXT2vENkZsOWoM9dUJXYcmBtD-6_21NLuDAM4aQ%40mail.gmail.com.


Re: Python-django project

2020-07-21 Thread Daniel Njoku
interested

On Tue, Jul 21, 2020 at 4:09 AM learn code  wrote:

> Hi everyone,
>
> I am learning python and django, like to work on the projects to improve
> more.If any one interested to join with me to work on the projects,plz send
> me a email.
>
> --
> 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/e7116e9b-9458-4f49-a638-135c4b5874e0o%40googlegroups.com
> .
>


-- 
Daniel Njoku

-- 
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/CANkB3EARWq7ByXUmNuzVUFGyGuDK%3D1THrfQHqsAH8JhbnbRv-A%40mail.gmail.com.


Re: Can we use python related api's on the Django templates ?

2020-05-27 Thread Daniel Roseman
On Wednesday, 27 May 2020 13:21:24 UTC+1, ratnadeep ray wrote:
>
> Hi all, 
>
> Currently I am trying to print the type of a variable from the Django 
> template html file as follows: 
>
> The type of feature list report for version 
>> {%type(version)%} is
>
>
> For the above, I am getting the following error: 
>
> Invalid block tag on line 9: 'type(version)'. Did you forget to register or 
> load this tag?
>
>
> So what's going wrong here? How can we use the python related api's (like 
> type) from the html template files? I think inside the {%  %} we can 
> use python related evaluations. Am I right? 
>
> Please throw some lights on this .
>
> Thanks. 
>
>
No, you are wrong, and this is explicitly pointed out in the docs 
(https://docs.djangoproject.com/en/3.0/ref/templates/language/):

> bear in mind that the Django template system is not simply Python 
embedded into HTML. This is by design: the template system is meant to 
express presentation, not program logic.

--
DR. 

-- 
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/0a73190c-06f6-4151-9777-c691d084b8b3%40googlegroups.com.


Re: How to retrieve the values from the context_process.py file to template?

2020-05-26 Thread Daniel Roseman
On Tuesday, 26 May 2020 17:27:13 UTC+1, Aboyeji Solomon Adeleke wrote:
>
> Yes, import the get_result from the context_process.py


This is entirely wrong. The point of a context processor is that it is 
automatically added to the template context. You shouldn't be importing it 
or calling it specifically in your view.

OP's original code should have worked (although there's a pointless 
reference to RequestContext that should be deleted).
--
DR.

-- 
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/a9d314d2-69a4-4b14-b4ed-3f132b28e482%40googlegroups.com.


Re: regular expression in an url showing post details

2020-05-26 Thread Daniel Roseman
On Tuesday, 26 May 2020 01:50:35 UTC+1, Tiempo wrote:
>
> Hi,
> my name is Tiempo and I'm new with  Django. currently, I'm using django 
> 3.0 and i want to display each article of a blog app ( like when I click on 
> article 1, it should display it full details on page show with the 
> following link http://127.0.0.1:8000/blog/posts/1/)
>
> containing a parameter named id (of an article) but the path is not 
> recognized : 
>
> urlpatterns = [
>
> path('', views.index, name='Blog'),
> path('posts/?P[0-9]+', views.show),
>
>
>
> This is how I called the function show in views:
>
> def show(request, id):
> return render(request, 'blog/show.html', {'id': id})
>
>
>
> This is what happens when I execute the local server
>
> Page not found (404)
> Request Method: GET
> Request URL: http://127.0.0.1:8000/blog/posts/1/
>
> Using the URLconf defined in monsite.urls, Django tried these URL 
> patterns, in this order:
>
>1. admin/
>2. [name='Home']
>3. about/ [name='About']
>4. contact/ [name='Contact']
>5. blog/ [name='Blog']
>6. blog/ posts/?P[0-9]+
>
> The current path, blog/posts/1/, didn't match any of these.
>
> can someone help me with how to write the regular expression in Django 
> 3.0, please?
>
>

What gave you the impression you should be using regular expressions? 
`path` does not take regex and you should not be using them in Django 3.0. 

The correct syntax is:

path('posts//', views.show),

--
DR.

-- 
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/7773531e-c559-4b3c-9c02-bec32089f5fe%40googlegroups.com.


Re: User.objects.all() returns only one field

2020-05-07 Thread Daniel Roseman

On Thursday, 7 May 2020 12:47:21 UTC+1, Mohsen Pahlevanzadeh wrote:
>
> User.objects.all() only returns one field, I need to others fields 
> such as first_name or last_name. 
>
> How can I access others field? 
>

No it doesn't. It returns a queryset of objects, each of which has all the 
fields. When you print the entire queryset, it calls the `__repr__` method 
of each element.
-- 
DR.

-- 
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/ecc703ce-fc40-4533-a7ea-564ba7c870f7%40googlegroups.com.


Re: Django URL routing

2020-05-07 Thread Daniel Roseman
You have multiple URLs that are the same path. That can't work. One URL 
maps to one view.
-- 
DR.

On Thursday, 7 May 2020 11:40:09 UTC+1, Ronald Kamulegeya wrote:
>
> I am learning Django and progressing well but i am stuck on how to 
> configure the different urls to view functions. 
> I have gone through tutorials and URL routing seems pretty 
> straight forward but i cant make it work in my apps.
>
> I am almost hitting a brick wall. I dont see anything wrong i have done.
>
> What happens is that the index view and admin interface opens.
>
> But connecting from the index view to other pages raises the 404 error.
>
> [image: project-s.png]
> I created a project TenancyMGt and added  app rentals as shown above.
> I have created several views in the module views.py Two are relevant here:
>
> def createTenant(request):
> form = TenantsForm
> context = {'form': form}
> html_form = render_to_string('rentals/partial_tenant_create.html',
> context,
> request=request,
> )
> return JsonResponse({'html_form': html_form})class 
> TenantsListView(ListView):
> model = Tenants
> context_object_name = 'tenant_list'
> template_name = 'rentals/tenants_list.html'
> paginate_by = 5
> def get_queryset(self):
> return Tenants.objects.all()
>
> Now i created a file urls.py under the app rentals:
>
> from . import viewsfrom django.urls import path
> app_name='rentals'
> urlpatterns = [
> path("", views.TenantsListView.as_view(), name="index"),
> path("",views.TenantDetailView.as_view,name="detail"),
> path("",views.createTenant, name='createTenant'), 
> path("/",views.TenantUpdateView.as_view, name='edit'),
> path("/",views.delete, name='delete'),
> ]
>
> under TenancyMgr/urls, i add the following:
>
> from django.contrib import adminfrom django.urls import path,includefrom 
> rentals import views
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('', include('rentals.urls')),
> ]
>
> When i run the server, the index view opens successfully! From the index, i 
> want to open the createTenant view as below.
>
> 
>   New Tenant
> 
>
> When the button is clicked, i get the urls below:
>
> http://127.0.0.1:8000/rentals/createTenant/
>
> Then i get the response is 404,page not found error.
>
> But this opens admin page:
>
> http://127.0.0.1:8000/admin/
>
> So far i have failed to crack the secret of how the Urls work. I have gone 
> through several tutorials and i see the same set up as mine.
>
> I am requesting for guidance on how to crack the puzzle i.e make the other 
> urls work.
>
> Ronald
>
>

-- 
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/4cc1d70b-119e-4f07-9867-f4c9786fbabc%40googlegroups.com.


Re: Need help whit DJANGO_SETTINGS_MODULE

2020-04-24 Thread DANIEL URBANO DE LA RUA
are you using virtual environment?

El vie., 24 abr. 2020 a las 14:33, Raja Sekar Sambath ()
escribió:

> could you share the solution here
> resetting PC didn't making any sense to me
>
> On Sun, 19 Apr 2020 at 19:19, Ilie Ioana  wrote:
>
>> After resetting the pc it worked.
>> Thanks.
>>
>> On Sunday, April 19, 2020 at 4:39:50 PM UTC+3, Ilie Ioana wrote:
>>>
>>> The project structure:
>>>
>>>
>>> (test1) ioana.i@ioana-spamexperts:~/Workspace/Ioana/test1/test1$ tree
>>> .
>>> ├── manage.py
>>> └── test1
>>> ├── asgi.py
>>> ├── __init__.py
>>> ├── settings.py
>>> ├── urls.py
>>> └── wsgi.py
>>>
>>>
>>>
>>> :~/Workspace/Ioana/test1/test1$ python manage.py runserver
>>> Traceback (most recent call last):
>>>   File "manage.py", line 21, in 
>>> main()
>>>   File "manage.py", line 17, in main
>>> execute_from_command_line(sys.argv)
>>>   File
>>> "/home/ioana.i/Workspace/Ioana/test1/lib/python3.6/site-packages/django/core/management/__init__.py",
>>> line 401, in execute_from_command_line
>>> utility.execute()
>>>   File
>>> "/home/ioana.i/Workspace/Ioana/test1/lib/python3.6/site-packages/django/core/management/__init__.py",
>>> line 395, in execute
>>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>>   File
>>> "/home/ioana.i/Workspace/Ioana/test1/lib/python3.6/site-packages/django/core/management/base.py",
>>> line 328, in run_from_argv
>>> self.execute(*args, **cmd_options)
>>>   File
>>> "/home/ioana.i/Workspace/Ioana/test1/lib/python3.6/site-packages/django/core/management/commands/runserver.py",
>>> line 60, in execute
>>> super().execute(*args, **options)
>>>   File
>>> "/home/ioana.i/Workspace/Ioana/test1/lib/python3.6/site-packages/django/core/management/base.py",
>>> line 369, in execute
>>> output = self.handle(*args, **options)
>>>   File
>>> "/home/ioana.i/Workspace/Ioana/test1/lib/python3.6/site-packages/django/core/management/commands/runserver.py",
>>> line 67, in handle
>>> if not settings.DEBUG and not settings.ALLOWED_HOSTS:
>>>   File
>>> "/home/ioana.i/Workspace/Ioana/test1/lib/python3.6/site-packages/django/conf/__init__.py",
>>> line 76, in __getattr__
>>> self._setup(name)
>>>   File
>>> "/home/ioana.i/Workspace/Ioana/test1/lib/python3.6/site-packages/django/conf/__init__.py",
>>> line 61, in _setup
>>> % (desc, ENVIRONMENT_VARIABLE))
>>> django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG,
>>> but settings are not configured. You must either define the environment
>>> variable DJANGO_SETTINGS_MODULE or call settings.configure() before
>>> accessing settings.
>>>
>>>
>>>
>>>
>>> On Sunday, April 19, 2020 at 4:35:11 PM UTC+3, Ayser shuhaib wrote:

 to run the server use:
 Python manage.py runserver

 It would be better if you send a picture of the project files structure.

 On Sun, 19 Apr 2020 at 15:22, Ilie Ioana  wrote:

> Hi,I'm new with django and python.
> I just strated a new django project in a venv using django 3.0 and
> seems that DJANGO_SETTINGS_MODULE is not set when running django-admin
> runserver
>
> Enter code here.(test1) 
> ioana.i@ioana-spamexperts:~/Workspace/Ioana/test1/test1$
>> django-admin runserver
>> Traceback (most recent call last):
>>   File "/home/ioana.i/Workspace/Ioana/test1/bin/django-admin", line
>> 8, in 
>> sys.exit(execute_from_command_line())
>>   File
>> "/home/ioana.i/Workspace/Ioana/test1/lib/python3.6/site-packages/django/core/management/__init__.py",
>> line 401, in execute_from_command_line
>> utility.execute()
>>   File
>> "/home/ioana.i/Workspace/Ioana/test1/lib/python3.6/site-packages/django/core/management/__init__.py",
>> line 395, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>   File
>> "/home/ioana.i/Workspace/Ioana/test1/lib/python3.6/site-packages/django/core/management/base.py",
>> line 328, in run_from_argv
>> self.execute(*args, **cmd_options)
>>   File
>> "/home/ioana.i/Workspace/Ioana/test1/lib/python3.6/site-packages/django/core/management/commands/runserver.py",
>> line 60, in execute
>> super().execute(*args, **options)
>>   File
>> "/home/ioana.i/Workspace/Ioana/test1/lib/python3.6/site-packages/django/core/management/base.py",
>> line 369, in execute
>> output = self.handle(*args, **options)
>>   File
>> "/home/ioana.i/Workspace/Ioana/test1/lib/python3.6/site-packages/django/core/management/commands/runserver.py",
>> line 67, in handle
>> if not settings.DEBUG and not settings.ALLOWED_HOSTS:
>>   File
>> "/home/ioana.i/Workspace/Ioana/test1/lib/python3.6/site-packages/django/conf/__init__.py",
>> line 76, in __getattr__
>> self._setup(name)
>>   File
>> "/home/ioana.i/Workspace/Ioana/test1/lib/python3.6/site-packages/django/conf/__init__.py",
>> line 61, in _setup
>>

Re: Django render a DynamoDB JSON into a HTML table

2020-04-19 Thread Daniel Pedrajas Pineda
Here the solution: 
https://stackoverflow.com/questions/61285947/django-render-a-dynamodb-json-into-a-html-table

Thank you to https://stackoverflow.com/users/6460856/swetank-poddar 

View.py:


def history(request):
 dynamodb_resource('dynamodb')
 history_table = dynamodb_resource.Table('name_of_the_table')
 all_items = history_table.scan()
 return render(request, 'history.html', { items: all_items['Items'] })


Your template:



  {% for item in items %}

{{ item.id }}
{{ item.agent }}
{{ item.date }}
{{ item.source }}

  {% endfor %}


El sábado, 18 de abril de 2020, 19:23:31 (UTC+2), Daniel Pedrajas Pineda 
escribió:
>
> I'm try to use a Django page as front-end using some AWS DynamoDB tables 
> as back-end. To do so, I use boto3 library and it gets the data from the 
> table correctly but I'm not able to parse the data into a HTML table. I 
> have the following in views.py
>
> def history(request):
>  itemsid = list()
>  agents = list()
>  dates = list()
>  source = list()
>  dynamodb_resource('dynamodb')
>  history_table = dynamodb_resource.Table('name_of_the_table')
>  all_items = history_table.scan()
>  for p in all_items['Items']:
>itemsid.append((p['id'])),
>agents.append((p['agent'])),
>dates.append((p['date'])),
>source.append((p['source']))
> return render(request, 'history.html', {'itemsid':itemsid, 
> 'agents':agents, 'dates':dates, 'source':source}
>
> The issue is that I don't know how to write the html code to show a table 
> with the rows: id, agent, date and source. 
>
> I have the following in history.html
>
>
> 
>   {% for i in itemsid %}
>   
> {{ i }}
> ...
>
> but I don't know how to code it (how to loop it) to show the table with 
> the lists as source. 
>
> Any idea please about how to parse a Json with the following format into a 
> HTML with Django and Python please?. 
>
> JSON from DynamoDB:
>
>
> {
>   'Items: [ {
> 'id': '94f'
> 'agent': 'aws'
> 'date': '04/05
> 'source': 'case1'
>   }, {
> 'id': 'lk42'
>   ...
> Thank you so much. I'm new in Django and in programming in general so any 
> help is much appreciate. 
>
>
>
>

-- 
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/a301efc4-5c67-402d-8986-59faddbc482d%40googlegroups.com.


Django render a DynamoDB JSON into a HTML table

2020-04-18 Thread Daniel Pedrajas Pineda
I'm try to use a Django page as front-end using some AWS DynamoDB tables as 
back-end. To do so, I use boto3 library and it gets the data from the table 
correctly but I'm not able to parse the data into a HTML table. I have the 
following in views.py

def history(request):
 itemsid = list()
 agents = list()
 dates = list()
 source = list()
 dynamodb_resource('dynamodb')
 history_table = dynamodb_resource.Table('name_of_the_table')
 all_items = history_table.scan()
 for p in all_items['Items']:
   itemsid.append((p['id'])),
   agents.append((p['agent'])),
   dates.append((p['date'])),
   source.append((p['source']))
return render(request, 'history.html', {'itemsid':itemsid, 'agents':agents, 
'dates':dates, 'source':source}

The issue is that I don't know how to write the html code to show a table 
with the rows: id, agent, date and source. 

I have the following in history.html



  {% for i in itemsid %}
  
{{ i }}
...

but I don't know how to code it (how to loop it) to show the table with the 
lists as source. 

Any idea please about how to parse a Json with the following format into a 
HTML with Django and Python please?. 

JSON from DynamoDB:


{
  'Items: [ {
'id': '94f'
'agent': 'aws'
'date': '04/05
'source': 'case1'
  }, {
'id': 'lk42'
  ...
Thank you so much. I'm new in Django and in programming in general so any help 
is much appreciate. 



-- 
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/0dcfb1d9-a08c-4a90-9be4-cc968f44540d%40googlegroups.com.


Re: Request to be added to the Django organisation on GitHub

2020-04-08 Thread Nwaobi Daniel
Thanks

On Wed, Apr 8, 2020, 5:36 PM Dylan Reinhold  wrote:

> If you are looking to contribute to django please see :
> https://docs.djangoproject.com/en/dev/internals/contributing/
>
> If you just want to use it and code with it, see
> https://www.djangoproject.com/start/
>
> Regards,
> Dylan
>
> On Wed, Apr 8, 2020 at 9:08 AM Nwaobi Daniel 
> wrote:
>
>> Hi! Goodday,
>>
>> I would love to be part of the django organisation on GitHub, if it's
>> possible though. My username is CrazyChickenDev on github and i would
>> really appreciate it if my request is considered.
>>
>> 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/a40e98a6-d60a-4760-b103-e8a469cbe6ee%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/a40e98a6-d60a-4760-b103-e8a469cbe6ee%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/CAHtg44DdESYcjowhSgnVaFPjLCCzUqcyYDxZ_RetDg%2BK%3D%3D7T6g%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAHtg44DdESYcjowhSgnVaFPjLCCzUqcyYDxZ_RetDg%2BK%3D%3D7T6g%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/CANMiDf9icOWGoAGNue5Cw562vD%2Bj%2Bz0twqufOrtR2aW-uLJizQ%40mail.gmail.com.


Request to be added to the Django organisation on GitHub

2020-04-08 Thread Nwaobi Daniel
Hi! Goodday,

I would love to be part of the django organisation on GitHub, if it's 
possible though. My username is CrazyChickenDev on github and i would 
really appreciate it if my request is considered.

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/a40e98a6-d60a-4760-b103-e8a469cbe6ee%40googlegroups.com.


Re: I have issue. I want to migrate database from sqlite3 to postgresql. With a table have 10M records. I need a solution for issue. Maybe help me?

2020-03-26 Thread Daniel Chimeno
One possible solution:

$ createdb newdb
$ pgloader ./test/sqlite/sqlite.db postgresql:///newdb

https://github.com/dimitri/pgloader



El miércoles, 25 de marzo de 2020, 17:45:54 (UTC+1), Thắng IT escribió:
>
> solution

-- 
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/3435d5bf-0422-4be0-afd5-e61b13460ea1%40googlegroups.com.


Re: Django Tutorial

2020-03-19 Thread Daniel Hepper
There seems to be an equal sign missing after “name”:

path('', views.index, name='index')

> Am 19.03.2020 um 14:13 schrieb Eddie Nash :
> 
> 
> I am going through the tutorial yet when I check to see if it is working, I 
> get this error code. Please help me fix this!
> 
> 
> Exception in thread django-main-thread:
> Traceback (most recent call last):
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py",
>  line 932, in _bootstra
> p_inner
> self.run()
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/threading.py",
>  line 870, in run
> self._target(*self._args, **self._kwargs)
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/utils/autoreload
> .py", line 53, in wrapper
> fn(*args, **kwargs)
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/core/management/
> commands/runserver.py", line 117, in inner_run
> 
> self.check(display_num_errors=True)
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/core/management/
> base.py", line 392, in check
> all_issues = self._run_checks(
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/core/management/
> base.py", line 382, in _run_checks
> return checks.run_checks(**kwargs)
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/core/checks/regi
> stry.py", line 72, in run_checks
> new_errors = check(app_configs=app_configs)
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/core/checks/urls
> .py", line 40, in check_url_namespaces_unique
> all_namespaces = _load_all_namespaces(resolver)
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/core/checks/urls
> .py", line 57, in _load_all_namespaces
> url_patterns = getattr(resolver, 'url_patterns', [])
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/utils/functional
> .py", line 48, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/urls/resolvers.p
> y", line 588, in url_patterns
> patterns = getattr(self.urlconf_module, "urlpatterns", 
> self.urlconf_module)
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/utils/functional
> .py", line 48, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/urls/resolvers.p
> y", line 581, in urlconf_module
> return import_module(self.urlconf_name)
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py",
>  line 127, in
> import_module
> return _bootstrap._gcd_import(name[level:], package, level)
> 
>   File "", line 1014, in _gcd_import
>   File "", line 991, in _find_and_load
>   File "", line 975, in _find_and_load_unlocked
>   File "", line 671, in _load_unlocked
>   File "", line 783, in exec_module
>   File "", line 219, in _call_with_frames_removed
>   File "/Users/michellenash/Desktop/Eddie/github/mysite/mysite/urls.py", line 
> 20, in 
> path('polls/', include('polls.urls')),
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/urls/conf.py",
>  l
> ine 34, in include
> urlconf_module = import_module(urlconf_module)
>   File 
> "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py",
>  line 127, in
> import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 1014, in _gcd_import
>   File "", line 991, in _find_and_load
>   File "", line 975, in _find_and_load_unlocked
>   File "", line 671, in _load_unlocked
> File "", line 779, in exec_module
>   File "", line 916, in get_code
>   File "", line 846, in source_to_code
>   File "", line 219, in _call_with_frames_removed
>   File "/Users/michellenash/Desktop/Eddie/github/mysite/polls/urls.py", line 6
> path('', views.index, name'index')
>   ^
> SyntaxError: invalid syntax
> -- 
> 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/fcf08b9d-587f-4fab-a79c-b0325845b036%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 

RE: Re: Problem

2020-03-16 Thread Daniel Chiemelu
So after creating the virtual environment what is next on installing django Sent from Mail for Windows 10 From: Phako PerezSent: Monday, March 16, 2020 8:42 PMSubject: Re: Problem What’s the problem??? Using python 3 you can create an environment as python3 -m venv my_env Kindly send an error or what is the issue you face while trying to create the env, so will be more easy to help, otherwise this question you can search on google for a beginner tutorial RegardsSent from my iPhoneOn 16 Mar 2020, at 13:34, Daniel Chiemelu  wrote:Please I am new in Django and I am finding it difficult to create a virtual environment and also install Django and I had a virtual environment that I created before using Flask Sent from Mail for Windows 10  Virus-free. www.avast.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/5e6fd482.1c69fb81.b9f97.42e4%40mx.google.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/84A00726-EAF0-4D71-9CB6-2B9A0BD63184%40gmail.com. 



-- 
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5e6fda79.1c69fb81.ee8e8.440a%40mx.google.com.


Problem

2020-03-16 Thread Daniel Chiemelu
Please I am new in Django and I am finding it difficult to create a virtual environment and also install Django and I had a virtual environment that I created before using Flask Sent from Mail for Windows 10 

	

		Virus-free. www.avast.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/5e6fd482.1c69fb81.b9f97.42e4%40mx.google.com.


Re: http post request 415: unsupportesd media

2020-03-16 Thread Onyore Daniel
working on it

On Monday, March 16, 2020 at 1:57:06 PM UTC+3, Harsh Tibrewal wrote:
>
> I am trying to send a post request in django rest API with mongoengine, 
> while sending a POST request with the following data an 415 status code is 
> returned
>
> {
>   orderId: sample2,
>   restaurantId: cartssj,
>   dateTime: fdsfd,
>   status: pending,
>   cartItems: [
> {
>   "itemId": "1001",
>   "itemName": "Onion",
>   "requestedQty": "1",
>   "fulfilledQty": "1",
>   "pricePerUnit": "78"
> },
> {
>   "itemId": "1002",
>   "itemName": "Potato",
>   "requestedQty": "1",
>   "fulfilledQty": "1",
>   "pricePerUnit": "35"
> },
> {
>   "itemId": "1003",
>   "itemName": "Carrot",
>   "requestedQty": "1",
>   "fulfilledQty": "1",
>   "pricePerUnit": "78"
> },
> {
>   "itemId": "1004",
>   "itemName": "Toamto",
>   "requestedQty": "1",
>   "fulfilledQty": "1",
>   "pricePerUnit": "90"
> }
>   ],
>   total: 281.0
> }
>
> the models have been defined as follows ini django:
>
>
> from django.db import models
> from mongoengine import Document,fields,EmbeddedDocument,
> EmbeddedDocumentListField
>
>
> class CartItem(EmbeddedDocument):
> itemId = fields.StringField(max_length=254,uniique=True)
> itemName = fields.StringField(max_length=254)
> requestedQty = fields.StringField(max_length=100)
> fulfilledQty = fields.StringField(max_length=100)
> pricePerUnit = fields.StringField(max_length=100)
>
>
>
>
>
>
> class Order(Document):
> orderId = fields.StringField(max_length=254)
> restaurantId = fields.StringField(max_length=100)
> dateTime = fields.StringField(max_length=254)
> status = fields.StringField(max_length=254)
> cartItems = fields.EmbeddedDocumentListField(CartItem)
> total = fields.StringField(max_length=254)
> meta = {'collection': 'orders'}
>
>
> PLease help me solve this error
>

-- 
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/a6529746-9471-4f98-9d4c-bf6b508bb0b3%40googlegroups.com.


Crime Prediction System

2020-03-16 Thread Onyore Daniel
Hey,
anyone with source code for crime prediction system, kindly send me a 
downloaded link.

-- 
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/f7b20cc5-677a-4f98-90cf-af26c5d883f8%40googlegroups.com.


JavaScript linking

2020-03-13 Thread Daniel Chiemelu
Please how can I link JavaScript to my project when I stored my JavaScript
in my static folder/JS subdirectory

-- 
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/CABukqF5vJdxtSXwwhob3%3DjbjLVPNyWmhBteNAKkMKj427curdw%40mail.gmail.com.


Re: Integrating Django Rest Framework with Microsoft Office 365

2020-03-02 Thread DANIEL URBANO DE LA RUA
https://realpython.com/manage-users-in-django-admin/

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


Re: Error messages in SetPasswordForm

2020-02-05 Thread Daniel Germano Travieso
It is my belief, if I remember correctly, that the construct _()
allows for usage of unicode direct text, and such, makes it possible to
directly insert any special characters in the text. So for ease of
understanding, the special character was used in a way that does not
confuse the reader and spares them of trying to parse/remember what the
construction of escaped characters are.

But I could be wrong as I do not work on the belly of Django development.
*[]'s*
Daniel Germano Travieso

-BEGIN PGP PUBLIC KEY BLOCK-

mQINBF1hSUIBEAC56ve8/8fAt55s+PHuolumg8zvjqk0cpo36DXkntP1fqlY5DdP
36sfvL/pJgt+x480Wy6YVdj1T/N7c3WxcUx6D+oh8ZBmeG2eoeJli1BT/QDrLyt/
af0djw/VMc5ygV0Lg6zg8ynNn+mjhcDMFyl7ITZeYgXXX3fO7I87geAdWmb9sX4W
C7qfRi23PQZ/0vKlv9WSlzvOMDcB0g3aoxuYmhbZ5KlRlrQYVeW1rcQHP6CGrVFs
9/FAvjw2rj+vsS7w0CjmF1Q5XZ/MWrx3I17RXojkBeDQElLA7y732G4wk7WS60wE
NLuEclHieSs780bWdIRwYW7i0mmYAjnO9eRzMfhRtykcbJBy0Nodr1c15Qa2LKFr
ZUk9kil3utKTYaU3kUbe+M2VQXthw0Vvb5NWagsNAZdOwBWsHY56bvsy5pCUtS9a
NE8WZEt8UEU4IF93RATMXl+BxtIgQOWDPmXkt/bqLk4U01+70AFdszanGkyZgFyn
VOr44gBM9+78SEOf/exiKLnZuv4VEtt5fUniwRkSSRaMCuEVk3JlBAbVY22d9Lzu
c3i6g2yWZuqIXnsIwhw/g62uDE+yWGnYzM5Kn8fCAkmcyKG8qHSlqtiOnN0yzMj0
aV1DZ5pR3MESa0HWQnechUvnD0KdT/pD3qOvHZYsbOTXqDz6J+r3JK1+FQARAQAB
tE1EYW5pZWwgR2VybWFubyBUcmF2aWVzbyAoRGFuaWVsIFRyYXZpZXNvJ3MgSW5i
b3gpIDxkYW5pZWxndHJhdmllc29AZ21haWwuY29tPokCVAQTAQgAPhYhBAeImfqY
0eaSaZ3kJtqQme6v6yE1BQJdYUlCAhsDBQkJZgGABQsJCAcCBhUKCQgLAgQWAgMB
Ah4BAheAAAoJENqQme6v6yE1Yu8P/RK5CY5Pxo2u+0ulw1MDU0AeFyb8sHGqFHCG
LGjReaGmG3HY5rzEOYsgfcPCAUz5P03Qj3Peypr2QN4RAJnOXTUJINmPjxsDfp2O
2z4p6gt9rCDhschoIIJSuy3LyZdfNQN/8jMGMY5wslV6UA1s5+AEFNJ0H3n372Em
hvrAj2ZRG35/tSzkHNqPpNNJWxEQK/UL0JwBIdkf1OG3sTTphOoyuqjTtn1rRp42
7xBGHh8diidJazFY0gDLr9hoXZSDuj8MTvY5MsnT3rsaNnDfXQWqo+cJyySOGWLi
C03dQ0ynIbdRCWyKNsgPnxQAVxzGINxTmk2zk1M6RIO26y6oC1zEQ3WhZm2HnjlM
pnjb3gST2q5VshRToQ22eZc8JGFFldsRiNGh4rtgMu5xvtD36THz58lqXn4CcP9Z
TNoVBuSAd7V6RwZDi38fI4ePUxJQrywk4xcT8gr8tLNjadtcwgGpotoX7xVamP/I
Dj3URPWUW4dhXTHcXj2TQvw1+yFEGvwRqs2NPySlZA5xv5Z3oyQdoKXAD44Amcop
Tvaimw1599EtVMdy5mSNCXuSKckUT9E/lg2aqOJSDbZBJRO4F7ERK+Zl54mxrnKm
ESwM5P8WDUreYRTOLjNF0aONjcYrWYpNCEzxHKfKN0w6+oSv/oCZY3lgIgUz11Mo
9A20mUwDuQINBF1hSUIBEADAmuIB3JUmtpXuzYCEqGl3vLWokxVYsRBSyFE9UqOw
XEXgvBaVPtBoAaEPiYl1ZcjlWa1gVpKRs3uNzgpZq/tUwXXJ57Gb60FZIlysYTwK
AOIt6huTt+ePh3gV1V+8Q7avQxwnqkR17pllwuxT4YxUhiAownd+saHWzt4zvNkn
31jk3FlkJN7YHiW6qZYBfIqBhcRen/Jx4G7WjznGQrPcUW6xTw8yQePRKXMOqMHM
+Na2ZMKdAx+hV8ZVguwfYJd/D1LhyUZQJ+tZIjtrXAtX2piKgMP9mgjHDrm2gTjj
EMsVfeH+J5HzsRFNWW7BV4ZNt8IrmU8j9TFGYB+CbhNPLqFnSgV4MeMBDP86Nlkh
DK27CYguNqPb3+7SjA85V6+JzEjYz8Xc860VYiw6e953bByu2FsPGXanggM8+CQQ
qjd6ApT921h76raVXQ/VsHctE/DYDwdBppTMk23WMLyGR3rpTUINM7NmmhCuOK2i
LhWq09TE48byxImSnwRpTxCSumhApIi76edDjmlKNqO9hNBArHs+03ExbjOWaQre
xynThWwcVN9FdqGL6CfIVEgk4FihNIlvVeu1AN1YcwYBtgSyc8Iz6NymngqgYkOI
STZ3wrMXaA17bfT+OTPebxRBzW43/BeoHVXkwhY+h+pWdjaEvbJWAzVl+CGfrgUt
OQARAQABiQI8BBgBCAAmFiEEB4iZ+pjR5pJpneQm2pCZ7q/rITUFAl1hSUICGwwF
CQlmAYAACgkQ2pCZ7q/rITW09g//Zl3QOtt+e5swVD3Vp7sZiGiueiJQVieVdY1F
JJFnpgZxyLn3fBAyc1dgBP/k9hUVwQUP/415zr+6zRYROku7lLXGDTaDHbkAprEL
m8HTBfYdyhSk5JW8W1luylkzB/6beIytxG28Y02xG+1X0t3k86la8FGfYBIYcNrX
2RwFjUt5FGMcGOtoU45/RcDOUEOxdMcCJQhpgavONpBDMjEIPVYUi8CPnJR/HUkO
FRHf/9S22mnNG8m/+jMC4TaM2OzU70yfW7u3n9UcHracSc6CbdMayXD//NHpOQtL
hP/K1G+azAQKwb/+n22U7M7mQets6VVOu5x9VOkpsK26CwZ79pB7DaJicaunO8Nl
VG/DCRDGhk207ULQdA0jMr6XDofYA/9mleFRp3UVoIp5DTNa/eivXZQhzWtkW66s
RUB2Du3S2shyhuOIxRW5M4zgUNMe8pDTQRbm0oBfrFjoX7K+F5G4wgaEnXqp3d6O
WzzgvqYDzTqkJtyfF0A8PaiYWyBpOa6zTNtRwkrxsL+Ley/dRyMZeeCG20gsuHqy
DOLjz01uVuOg2B7+oJrYQkBMYc/n9s9z+O0GjQR+WKan1NgSwrSedPd52/FiPvT1
PPqlAem1Xs8EfBDgdVT4u1nbItbJGfR+5OU6xAgDH09ylwmV6bnOJtHFzjnqUK7P
4buoGc4=
=bYtC
-END PGP PUBLIC KEY BLOCK-



Em qua., 5 de fev. de 2020 às 14:40, One Above All <
the.one.above.all.ti...@gmail.com> escreveu:

> In *django.contrib.auth.forms* there is a class named *SetPasswordForm*
> which has a dictionary member *error_messages*. It is defined as follows:
> *error_messages = {*
> *'password_mismatch': _('The two password fields didn’t match.'),*
> *}*
> A special character has been used for apostrophe instead of \' . Is this a
> design decision? It might create extending this class further and
> development difficult for new comers.
> If I am missing something or it is already known kindly provide reference
> to that.
>
> Regards,
> Gagan Deep
>
> --
> 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/8847e13f-3d31-40e3-aed0-e5b06ce7b3f8%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/8847e13f-3d31-40e3-aed0-e5b06ce7b3f8%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
Y

Re: How to express `foo = (bar < quox)` as a constraint

2020-01-27 Thread DANIEL URBANO DE LA RUA
sorry i diin't read to Stephen his trik is even better hahahaha but with
sigñal yo ca do other thing

El lun., 27 ene. 2020 a las 19:02, DANIEL URBANO DE LA RUA (<
dannybombas...@gmail.com>) escribió:

> you can do few thing at the same time in a model before save or whenever
> you want
>
> El lun., 27 ene. 2020 a las 19:01, DANIEL URBANO DE LA RUA (<
> dannybombas...@gmail.com>) escribió:
>
>> it is goin to be better and less cost for the db
>>
>> El lun., 27 ene. 2020 a las 19:01, DANIEL URBANO DE LA RUA (<
>> dannybombas...@gmail.com>) escribió:
>>
>>> take a look at this
>>> https://docs.djangoproject.com/en/3.0/topics/signals/
>>>
>>>
>>> El lun., 27 ene. 2020 a las 18:59, Stephen J. Butler (<
>>> stephen.but...@gmail.com>) escribió:
>>>
>>>> Frankly, if is_on_sale has such a tight constraint I wouldn't have it
>>>> as its own column. Why not just make it an annotated field with an F
>>>> expression?
>>>>
>>>>
>>>> https://docs.djangoproject.com/en/3.0/ref/models/expressions/#using-f-with-annotations
>>>>
>>>> Item.objects.annotate(is_on_sale=(F('price') < F('full_price')))
>>>>
>>>>
>>>>
>>>> On Mon, Jan 27, 2020 at 11:47 AM Peter Law  wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Thanks for adding support for check constraints in Django 2.2, it's
>>>>> great to be able to move constraints into the model definitions.
>>>>>
>>>>> I've been trying to work out how to express a constraint which
>>>>> validates that the value of one field expresses a relation between two
>>>>> other fields, but can't find a nice way to do so.
>>>>>
>>>>> I've read through the docs and also found
>>>>> https://groups.google.com/d/topic/django-users/6Olh5V1b7Us/discussion,
>>>>> but haven't found a concise spelling.
>>>>>
>>>>> I've got a model like:
>>>>>
>>>>> ```
>>>>> class Item(Model):
>>>>> price = DecimalField()
>>>>> full_price = DecimalField()
>>>>> is_on_sale = BooleanField()
>>>>> ```
>>>>>
>>>>> I'd like to be able to express neatly that the `is_on_sale` boolean be
>>>>> true only when `price < full_price`.
>>>>> In Postgres I can express this as:
>>>>>
>>>>> ```
>>>>> ALTER TABLE item
>>>>> ADD CONSTRAINT is_on_sale_check
>>>>> CHECK (is_on_sale = (price < full_price))
>>>>> ```
>>>>>
>>>>> However in Django I can't find a way to express this directly.
>>>>>
>>>>> I did find a long spelling which essentially checks the True case and
>>>>> the False case explicitly and then ORs them together, however it's
>>>>> several lines of `models.Q` combinations and not at all clear about
>>>>> what the code is trying to achieve.
>>>>>
>>>>> Is there a concise way to do this sort of constraint? If not, would it
>>>>> be possible for Django to add support for it?
>>>>>
>>>>> Thanks,
>>>>> Peter
>>>>>
>>>>> --
>>>>> 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/CAEMtty7rsf2qk_0qXnzqZdA89e6VRCqF%2B4nQSHgxVCE4XfKAnw%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/CAD4ANxWtpqnDr_8WrQiskH7wXxBPyJ3sTWa%2BAsK1592SXWTfpw%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAD4ANxWtpqnDr_8WrQiskH7wXxBPyJ3sTWa%2BAsK1592SXWTfpw%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/CAO_yRT1vDfqo2vRtmgUcwzc9FndWAgd3qZkxvxYptSFvcjDNKg%40mail.gmail.com.


Re: How to express `foo = (bar < quox)` as a constraint

2020-01-27 Thread DANIEL URBANO DE LA RUA
you can do few thing at the same time in a model before save or whenever
you want

El lun., 27 ene. 2020 a las 19:01, DANIEL URBANO DE LA RUA (<
dannybombas...@gmail.com>) escribió:

> it is goin to be better and less cost for the db
>
> El lun., 27 ene. 2020 a las 19:01, DANIEL URBANO DE LA RUA (<
> dannybombas...@gmail.com>) escribió:
>
>> take a look at this https://docs.djangoproject.com/en/3.0/topics/signals/
>>
>>
>> El lun., 27 ene. 2020 a las 18:59, Stephen J. Butler (<
>> stephen.but...@gmail.com>) escribió:
>>
>>> Frankly, if is_on_sale has such a tight constraint I wouldn't have it as
>>> its own column. Why not just make it an annotated field with an F
>>> expression?
>>>
>>>
>>> https://docs.djangoproject.com/en/3.0/ref/models/expressions/#using-f-with-annotations
>>>
>>> Item.objects.annotate(is_on_sale=(F('price') < F('full_price')))
>>>
>>>
>>>
>>> On Mon, Jan 27, 2020 at 11:47 AM Peter Law  wrote:
>>>
>>>> Hi,
>>>>
>>>> Thanks for adding support for check constraints in Django 2.2, it's
>>>> great to be able to move constraints into the model definitions.
>>>>
>>>> I've been trying to work out how to express a constraint which
>>>> validates that the value of one field expresses a relation between two
>>>> other fields, but can't find a nice way to do so.
>>>>
>>>> I've read through the docs and also found
>>>> https://groups.google.com/d/topic/django-users/6Olh5V1b7Us/discussion,
>>>> but haven't found a concise spelling.
>>>>
>>>> I've got a model like:
>>>>
>>>> ```
>>>> class Item(Model):
>>>> price = DecimalField()
>>>> full_price = DecimalField()
>>>> is_on_sale = BooleanField()
>>>> ```
>>>>
>>>> I'd like to be able to express neatly that the `is_on_sale` boolean be
>>>> true only when `price < full_price`.
>>>> In Postgres I can express this as:
>>>>
>>>> ```
>>>> ALTER TABLE item
>>>> ADD CONSTRAINT is_on_sale_check
>>>> CHECK (is_on_sale = (price < full_price))
>>>> ```
>>>>
>>>> However in Django I can't find a way to express this directly.
>>>>
>>>> I did find a long spelling which essentially checks the True case and
>>>> the False case explicitly and then ORs them together, however it's
>>>> several lines of `models.Q` combinations and not at all clear about
>>>> what the code is trying to achieve.
>>>>
>>>> Is there a concise way to do this sort of constraint? If not, would it
>>>> be possible for Django to add support for it?
>>>>
>>>> Thanks,
>>>> Peter
>>>>
>>>> --
>>>> 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/CAEMtty7rsf2qk_0qXnzqZdA89e6VRCqF%2B4nQSHgxVCE4XfKAnw%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/CAD4ANxWtpqnDr_8WrQiskH7wXxBPyJ3sTWa%2BAsK1592SXWTfpw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAD4ANxWtpqnDr_8WrQiskH7wXxBPyJ3sTWa%2BAsK1592SXWTfpw%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/CAO_yRT2MBbAA5J2GX%2B8%2Bjy-W%3Dirk-XBSQNVD7_AEczWTE2492g%40mail.gmail.com.


Re: How to express `foo = (bar < quox)` as a constraint

2020-01-27 Thread DANIEL URBANO DE LA RUA
take a look at this https://docs.djangoproject.com/en/3.0/topics/signals/


El lun., 27 ene. 2020 a las 18:59, Stephen J. Butler (<
stephen.but...@gmail.com>) escribió:

> Frankly, if is_on_sale has such a tight constraint I wouldn't have it as
> its own column. Why not just make it an annotated field with an F
> expression?
>
>
> https://docs.djangoproject.com/en/3.0/ref/models/expressions/#using-f-with-annotations
>
> Item.objects.annotate(is_on_sale=(F('price') < F('full_price')))
>
>
>
> On Mon, Jan 27, 2020 at 11:47 AM Peter Law  wrote:
>
>> Hi,
>>
>> Thanks for adding support for check constraints in Django 2.2, it's
>> great to be able to move constraints into the model definitions.
>>
>> I've been trying to work out how to express a constraint which
>> validates that the value of one field expresses a relation between two
>> other fields, but can't find a nice way to do so.
>>
>> I've read through the docs and also found
>> https://groups.google.com/d/topic/django-users/6Olh5V1b7Us/discussion,
>> but haven't found a concise spelling.
>>
>> I've got a model like:
>>
>> ```
>> class Item(Model):
>> price = DecimalField()
>> full_price = DecimalField()
>> is_on_sale = BooleanField()
>> ```
>>
>> I'd like to be able to express neatly that the `is_on_sale` boolean be
>> true only when `price < full_price`.
>> In Postgres I can express this as:
>>
>> ```
>> ALTER TABLE item
>> ADD CONSTRAINT is_on_sale_check
>> CHECK (is_on_sale = (price < full_price))
>> ```
>>
>> However in Django I can't find a way to express this directly.
>>
>> I did find a long spelling which essentially checks the True case and
>> the False case explicitly and then ORs them together, however it's
>> several lines of `models.Q` combinations and not at all clear about
>> what the code is trying to achieve.
>>
>> Is there a concise way to do this sort of constraint? If not, would it
>> be possible for Django to add support for it?
>>
>> Thanks,
>> Peter
>>
>> --
>> 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/CAEMtty7rsf2qk_0qXnzqZdA89e6VRCqF%2B4nQSHgxVCE4XfKAnw%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/CAD4ANxWtpqnDr_8WrQiskH7wXxBPyJ3sTWa%2BAsK1592SXWTfpw%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/CAO_yRT1F09KXXAJ9e_tdGzxjpy9TBf5B6%3D-Yyzp-Swepybay5w%40mail.gmail.com.


Re: How to express `foo = (bar < quox)` as a constraint

2020-01-27 Thread DANIEL URBANO DE LA RUA
it is goin to be better and less cost for the db

El lun., 27 ene. 2020 a las 19:01, DANIEL URBANO DE LA RUA (<
dannybombas...@gmail.com>) escribió:

> take a look at this https://docs.djangoproject.com/en/3.0/topics/signals/
>
>
> El lun., 27 ene. 2020 a las 18:59, Stephen J. Butler (<
> stephen.but...@gmail.com>) escribió:
>
>> Frankly, if is_on_sale has such a tight constraint I wouldn't have it as
>> its own column. Why not just make it an annotated field with an F
>> expression?
>>
>>
>> https://docs.djangoproject.com/en/3.0/ref/models/expressions/#using-f-with-annotations
>>
>> Item.objects.annotate(is_on_sale=(F('price') < F('full_price')))
>>
>>
>>
>> On Mon, Jan 27, 2020 at 11:47 AM Peter Law  wrote:
>>
>>> Hi,
>>>
>>> Thanks for adding support for check constraints in Django 2.2, it's
>>> great to be able to move constraints into the model definitions.
>>>
>>> I've been trying to work out how to express a constraint which
>>> validates that the value of one field expresses a relation between two
>>> other fields, but can't find a nice way to do so.
>>>
>>> I've read through the docs and also found
>>> https://groups.google.com/d/topic/django-users/6Olh5V1b7Us/discussion,
>>> but haven't found a concise spelling.
>>>
>>> I've got a model like:
>>>
>>> ```
>>> class Item(Model):
>>> price = DecimalField()
>>> full_price = DecimalField()
>>> is_on_sale = BooleanField()
>>> ```
>>>
>>> I'd like to be able to express neatly that the `is_on_sale` boolean be
>>> true only when `price < full_price`.
>>> In Postgres I can express this as:
>>>
>>> ```
>>> ALTER TABLE item
>>> ADD CONSTRAINT is_on_sale_check
>>> CHECK (is_on_sale = (price < full_price))
>>> ```
>>>
>>> However in Django I can't find a way to express this directly.
>>>
>>> I did find a long spelling which essentially checks the True case and
>>> the False case explicitly and then ORs them together, however it's
>>> several lines of `models.Q` combinations and not at all clear about
>>> what the code is trying to achieve.
>>>
>>> Is there a concise way to do this sort of constraint? If not, would it
>>> be possible for Django to add support for it?
>>>
>>> Thanks,
>>> Peter
>>>
>>> --
>>> 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/CAEMtty7rsf2qk_0qXnzqZdA89e6VRCqF%2B4nQSHgxVCE4XfKAnw%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/CAD4ANxWtpqnDr_8WrQiskH7wXxBPyJ3sTWa%2BAsK1592SXWTfpw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAD4ANxWtpqnDr_8WrQiskH7wXxBPyJ3sTWa%2BAsK1592SXWTfpw%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/CAO_yRT3RetnT%3De3UU80bSUaiofnzcT7%2Bqbz5COuThcSd0Zt-Bw%40mail.gmail.com.


Re: Separa Fecha y Hora en dos inputs utilizando ModelsForm

2020-01-23 Thread DANIEL URBANO DE LA RUA
https://docs.djangoproject.com/en/3.0/howto/custom-template-tags/
mira bien aqui tu pudes facbicarte uno para separara la hora y la devuelves
a la vista en tiempo de ejecucion osea cuando se renderiza tu pagina creas
un archivo y lo instancias {% tag_template_name  args kwars %} puedes tomar
el string y devover lo que quieras que se renderize


un ujeplo de archivo

from django import template
from django.utils import timezone
from datetime import timedelta, date
register = template.Library()

@register.filter
def to_and(value):
value = str(value)
return value.replace(",",".")



@register.filter
def many_days(value):
today = timezone.localtime()
fecha = value - today
if fecha.days >= 0:
if fecha.days == 0:
fecha = 'Llegan Hoy'
else:
fecha = "Quedan :"+str(fecha.days)+' Dias y '+str(((str(fecha).split(','))[1
].split('.')[0]))+" h/mm"
else:
fecha = value
return fecha


El jue., 23 ene. 2020 a las 21:22, DANIEL URBANO DE LA RUA (<
dannybombas...@gmail.com>) escribió:

> Create un tag template espera te mando doc
>
> On Thu, 23 Jan 2020, 19:38 Tatiana Mesa,  wrote:
>
>> Hola Daniel, gracias por la rápida respuesta
>>
>> Tengo el campo* DateTimeField* que trae la fecha y la hora en el mismo
>> campo. Quiero separarlos solo en la vista del Html. Sin modificar el tipo
>> de dato.
>>
>> Agradezco tu respuesta.
>>
>> El jue., 23 de ene. de 2020 a la(s) 12:27, DANIEL URBANO DE LA RUA (
>> dannybombas...@gmail.com) escribió:
>>
>>>
>>> https://docs.djangoproject.com/en/3.0/ref/forms/fields/#django.forms.TimeField
>>>
>>>
>>> El jue., 23 ene. 2020 a las 18:24, DANIEL URBANO DE LA RUA (<
>>> dannybombas...@gmail.com>) escribió:
>>>
>>>> https://www.geeksforgeeks.org/timefield-django-models/
>>>>
>>>>
>>>> El jue., 23 ene. 2020 a las 18:19, DANIEL URBANO DE LA RUA (<
>>>> dannybombas...@gmail.com>) escribió:
>>>>
>>>>> Tienes date and time field
>>>>>
>>>>> On Thu, 23 Jan 2020, 15:57 Tatiana Mesa, 
>>>>> wrote:
>>>>>
>>>>>> Buenas tardes comunidad,
>>>>>>
>>>>>> He empezado a trabajar con vistas basadas en clases en Django y tengo
>>>>>> una pequeña complicación.
>>>>>>
>>>>>> Quisiera saber de que forma puedo separar un campo *fecha (*
>>>>>> DateTimeField*), *en un input la feha y en otro input la hora en una
>>>>>> vista de *HTML.*
>>>>>>
>>>>>>
>>>>>>
>>>>>> Tengo en mi modelo un campo de *Fecha*
>>>>>> [image: image.png]
>>>>>>  Y tengo un formulario para realizar updates
>>>>>> [image: image.png]
>>>>>>
>>>>>> Les agradezco mucho sus respuestas.
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> 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/CAHAr%3D_3CbZXT9x_NXQ-MJH8U3tJz7JEJj3-JxBuBx_s7JxUwqQ%40mail.gmail.com
>>>>>> <https://groups.google.com/d/msgid/django-users/CAHAr%3D_3CbZXT9x_NXQ-MJH8U3tJz7JEJj3-JxBuBx_s7JxUwqQ%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/CAO_yRT3twv2oPWkp_hRjsm4K433QFj_U6w%2B5-fqjytNBNOSdgw%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAO_yRT3twv2oPWkp_hRjsm4K433QFj_U6w%2B5-fqjytNBNOSdgw%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/CAHAr%3D_2OBLQmNVD9pMaXtBor_1U7FZh8%3DgOXUenPLoCyxH1fuw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAHAr%3D_2OBLQmNVD9pMaXtBor_1U7FZh8%3DgOXUenPLoCyxH1fuw%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/CAO_yRT2Q69rsFhLCBduVZkf%2BfMjmBXAGJG9Ju6NHGcjoLGxGfQ%40mail.gmail.com.


Re: Separa Fecha y Hora en dos inputs utilizando ModelsForm

2020-01-23 Thread DANIEL URBANO DE LA RUA
Create un tag template espera te mando doc

On Thu, 23 Jan 2020, 19:38 Tatiana Mesa,  wrote:

> Hola Daniel, gracias por la rápida respuesta
>
> Tengo el campo* DateTimeField* que trae la fecha y la hora en el mismo
> campo. Quiero separarlos solo en la vista del Html. Sin modificar el tipo
> de dato.
>
> Agradezco tu respuesta.
>
> El jue., 23 de ene. de 2020 a la(s) 12:27, DANIEL URBANO DE LA RUA (
> dannybombas...@gmail.com) escribió:
>
>>
>> https://docs.djangoproject.com/en/3.0/ref/forms/fields/#django.forms.TimeField
>>
>>
>> El jue., 23 ene. 2020 a las 18:24, DANIEL URBANO DE LA RUA (<
>> dannybombas...@gmail.com>) escribió:
>>
>>> https://www.geeksforgeeks.org/timefield-django-models/
>>>
>>>
>>> El jue., 23 ene. 2020 a las 18:19, DANIEL URBANO DE LA RUA (<
>>> dannybombas...@gmail.com>) escribió:
>>>
>>>> Tienes date and time field
>>>>
>>>> On Thu, 23 Jan 2020, 15:57 Tatiana Mesa, 
>>>> wrote:
>>>>
>>>>> Buenas tardes comunidad,
>>>>>
>>>>> He empezado a trabajar con vistas basadas en clases en Django y tengo
>>>>> una pequeña complicación.
>>>>>
>>>>> Quisiera saber de que forma puedo separar un campo *fecha (*
>>>>> DateTimeField*), *en un input la feha y en otro input la hora en una
>>>>> vista de *HTML.*
>>>>>
>>>>>
>>>>>
>>>>> Tengo en mi modelo un campo de *Fecha*
>>>>> [image: image.png]
>>>>>  Y tengo un formulario para realizar updates
>>>>> [image: image.png]
>>>>>
>>>>> Les agradezco mucho sus respuestas.
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> 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/CAHAr%3D_3CbZXT9x_NXQ-MJH8U3tJz7JEJj3-JxBuBx_s7JxUwqQ%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/django-users/CAHAr%3D_3CbZXT9x_NXQ-MJH8U3tJz7JEJj3-JxBuBx_s7JxUwqQ%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/CAO_yRT3twv2oPWkp_hRjsm4K433QFj_U6w%2B5-fqjytNBNOSdgw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAO_yRT3twv2oPWkp_hRjsm4K433QFj_U6w%2B5-fqjytNBNOSdgw%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/CAHAr%3D_2OBLQmNVD9pMaXtBor_1U7FZh8%3DgOXUenPLoCyxH1fuw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAHAr%3D_2OBLQmNVD9pMaXtBor_1U7FZh8%3DgOXUenPLoCyxH1fuw%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/CAO_yRT2XwbGOpQasLJH5MDCNPuyeY2ozKgLC57vOGK1nzfcMgA%40mail.gmail.com.


Re: Separa Fecha y Hora en dos inputs utilizando ModelsForm

2020-01-23 Thread DANIEL URBANO DE LA RUA
https://docs.djangoproject.com/en/3.0/ref/forms/fields/#django.forms.TimeField


El jue., 23 ene. 2020 a las 18:24, DANIEL URBANO DE LA RUA (<
dannybombas...@gmail.com>) escribió:

> https://www.geeksforgeeks.org/timefield-django-models/
>
>
> El jue., 23 ene. 2020 a las 18:19, DANIEL URBANO DE LA RUA (<
> dannybombas...@gmail.com>) escribió:
>
>> Tienes date and time field
>>
>> On Thu, 23 Jan 2020, 15:57 Tatiana Mesa, 
>> wrote:
>>
>>> Buenas tardes comunidad,
>>>
>>> He empezado a trabajar con vistas basadas en clases en Django y tengo
>>> una pequeña complicación.
>>>
>>> Quisiera saber de que forma puedo separar un campo *fecha (*
>>> DateTimeField*), *en un input la feha y en otro input la hora en una
>>> vista de *HTML.*
>>>
>>>
>>>
>>> Tengo en mi modelo un campo de *Fecha*
>>> [image: image.png]
>>>  Y tengo un formulario para realizar updates
>>> [image: image.png]
>>>
>>> Les agradezco mucho sus respuestas.
>>>
>>>
>>>
>>> --
>>> 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/CAHAr%3D_3CbZXT9x_NXQ-MJH8U3tJz7JEJj3-JxBuBx_s7JxUwqQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAHAr%3D_3CbZXT9x_NXQ-MJH8U3tJz7JEJj3-JxBuBx_s7JxUwqQ%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/CAO_yRT3twv2oPWkp_hRjsm4K433QFj_U6w%2B5-fqjytNBNOSdgw%40mail.gmail.com.


Re: Separa Fecha y Hora en dos inputs utilizando ModelsForm

2020-01-23 Thread DANIEL URBANO DE LA RUA
https://www.geeksforgeeks.org/timefield-django-models/


El jue., 23 ene. 2020 a las 18:19, DANIEL URBANO DE LA RUA (<
dannybombas...@gmail.com>) escribió:

> Tienes date and time field
>
> On Thu, 23 Jan 2020, 15:57 Tatiana Mesa,  wrote:
>
>> Buenas tardes comunidad,
>>
>> He empezado a trabajar con vistas basadas en clases en Django y tengo una
>> pequeña complicación.
>>
>> Quisiera saber de que forma puedo separar un campo *fecha (*DateTimeField*),
>> *en un input la feha y en otro input la hora en una vista de *HTML.*
>>
>>
>>
>> Tengo en mi modelo un campo de *Fecha*
>> [image: image.png]
>>  Y tengo un formulario para realizar updates
>> [image: image.png]
>>
>> Les agradezco mucho sus respuestas.
>>
>>
>>
>> --
>> 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/CAHAr%3D_3CbZXT9x_NXQ-MJH8U3tJz7JEJj3-JxBuBx_s7JxUwqQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAHAr%3D_3CbZXT9x_NXQ-MJH8U3tJz7JEJj3-JxBuBx_s7JxUwqQ%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/CAO_yRT1ba6VH4-ASk%3D05Y8Q9S%2BJA8qf%2BQ4wK7M3gUaedANYmGw%40mail.gmail.com.


Re: Separa Fecha y Hora en dos inputs utilizando ModelsForm

2020-01-23 Thread DANIEL URBANO DE LA RUA
Tienes date and time field

On Thu, 23 Jan 2020, 15:57 Tatiana Mesa,  wrote:

> Buenas tardes comunidad,
>
> He empezado a trabajar con vistas basadas en clases en Django y tengo una
> pequeña complicación.
>
> Quisiera saber de que forma puedo separar un campo *fecha (*DateTimeField*),
> *en un input la feha y en otro input la hora en una vista de *HTML.*
>
>
>
> Tengo en mi modelo un campo de *Fecha*
> [image: image.png]
>  Y tengo un formulario para realizar updates
> [image: image.png]
>
> Les agradezco mucho sus respuestas.
>
>
>
> --
> 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/CAHAr%3D_3CbZXT9x_NXQ-MJH8U3tJz7JEJj3-JxBuBx_s7JxUwqQ%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/CAO_yRT2O4ozQmu2btL4xHO04cKZDXzMWePhinx4D8EhA_eO_ew%40mail.gmail.com.


Re: Django -adiminstration page is not opening

2020-01-16 Thread vineet daniel
What's in the log, share log or stacktrace. Hard to guess anything.

On Sun, 12 Jan 2020, 18:54 Rishabh Rai,  wrote:

> When i try to access my admin panel after entering username and password
> correctly, instead of taking to next page it shows me fail to load.can any
> one have any suggestions??
>
> --
> 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/3a31e3d5-5d6e-4c83-9dfd-14ecb63e9a49%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/CAJPbAW-z%3DN8p%2BmAfoVdCbwj1HJPt1Ff%3D1jm4cCdt50XvP7E%3DVA%40mail.gmail.com.


AJAX request is not rendering at the client side but works perfectly at the server

2020-01-05 Thread Daniel Roseman
Why would you expect it to render anything? All your success function does is 
log to the console.
-- 
DR.

-- 
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/d910b984-f11d-4e2b-a36d-a45130cd3f20%40googlegroups.com.


Re: ModuleNotFoundError: No module named 'datetime'

2020-01-03 Thread Daniel Roseman
On Friday, 3 January 2020 17:38:27 UTC, bhushan Gupta wrote:
>
> I want to use Django to build a simple portal. I have done the following 
> on Windows 10
> installed Python 3.8 and pip
> Installed virtualenv 
> Created an env 'cargo' 
> Installed Djengo 3.0.1
> Set the path: 
> C:\Program Files (x86)\Python38-32\
> C:\Program Files (x86)\Python38-32\Python.exe
> C:\Program Files (x86)\Python38-32\Scripts\
> C:\Program Files (x86)\Python38-32\Lib\site-packages
> C:\Program Files (x86)\Python38-32\Lib\site-packages\django\bin\
>
> I have activated the environment - (cargo) C:\Users\Gupta 
> Consulting\Envs\cargo>
> When I start a project using - python django-admin.py startproject cargo  
> I get the following error:
> (cargo) C:\Users\Gupta Consulting\Envs\cargo>django-admin.py startproject 
> myproject
> Traceback (most recent call last):
>   File "C:\Users\GUPTAC~1\Envs\cargo\Scripts\django-admin.py", line 2, in 
> 
> from django.core import management
>   File 
> "c:\users\guptac~1\envs\cargo\lib\site-packages\django\__init__.py", line 
> 1, in 
> from django.utils.version import get_version
>   File 
> "c:\users\guptac~1\envs\cargo\lib\site-packages\django\utils\version.py", 
> line 1, in 
> import datetime
> ModuleNotFoundError: No module named 'datetime'
>
> I commented out "import datetime" from the vsersion.py file. Then it did 
> not find the next module in in the version.py file.
>
> Looks like there is a setup problem.
> Any help will be appreciated
> Thanks. 
>
>
Exactly what did you do when you "set the path"? Why did you think you 
needed to do that manually in the first place? Don't. That is what a 
virtualenv is for.
-- 
DR.

-- 
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/9a1a84bc-8fa4-4d38-a22a-ee29cc55621b%40googlegroups.com.


Re: How to do SEO for my django website

2020-01-03 Thread DANIEL URBANO DE LA RUA
here you have a good example to what to use and how
https://github.com/mirumee/saleor

El vie., 3 ene. 2020 a las 13:42, Yash Garg ()
escribió:

> Is there any package or module available for SEO of django website ?
>
> --
> 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/1869ef27-3269-41bc-a0e3-c79652863eec%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/CAO_yRT0OKto73zkeCcyokqKaPQLQ47Ci7qy_qvKi3b-2j4iXfQ%40mail.gmail.com.


Re: How to do SEO for my django website

2020-01-03 Thread DANIEL URBANO DE LA RUA
https://github.com/mirumee/saleor
here you have a good example how an what to use to do the SEO

El vie., 3 ene. 2020 a las 13:48, sagar ninave ()
escribió:

> https://www.bedjango.com/blog/4-tips-position-your-website-using-django/
>
> On Fri, Jan 3, 2020 at 6:19 PM sagar ninave  wrote:
>
>> https://django-seo.readthedocs.io/en/latest/introduction/tutorial.html
>>
>>
>> On Fri, Jan 3, 2020 at 6:11 PM Yash Garg  wrote:
>>
>>> Is there any package or module available for SEO of django website ?
>>>
>>> --
>>> 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/1869ef27-3269-41bc-a0e3-c79652863eec%40googlegroups.com
>>> 
>>> .
>>>
>>
>>
>> --
>>
>> 
>> sagar ninave
>> about.me/sagarninave
>> 
>>
>
>
> --
>
> 
> sagar ninave
> about.me/sagarninave
> 
>
> --
> 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/CAA6pdZ_jU91eqkF5FG956%2B%2BoY838LyZUrhZWO-n71MZGA0%2BqDQ%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/CAO_yRT28xsb2ib6WZNfcxQhBu2YXya%2B1WOvxmEs%2B6VcDXj0kMg%40mail.gmail.com.


Re: External SSO for Django

2019-12-23 Thread Daniel Chimeno
Also interested

El lunes, 23 de diciembre de 2019, 4:14:21 (UTC+1), Malik Brahimi escribió:
>
> Just had a question about integrating external auth with my React/Django 
> application. I'm using a provisioned client instance from my company so 
> it's not Google, Facebook, or all the other social auth backends that exist 
> as django packages. I'd like to be able to SSO authenticate Django user 
> objects via OAuth or SAML in order to use permissions. Some client 
> libraries don't login Django users because they can simply use the external 
> API on the frontend. Others have no native support for a provider outside 
> the scope of popular social networks. 
>
> I suppose I could just create an api endpoint as a OAuth callback taking 
> the code from the query string, sending a request to exchange the code for 
> a token, decode the token for the userinfo, use the userinfo to either get 
> or create a user, and then login a user. But this is pretty painstaking 
> process. And I'm not sure about the security implications. Is there 
> anything you would suggest? I'm open to using SAML but again I have no idea 
> where to start with Django.
>

-- 
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/cbc00d32-3fc6-4094-aeec-f23e77cc5505%40googlegroups.com.


Re: Renaming sequences

2019-12-18 Thread DANIEL URBANO DE LA RUA
Why you did taht on production and not to try before recreate the db in
other place

On Wed, 18 Dec 2019, 20:59 Michael MacIntosh, 
wrote:

> Hey Mike,
>
> I'm not sure about your specific setup, but I assume you are using the
> django.contrib.auth user model and are moving it over to your own app,
> and you have your own userprofile model that links to it.  The user
> model in django.contrib.auth is a swappable model.  Basically meaning as
> long as it inherits from a base class (I believe BaseUser) and you
> configure your settings (AUTH_USER_MODEL) to look at it, you should be
> fine, as long as you get the user model via get_user_model.
>
> A link to the documentation on this
>
> https://docs.djangoproject.com/en/3.0/topics/auth/customizing/#referencing-the-user-model
>
> The next section also goes into defining a custom user model.
>
> But in short there should be no ill-effects if you do everything right .
>
> Also if you are moving your own user model into your own app, I would
> recommend naming it something other than common, something containing
> auth, like "catapp_auth" so it is clear that your user models and any
> custom authorization / authentication happens in there.
>
> Hope that helps!
>
> Cheers,
> Michael.
>
> On 12/17/2019 10:26 PM, Mike Dewhirst wrote:
> > Are there any consequences for renaming sequences to match the tables
> > which own them?
> >
> > In an existing production Django project I have just converted
> > auth.user into common.user and company.userprofile into
> > common.userprofile.
> >
> > Having gone through the migration process more or less unscathed the
> > original sequences are owned by the renamed tables. Eg
> > public.auth_user_id_seq is owned by public.common_user.id
> >
> > Everything seems to work fine but my unit tests are playing up and
> > error messages are showing the original (and still correct) sequence
> > names. It would make much visual sense to me now and especially to the
> > future me (or anyone else) if the sequences were renamed as well.
> >
> > I know how I could do it but I just need to know if I should.
> >
> > Thanks for any advice
> >
> > Mike
> >
>
> --
> 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/386eb4f4-6229-331f-05a5-c47d168db1fd%40linear-systems.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/CAO_yRT2%3DGRDm-75XnVT%3DDs9Na3DtZMTVaMzQc9EHFv1VpeaUKQ%40mail.gmail.com.


Re: migration error

2019-12-12 Thread DANIEL URBANO DE LA RUA
ok good that sound good that is what it matter :)

El jue., 12 dic. 2019 a las 21:35, Leó Horváth ()
escribió:

> hey, thanks i solved it the problem was very trivial, thank you for your
> help anyway!!
>
> Leó Horváth  ezt írta (időpont: 2019. dec.
> 12., Cs, 20:13):
>
>> Still the same, it didnt help sadly :(
>>
>>
>> DANIEL URBANO DE LA RUA  ezt írta (időpont:
>> 2019. dec. 12., Cs, 20:10):
>>
>>> if your are using sqlite db and is empty delete it and remake migrations
>>>
>>> El jue., 12 dic. 2019 a las 18:54, Leó Horváth (<
>>> horvath.leo2...@gmail.com>) escribió:
>>>
>>>> Hi guys!
>>>>
>>>> When I Try to make a migration my console says the following:
>>>> "ValueError: Related model 'database_manager.Name' cannot be resolved"
>>>>
>>>> however, "database_manager" does not exist anymore, I renamed it to
>>>> "database".
>>>>
>>>> this is my project repo if it helps:
>>>> https://github.com/leocsi/salesgrade
>>>>
>>>> Thanks a lot,
>>>>
>>>> Leó
>>>>
>>>> --
>>>> 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/CAJBcW0xHE%2BmH3wZxCyG421sa9izE8jAzicJzLCA9-9r69jfRpA%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAJBcW0xHE%2BmH3wZxCyG421sa9izE8jAzicJzLCA9-9r69jfRpA%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/CAO_yRT3NO-jRQDrg6f5iAzE8GEtfqBHE04Fu3PP4-E-yenHV4g%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAO_yRT3NO-jRQDrg6f5iAzE8GEtfqBHE04Fu3PP4-E-yenHV4g%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/CAJBcW0y7EJxPdcfPJ%2BPM64FmLsuuBCOWqb0fWGkbQ4im3wYvUw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAJBcW0y7EJxPdcfPJ%2BPM64FmLsuuBCOWqb0fWGkbQ4im3wYvUw%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/CAO_yRT3Drob8TAxoz0HCRT5xDMnuZbJ2huL_k04DJcasESVVrg%40mail.gmail.com.


Re: migration error

2019-12-12 Thread DANIEL URBANO DE LA RUA
what still the same, what you did. what you did not be more explicit

El jue., 12 dic. 2019 a las 20:15, Leó Horváth ()
escribió:

> Still the same, it didnt help sadly :(
>
>
> DANIEL URBANO DE LA RUA  ezt írta (időpont:
> 2019. dec. 12., Cs, 20:10):
>
>> if your are using sqlite db and is empty delete it and remake migrations
>>
>> El jue., 12 dic. 2019 a las 18:54, Leó Horváth (<
>> horvath.leo2...@gmail.com>) escribió:
>>
>>> Hi guys!
>>>
>>> When I Try to make a migration my console says the following:
>>> "ValueError: Related model 'database_manager.Name' cannot be resolved"
>>>
>>> however, "database_manager" does not exist anymore, I renamed it to
>>> "database".
>>>
>>> this is my project repo if it helps:
>>> https://github.com/leocsi/salesgrade
>>>
>>> Thanks a lot,
>>>
>>> Leó
>>>
>>> --
>>> 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/CAJBcW0xHE%2BmH3wZxCyG421sa9izE8jAzicJzLCA9-9r69jfRpA%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAJBcW0xHE%2BmH3wZxCyG421sa9izE8jAzicJzLCA9-9r69jfRpA%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/CAO_yRT3NO-jRQDrg6f5iAzE8GEtfqBHE04Fu3PP4-E-yenHV4g%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAO_yRT3NO-jRQDrg6f5iAzE8GEtfqBHE04Fu3PP4-E-yenHV4g%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/CAJBcW0y80-t9DC70nuxtTm1%2BmXf2Wb11s3JOtZPySiGN_KS59g%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAJBcW0y80-t9DC70nuxtTm1%2BmXf2Wb11s3JOtZPySiGN_KS59g%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/CAO_yRT1XsGRC--6zcw7BO3BoTZHMU1mm4xpFRxmkZY%2BwhTSgkw%40mail.gmail.com.


Re: migration error

2019-12-12 Thread DANIEL URBANO DE LA RUA
if no
https://docs.djangoproject.com/en/3.0/topics/migrations/#django.db.migrations.Migration.initial

or
https://simpleisbetterthancomplex.com/tutorial/2016/07/26/how-to-reset-migrations.html
all this choices you have

El jue., 12 dic. 2019 a las 20:10, DANIEL URBANO DE LA RUA (<
dannybombas...@gmail.com>) escribió:

> if your are using sqlite db and is empty delete it and remake migrations
>
> El jue., 12 dic. 2019 a las 18:54, Leó Horváth ()
> escribió:
>
>> Hi guys!
>>
>> When I Try to make a migration my console says the following:
>> "ValueError: Related model 'database_manager.Name' cannot be resolved"
>>
>> however, "database_manager" does not exist anymore, I renamed it to
>> "database".
>>
>> this is my project repo if it helps:
>> https://github.com/leocsi/salesgrade
>>
>> Thanks a lot,
>>
>> Leó
>>
>> --
>> 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/CAJBcW0xHE%2BmH3wZxCyG421sa9izE8jAzicJzLCA9-9r69jfRpA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAJBcW0xHE%2BmH3wZxCyG421sa9izE8jAzicJzLCA9-9r69jfRpA%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/CAO_yRT02mFbobDQBjQRrr0LH2t%2BzbU9Jp%2BTqiB3q6i2ofS5REw%40mail.gmail.com.


Re: migration error

2019-12-12 Thread DANIEL URBANO DE LA RUA
if your are using sqlite db and is empty delete it and remake migrations

El jue., 12 dic. 2019 a las 18:54, Leó Horváth ()
escribió:

> Hi guys!
>
> When I Try to make a migration my console says the following:
> "ValueError: Related model 'database_manager.Name' cannot be resolved"
>
> however, "database_manager" does not exist anymore, I renamed it to
> "database".
>
> this is my project repo if it helps:
> https://github.com/leocsi/salesgrade
>
> Thanks a lot,
>
> Leó
>
> --
> 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/CAJBcW0xHE%2BmH3wZxCyG421sa9izE8jAzicJzLCA9-9r69jfRpA%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/CAO_yRT3NO-jRQDrg6f5iAzE8GEtfqBHE04Fu3PP4-E-yenHV4g%40mail.gmail.com.


Re: Removing Hardcoded urls in Templates

2019-12-10 Thread Daniel Hepper
It should be {% url 'polls:detail' question.id %}

I think you mixed up the steps "Removing hardcoded URLs in templates" and
"Namespacing URL names"

Hope that helps,
Daniel

On Tue, Dec 10, 2019 at 11:58 AM Bruckner de Villiers <
bruckner.devilli...@gmail.com> wrote:

> Running Django 3.0 & Python 3.7.3.
>
>
>
> Issue with Tutorial Part 3:
>
> I replaced “<*li*><*a* href="/polls/{{ question.id }}/">{{ 
> question.question_text }}” with
>
> “<*li*><*a* href="{% *url* 'detail' question.id %}">{{ question.question_text 
> }}” and get the following error:
>
> Reverse for 'detail' not found. 'detail' is not a valid view function or 
> pattern name.
>
> http://question.id> %}*">{{
> question.question_text }}
>
> index.html:
>
> {% if latest_question_list %}
>
> 
>
> {% for question in latest_question_list %}
>
> *{% comment %} http://question.id> }}/">{{ question.id <http://question.id> }} {{
> question.question_text }} {{ question.pub_date }} {% endcomment %}*
>
> {{ question.
> question_text }} *{% comment %} - Why doesn't this work?-->  {%
> endcomment %}*
>
> {% endfor %}
>
> 
>
> {% else %}
>
> No polls are available.
>
> {% endif %}
>
> urls.py:
>
> from os import \
>
> path
>
>
>
> from django.urls import \
>
> path
>
> from . import \
>
> views
>
>
>
> app_name = 'polls'
>
> urlpatterns = [
>
> path('', views.index, name='index'),
>
> path('/', views.detail, name='detail'),
>
> path('/results/', views.results, name='results'),
>
> path('/vote/', views.vote, name='vote'),
>
> ]
>
> views.py:
>
> from django.shortcuts import get_object_or_404, render
>
> from django.http import \
>
> HttpResponse
>
> from django.shortcuts import \
>
> render
>
> *#from django.template import loader*
>
> from .models import Question
>
>
>
> *# Create your views here.*
>
> *def* index(request):
>
> latest_question_list = Question.objects.order_by('-pub_date')[:10]
>
> context = {'latest_question_list': latest_question_list}
>
> return render(request, 'polls/index.html', context)
>
>
>
> *def* detail(request, question_id):
>
> question = get_object_or_404(Question, pk=question_id)
>
> return render(request, 'polls/detail.html', {'question': question})
>
>
>
> *def* results(request, question_id):
>
> response = "You're looking at the results of question %s."
>
> return HttpResponse(response % question_id)
>
>
>
> *def* vote(request, question_id):
>
> return HttpResponse("You're voting on question %s." % question_id)
>
>
>
> Much obliged,
>
>
>
>
>
>
>
> Bruckner de Villiers
>
> 083 625 1086
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/0072F811-155B-41C2-BDCD-3C529150941B%40gmail.com
> <https://groups.google.com/d/msgid/django-users/0072F811-155B-41C2-BDCD-3C529150941B%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/CAHEnUVW5AxWDmgRdvHEUYrd%3D%3D%2BFA6y4htqJjv9sJc-OkiCHQpA%40mail.gmail.com.


Re: Difficulty with Tutorial Part 2

2019-12-09 Thread Daniel Hepper
You can fix your code by changing datetime.timedelta to timedelta:

*def* was_published_recently(self):

return self.pub_date >= timezone.now() - timedelta(days=1)

The statement "from datetime import datetime, timedelta" imports the
classes datetime and timedelta from the module datetime.

If you prefer to use "datetime.timedelta", you would have to use "import
datetime" instead of "from datetime import datetime, timedelta"

Hope that helps,
Daniel

On Mon, Dec 9, 2019 at 9:24 AM Bruckner de Villiers 
wrote:

> Running Django 3.0 & Python 3.7.3
>
> Everything works per the tutorial until I get to:
>
> q.was_published_recently()
>
> It throws the following error:
>
> File
> "/Volumes/Data/DevelopmentTraining/django_tutorials/mysite/polls/models.py",
> line 19, in was_published_recently
>
> return self.pub_date >= timezone.now() - datetime.timedelta(days=1)
>
> AttributeError: type object 'datetime.datetime' has no attribute
> 'timedelta'
>
>
>
> I also tried importing timedelta from datetime – to no avail.
>
>
>
> models.py code below:
>
>
>
> import datetime
>
> from datetime import datetime, timedelta
>
>
>
> from django.db import \
>
> models
>
>
>
> from django.utils import timezone
>
>
>
> *# Create your models here.*
>
>
>
> *class* Question(models.Model):
>
> question_text = models.CharField(max_length=200)
>
> pub_date = models.DateTimeField('date published')
>
>
>
> *def* __str__(self):
>
> return self.question_text
>
>
>
> *def* was_published_recently(self):
>
> return self.pub_date >= timezone.now() - datetime.timedelta(days=1
> )
>
>
>
> *class* Choice(models.Model):
>
> question = models.ForeignKey(Question, on_delete=models.CASCADE)
>
> choice_text = models.CharField(max_length=200)
>
> votes = models.IntegerField(default=0)
>
>
>
> *def* __str__(self):
>
> return self.choice_text
>
>
>
>
>
> Much obliged,
>
>
>
> Bruckner de Villiers
>
> +27 (0)83 625 1086
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/VI1PR07MB5680C26D410997944FF9A20BC8580%40VI1PR07MB5680.eurprd07.prod.outlook.com
> <https://groups.google.com/d/msgid/django-users/VI1PR07MB5680C26D410997944FF9A20BC8580%40VI1PR07MB5680.eurprd07.prod.outlook.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/CAHEnUVXhx5C%2BwhvAoBzOq4s_SXMxqzhq_7Y5k5fCmmhEqr%2B75Q%40mail.gmail.com.


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

2019-12-07 Thread Daniel Chimeno
+1 to more document about DEBUG magic.


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

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


Re: weird memory error on Centos7

2019-12-05 Thread DANIEL URBANO DE LA RUA
In your case use yum to get thoses package

On Fri, 6 Dec 2019, 00:12 DANIEL URBANO DE LA RUA, 
wrote:

> Try installing apt-ger install binutils libproj-dev gdal-bin
>
> --
> 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/4dbbcc62-4758-4c7b-a016-62c7eeae0a72%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/CAO_yRT01mgR5wzFsHH2iTBSm2qTV7DFJyp7qKXzjrG3Piz_fdQ%40mail.gmail.com.


weird memory error on Centos7

2019-12-05 Thread DANIEL URBANO DE LA RUA
Try installing apt-ger install binutils libproj-dev gdal-bin

-- 
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/4dbbcc62-4758-4c7b-a016-62c7eeae0a72%40googlegroups.com.


Re: weird memory error on Centos7

2019-12-05 Thread DANIEL URBANO DE LA RUA
Try installing apt-ger install binutils libproj-dev gdal-bin

On Fri, 6 Dec 2019, 00:01 Fernando González Cisneros, <
hellhammerh...@gmail.com> wrote:

> Hello, having some trouble here.
>
> I'm developing an app using the postgis backend in django, i'm releasing
> it using an apache server on Centos 7, i'm using mod_wsgi for python 3.6
> and i've already published a test "hello world" app without trouble,
> however when i try to publish my app a 500 internal error, when i check the
> error log the next text appears:
>
> mod_wsgi (pid=26812): Target WSGI script
> '/var/www/html/simulacros/simulacros/wsgi.py' cannot be loaded as Python
> module.
>  mod_wsgi (pid=26812): Exception occurred processing WSGI script
> '/var/www/html/simulacros/simulacros/wsgi.py'.
>  Traceback (most recent call last):
>   File "/var/www/html/simulacros/simulacros/wsgi.py", line 16, in 
>  application = get_wsgi_application()
>   File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/core/wsgi.py",
> line 12, in get_wsgi_application
>  django.setup(set_prefix=False)
>   File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/__init__.py",
> line 24, in setup
> apps.populate(settings.INSTALLED_APPS)
>File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/apps/registry.py",
> line 114, in populate
> app_config.import_models()
>   File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/apps/config.py",
> line 211, in import_models
> self.models_module = import_module(models_module_name)
>File
> "/opt/rh/rh-python36/root/usr/lib64/python3.6/importlib/__init__.py", line
> 126, in import_module
>return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 994, in _gcd_import
>   File "", line 971, in _find_and_load
>  File "", line 955, in _find_and_load_unlocked
>File "", line 665, in _load_unlocked
>   File "", line 678, in exec_module
>  File "", line 219, in
> _call_with_frames_removed
>File "/var/www/html/simulacros/proyecto/models.py", line 1, in 
> from django.contrib.gis.db import models
>   File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/db/models/__init__.py",
> line 3, in 
> import django.contrib.gis.db.models.functions  # NOQA
>  File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/db/models/functions.py",
> line 4, in 
>  from django.contrib.gis.db.models.fields import BaseSpatialField,
> GeometryField
>   File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/db/models/fields.py",
> line 3, in 
>from django.contrib.gis import forms, gdal
>File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/forms/__init__.py",
> line 3, in 
>  from .fields import (  # NOQA
>File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/forms/fields.py",
> line 2, in 
>  from django.contrib.gis.gdal import GDALException
>  File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/gdal/__init__.py",
> line 28, in 
>  from django.contrib.gis.gdal.datasource import DataSource
>   File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/gdal/datasource.py",
> line 39, in 
> from django.contrib.gis.gdal.driver import Driver
>   File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/gdal/driver.py",
> line 5, in 
>  from django.contrib.gis.gdal.prototypes import ds as vcapi, raster as
> rcapi
>  File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/gdal/prototypes/ds.py",
> line 9, in 
>  from django.contrib.gis.gdal.libgdal import GDAL_VERSION, lgdal
>   File
> "/var/www/html/simulacros/app/lib64/python3.6/site-packages/django/contrib/gis/gdal/libgdal.py",
> line 113, in 
>err_handler = CPLErrorHandler(err_handler)
>  MemoryError
>
> I know "MemoryError" is self-explanatory however when i asked the system
> administrator if there was a memory problem he informed me there wasn't
> any. This leaves me wondering where can i be wrong.
>
> In case someone asks here's my wsgi.conf file:
>
>
> Alias /static /var/www/html/simulacros/static
> 
> Options FollowSymLinks
> AllowOverride None
> Require all granted
> 
> WSGIDaemonProcess simulacros python-home=/var/www/html/simulacros/app
> python-path=/var/www/html/simulacros
> WSGIProcessGroup simulacros
> WSGIScriptAlias /simulacros /var/www/html/simulacros/simulacros/wsgi.py
> process-group=simulacros
> 
> 
> Require all granted
> 
> 
>
>
> Thanks for your attention!
>
> --
> 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
> 

Re: reg: How to call multiple APIView in one single web page as a list of items?

2019-12-05 Thread Daniel Roseman
On Wednesday, 4 December 2019 18:32:25 UTC, Amitesh Sahay wrote:
>
> I am in the process of developing a small project using django rest 
> framework, and within that requirement, I need to list every table in one 
> single page. Below is the code snippet.
>
> class QuizList(APIView):
> renderer_classes = [TemplateHTMLRenderer]
> template_name = 'adminView.html'
>
> def get(self, request):
> queryset = Quiz.objects.all()
> return Response({'quiz': queryset})
>
> class AnswerList(APIView):
> renderer_classes = [TemplateHTMLRenderer]
> template_name = 'adminView.html'
>
> def get(self, request):
> queryset = Answer.objects.all()
> return Response({'answer': queryset})
>
> class QuestionList(APIView):
> renderer_classes = [TemplateHTMLRenderer]
> template_name = 'adminView.html'
>
> def get(self, request):
> queryset = Question.objects.all()
> return Response({'question': queryset})
>
> In the above snippet, I am able to list the very first class "QuizView" on 
> my web page. But other than that, when I am trying to add other APIViews, 
> they are simply not happening. Below is the HTML template:
>
> 
> 
> Admin View
> {% for quizez in quiz %}
>
> {{ quizez.name }}
> {% endfor %}
> 
> 
> {% for questions in question %}
> {{ questions.label }}
> {% endfor %}
> 
> {% for answers in answer %}
> {{ answer.text }}
> {% endfor %}
> 
>
> I tried to put all the for loops within a single "ul", but even that 
> didn't work. Please help.
>
> Thank you
>

This is not how things work. You don't "add other views" to an existing 
page. One page equals one view.

I don't know why you are using API views - or DRF - here at all. As the 
name implies, that's when you're implementing an API, either for external 
use or to power your page that's built in a front-end framework. Don't use 
them for standard pages using Django templates: use a standard Django view 
for that. Again, one view for one page, which includes all the content you 
need to render that page.
-- 
DR.

-- 
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/adacdb3e-0fb0-43ab-9cd8-733b8b7adb77%40googlegroups.com.


what tool will be using for Continues integration in python projects??

2019-12-04 Thread DANIEL URBANO DE LA RUA
You can use jenkins with whatever language you use

-- 
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/ac939c48-a145-4d55-9a26-443151275676%40googlegroups.com.


what tool will be using for Continues integration in python projects??

2019-12-04 Thread DANIEL URBANO DE LA RUA
You can use jenkins with whatever language you use

-- 
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/2f2e5c78-509e-4a2e-8c61-7b10edb4c08a%40googlegroups.com.


Re: what tool will be using for Continues integration in python projects??

2019-12-04 Thread DANIEL URBANO DE LA RUA
You can use jenkins with whatever language you use

On Wed, 4 Dec 2019, 18:36 DANIEL URBANO DE LA RUA, 
wrote:

> Jenkins
>
> On Wed, 4 Dec 2019, 17:54 Manjunatha C, 
> wrote:
>
>> Jenkins are using for CI in java projects. what tool will be using for
>> python projects to Continues integration??
>>
>> --
>> 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/6a7d7fa6-09e2-4227-b5e6-a1800a643470%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/CAO_yRT2UDkR8Bp14ETv-SOVqNwXOS_L%3DuFk%3DFAch044_%2B95PYw%40mail.gmail.com.


Re: what tool will be using for Continues integration in python projects??

2019-12-04 Thread DANIEL URBANO DE LA RUA
Jenkins

On Wed, 4 Dec 2019, 17:54 Manjunatha C,  wrote:

> Jenkins are using for CI in java projects. what tool will be using for
> python projects to Continues integration??
>
> --
> 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/6a7d7fa6-09e2-4227-b5e6-a1800a643470%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/CAO_yRT3W3jhbscz_psqTmnZGnsm1RSjma_J5wiz-vkkUsh%2B75Q%40mail.gmail.com.


Re: Why is the Django server running even when pytlinter shows that there's some bug in the code?

2019-12-03 Thread Daniel Hepper
Python is a dynamic programming language with a dynamic type system (as
opposed to a static type system like for example Java), see
https://en.wikipedia.org/wiki/Dynamic_programming_language

Among other things, that means that type checks are done during runtime.

That means, if Item really does not have an 'objects' member (i.e. Item is
not a Django model), this will only lead to an error if this line of code
is executed, i.e. you visit the URL that points to the index view function.

But if Item is a Django model, this is most likely a false positive of
pylint. The Django ORM makes extensive use of the dynamic nature of Python,
which can confuse pylint. There is a plugin for pylint to make it work more
reliably with Django code: https://pypi.org/project/pylint-django/

Hope that helps,
Daniel


On Tue, Dec 3, 2019 at 1:34 PM Aaryan Dewan  wrote:

> I was just following this tutorial, on how to make Django apps and how to
> display a database to the user. I created a simple database in models.py
> and then, I defined a function in views.py, which used Item.objects.all().
> Now Pylinter says that* 'Item' has no 'objects' member*!
>
> So this should prevent the server from running ( as its a bug after all!),
> but if I type in *python manage.py runserver,* the terminal shows no
> error and the server starts functioning.
>
> Please see the photo attachment to get a clearer view of the problem!
>
> --
> 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/6428642e-3d7d-4d95-b387-0894c8410897%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/6428642e-3d7d-4d95-b387-0894c8410897%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/CAHEnUVV8bMk82rTnWQWFO6O-Yr-gg7d64vUXaAwv_c7KhdBDOQ%40mail.gmail.com.


Re: Django begginer

2019-11-27 Thread Daniel Almeida
Thank you guys I set as charfield and will be ok for now.

So maybe u can help me further, this is a timesheet app and I have all set 
in django admin. I can add and delete data from my table in the 
administration mode.
Now my question is how can I import this to a html template to be able to 
add data from there instead of using the admin portal?

So lets say I want to display this table in my index.html file like with a 
"add/+" and "save" button to add contents to my db:

class TaskAdmin(admin.ModelAdmin):
list_display = ('date', 'client', 'project', 'assignment', 'hours')


>
>
>

-- 
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/982c9219-4324-4657-92a0-c77fd85511ee%40googlegroups.com.


Django begginer

2019-11-26 Thread Daniel Almeida
HI guys I´m trying to make a simple timesheet app, first time I´m 
programming. 
So I have this code where I set in models.py the Client and then I want to 
have the Project class sync with the Client class.
So for each Client I have a different set of Projects.
Now my problem is in Task class I set the variable project = Project 
(class) however this is the only field I can´t see on my django site.
What am I doing wrong?

class Client(models.Model):
name = models.CharField(max_length=20)

def __str__(self):
return format(self.name)


class Project(models.Model):
client = models.ForeignKey(Client, on_delete=models.CASCADE)
project = models.CharField(max_length=20)

def __str__(self):
return format(self.project)


class Task(models.Model):
client = models.ForeignKey(Client, on_delete=models.CASCADE)
project = Project
date = models.DateField()
assignment = models.CharField(max_length=200)
hours = models.DecimalField(max_digits=4, decimal_places=2)

-- 
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/5a30c747-c409-40aa-bd7a-392130563efe%40googlegroups.com.


Re: Directly Accessing Dictionary Values

2019-11-22 Thread Daniel Roseman
On Wednesday, 20 November 2019 03:47:24 UTC, Andrew Stringfield wrote:
>
> Hello all,
>
>  I am trying to access Dictionary values directly.  Here is my view:
>
> def unique_key_query(request, unique_key):
> unique_key_object = 
> simpleformmodel.objects.all().filter(id=unique_key)
> context = {'unique_key_object': unique_key_object}
> return render(request, "bash_file_page.html", context)
>
> Here is my template:
> {% if unique_key_object %}
> {% for question in unique_key_object %}
> {{ question.filename }}
> {% endfor %}
> {% else %}
> No data is available.
> {% endif %}
>
> I can access Dictionary values with a for loop, but I just do not want to 
> do that.  How can I access the values directly?
>
> Thank you.
>


You've got some unfortunately bad answers here. But your question itself is 
very confusing, so it's not surprising.

You *don't have a dictionary here*. It's not clear why you think you do. 
You have a queryset, consisting of one or more model instances.

However, I *think* you are trying to ask why you have a queryset in the 
first place. And the answer is that that's what `filter` always gives you, 
no matter how many items it matches. But in your case you're querying by 
unique ID anyway, so you should only get one item. So, in a case like this, 
you should use `get`:

 unique_key_object = simpleformmodel.objects.get(id=unique_key)

and now in the template {{ unique_key_object.filename }} will work 
correctly.

-- 
DR.

-- 
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/9eb7e5ae-7e2e-42a0-ab73-1206dad0166c%40googlegroups.com.


Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-15 Thread DANIEL URBANO DE LA RUA
Nice but i am always with nginx and i dont know if it has the same problem
or not

On Fri, 15 Nov 2019, 18:02 Patrick Carra,  wrote:

> In case anyone is interested I fixed this with some simple regex in my
> view.  I identified the patterns for which apache was removing the // and
> replacing with a single / and then wrote some rules around that and
> replaced the single / with the // before passing it to my query.
>
> --
> 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/2752a54f-4bdc-4781-b8ba-a842ffcb1a36%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/CAO_yRT0DwkcXvukvRWmhOyV5km%3Dn75d7Ssg_UakUktQCGDggdA%40mail.gmail.com.


  1   2   3   4   5   6   7   8   9   10   >