Re: Deploy Django app with Apache2

2021-06-28 Thread Abeer Eltanawy
Could this article solve your problem?
https://medium.com/@shivansht9211/how-to-deploy-django-applications-on-aws-ec2-using-apache-server-f6ae2e1effc4

On Thu, Jun 24, 2021 at 9:27 AM tristant  wrote:

> I was looking to turn a a laptop into a standing webserver to deploy a
> Django app within an intranet. This tutorial here shows how to doing with
> Apache2:  Hands-On How to Host Django with Apache2 | by Muhammad Ryan |
> Level Up Coding (gitconnected.com)
> .
> But it only shows how to deploy locally without using a real DNS (i.e
> instead of using "localhost:8000", it uses "localhost/project_name" as the
> address).
>
> Suppose I have secured a DNS, how should I proceed or what steps need to
> deviate from this tutorial? Or if anyone has better educating sources for
> this purpose, that would be much appreciated. I work with Ubutu. 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/0925c4ae-1d27-4221-a2d6-c2188b66d096n%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/CACbngZeVfcPy2RLyDO9gHr-BJLJktzyrwYQG6a7Ec5sXcywneQ%40mail.gmail.com.


Re: can Django replace PHP ?

2021-06-28 Thread Vkash Poudel
I used to java SPRINGBOOT but after I am developing in Django I see it's
more convenient than spring-boot.
Django is secure, it's simple, Very fast app development, documentation of
Django its one of the best,
I hope Django can do whats PHP can.


On Tue, Jun 29, 2021 at 1:07 AM Ari Davidow  wrote:

> I can't think of any application where you would want php in an
> environment where python is already available UNLESS there is a requirement
> to use a php-specific content management system such as WordPress or Drupal.
>
> ari
>
> On Mon, Jun 28, 2021, 9:17 AM Krishna Adhikari 
> wrote:
>
>> Hello all  my seniors
>>
>> I am doing Data Science programming (python) for 3 years now in my
>> organization I also have to develop a Web Platform to deeply ML models and
>> also to develop other web applications together.
>>
>> I searched a lot of information on google, but till now I did not make a
>> decision should I learn PHP or I can handle it all with Django?
>>
>> *can we solve all kinds of web application problems with Django without
>> learning PHP ?? *
>> *or PHP also recommended.*
>>
>> Thank you all 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/f2007209-a90e-4a08-8d03-b2b3a1007e1en%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/CAF%2BxBDW5YTbdevZDLtszYtE3mr-o7xnCfsWVivxWzRMsEeWFPQ%40mail.gmail.com
> 
> .
>


-- 
Best Regards,
Bikash Poudel

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


Re: can Django replace PHP ?

2021-06-28 Thread Ari Davidow
I can't think of any application where you would want php in an environment
where python is already available UNLESS there is a requirement to use a
php-specific content management system such as WordPress or Drupal.

ari

On Mon, Jun 28, 2021, 9:17 AM Krishna Adhikari  wrote:

> Hello all  my seniors
>
> I am doing Data Science programming (python) for 3 years now in my
> organization I also have to develop a Web Platform to deeply ML models and
> also to develop other web applications together.
>
> I searched a lot of information on google, but till now I did not make a
> decision should I learn PHP or I can handle it all with Django?
>
> *can we solve all kinds of web application problems with Django without
> learning PHP ?? *
> *or PHP also recommended.*
>
> Thank you all 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/f2007209-a90e-4a08-8d03-b2b3a1007e1en%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/CAF%2BxBDW5YTbdevZDLtszYtE3mr-o7xnCfsWVivxWzRMsEeWFPQ%40mail.gmail.com.


Re: can Django replace PHP ?

2021-06-28 Thread Kelvin Sajere
You can create anything with both django and php, but to be fair, django
can only really be compared to laravel which is the most popular web
framework for php like django is for python. I suggest using django since
you’ve already been working with python for years. It would be easier, you
can develop projects faster and there practically nothing on the web that
can’t be built with django right now.

On Mon, Jun 28, 2021 at 20:15 'Peter van der Does' via Django users <
django-users@googlegroups.com> wrote:

> Django !== PHP
>
> Python is like PHP
>
> Django is like Laravel
>
>
> On 6/28/21 2:43 PM, Ajeet Kumar Gupt wrote:
>
> Django is a best in web development as well most secure in comparison to
> php?
>
> On Mon, Jun 28, 2021, 7:09 PM Ahmed omar miladi 
> wrote:
>
>> today django is the best for all web application
>>
>> Le lun. 28 juin 2021 à 14:17, Krishna Adhikari  a
>> écrit :
>>
>>> Hello all  my seniors
>>>
>>> I am doing Data Science programming (python) for 3 years now in my
>>> organization I also have to develop a Web Platform to deeply ML models and
>>> also to develop other web applications together.
>>>
>>> I searched a lot of information on google, but till now I did not make a
>>> decision should I learn PHP or I can handle it all with Django?
>>>
>>> *can we solve all kinds of web application problems with Django without
>>> learning PHP ?? *
>>> *or PHP also recommended.*
>>>
>>> Thank you all 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/f2007209-a90e-4a08-8d03-b2b3a1007e1en%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/CAE3Dc2N6CWH5w%3DTEpZRbh7tGv2jc06xBUO4Ym9d8cUs%2BS_eORQ%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%2BTqRsvXBgYjvpArmyCx4ANUHpm49jQBr9E5N1jD51EshA8Mkg%40mail.gmail.com
> 
> .
>
> --
>
> *Peter van der Does o: **410-584-2500*
> * m: 732-425-3102 ONeil Interactive, Inc  oneilinteractive.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/34198848-2598-c928-e720-c26ad9e4bfa8%40oneilinteractive.com
> 
> .
>
-- 
KeLLs

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


Re: can Django replace PHP ?

2021-06-28 Thread 'Peter van der Does' via Django users
Django !== PHP

Python is like PHP

Django is like Laravel


On 6/28/21 2:43 PM, Ajeet Kumar Gupt wrote:
> Django is a best in web development as well most secure in comparison
> to php? 
>
> On Mon, Jun 28, 2021, 7:09 PM Ahmed omar miladi
> mailto:ahmedomarmil...@gmail.com>> wrote:
>
> today django is the best for all web application
>
> Le lun. 28 juin 2021 à 14:17, Krishna Adhikari
> mailto:krishd...@gmail.com>> a écrit :
>
> Hello all  my seniors 
>
> I am doing Data Science programming (python) for 3 years now
> in my organization I also have to develop a Web Platform to
> deeply ML models and also to develop other web applications
> together.
>
> I searched a lot of information on google, but till now I did
> not make a decision should I learn PHP or I can handle it all
> with Django?
>
> *can we solve all kinds of web application problems with
> Django without learning PHP ?? *
> *or PHP also recommended.*
>
> Thank you all 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/f2007209-a90e-4a08-8d03-b2b3a1007e1en%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/CAE3Dc2N6CWH5w%3DTEpZRbh7tGv2jc06xBUO4Ym9d8cUs%2BS_eORQ%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%2BTqRsvXBgYjvpArmyCx4ANUHpm49jQBr9E5N1jD51EshA8Mkg%40mail.gmail.com
> .
-- 
*Peter van der Does
o: ***410-584-2500
m: 732-425-3102
*ONeil Interactive, Inc *
oneilinteractive.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/34198848-2598-c928-e720-c26ad9e4bfa8%40oneilinteractive.com.


Re: user profile in Django

2021-06-28 Thread Kelvin Sajere
I suggest that you use the AbstractUser model that django officially
recommends.

from django.contrib.auth.models AbstractUser

class User(AbstractUser):
age : models.IntegerField(default=0)
is_student : models.BooleanField(default=False)
# extra profile information

Then also make sure in your settings file you point your auth model to this
class

AUTH_USER_MODEL = ‘app_name.User’

This is the safest and easiest way build profiles. You can equally use the
AbstractBaseUser model if you need some more flexibility, but for most use
case, the AbstractUser model would do.

On Mon, Jun 28, 2021 at 14:17 Abdoulaye Koumaré 
wrote:

> If you're new the best way to create a profile is by using django signals
> you'll get more information about that at
> https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html
> .
>
> On Sunday, 27 June 2021 at 21:46:28 UTC suabiut wrote:
>
>> You can use the user model, do something like that
>>
>> class user_register(models.Model):
>>   user = models.OneToOneField(User,on_delete=models.CASCADE)
>>   join_date = models.DateTimeField(default=timezone.now)
>>
>> To view the user profile, you can do something like this.
>>
>> def user_profile(request, username):
>> user = User.objects.get(username=username)
>> context = {
>>"user": user
>> }
>>
>>
>> return render(request, 'profile.html', context)
>>
>> profile.html
>>
>> {{user.username}}
>> {{user.first_name}}
>>
>>
>> On Mon, Jun 28, 2021 at 2:43 AM Samir Areh  wrote:
>>
>>> Hello
>>> I'm new to django. i want to create a user profile. I want to know the
>>> best way to do this. 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/f84c5af2-12f1-41d3-9002-f0bc96f0371fn%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/a66be5bb-fff2-4b7e-a76c-4072fc5a3586n%40googlegroups.com
> 
> .
>
-- 
KeLLs

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


Re: can Django replace PHP ?

2021-06-28 Thread Ajeet Kumar Gupt
Django is a best in web development as well most secure in comparison to
php?

On Mon, Jun 28, 2021, 7:09 PM Ahmed omar miladi 
wrote:

> today django is the best for all web application
>
> Le lun. 28 juin 2021 à 14:17, Krishna Adhikari  a
> écrit :
>
>> Hello all  my seniors
>>
>> I am doing Data Science programming (python) for 3 years now in my
>> organization I also have to develop a Web Platform to deeply ML models and
>> also to develop other web applications together.
>>
>> I searched a lot of information on google, but till now I did not make a
>> decision should I learn PHP or I can handle it all with Django?
>>
>> *can we solve all kinds of web application problems with Django without
>> learning PHP ?? *
>> *or PHP also recommended.*
>>
>> Thank you all 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/f2007209-a90e-4a08-8d03-b2b3a1007e1en%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/CAE3Dc2N6CWH5w%3DTEpZRbh7tGv2jc06xBUO4Ym9d8cUs%2BS_eORQ%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%2BTqRsvXBgYjvpArmyCx4ANUHpm49jQBr9E5N1jD51EshA8Mkg%40mail.gmail.com.


Re: can Django replace PHP ?

2021-06-28 Thread Ahmed omar miladi
today django is the best for all web application

Le lun. 28 juin 2021 à 14:17, Krishna Adhikari  a
écrit :

> Hello all  my seniors
>
> I am doing Data Science programming (python) for 3 years now in my
> organization I also have to develop a Web Platform to deeply ML models and
> also to develop other web applications together.
>
> I searched a lot of information on google, but till now I did not make a
> decision should I learn PHP or I can handle it all with Django?
>
> *can we solve all kinds of web application problems with Django without
> learning PHP ?? *
> *or PHP also recommended.*
>
> Thank you all 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/f2007209-a90e-4a08-8d03-b2b3a1007e1en%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/CAE3Dc2N6CWH5w%3DTEpZRbh7tGv2jc06xBUO4Ym9d8cUs%2BS_eORQ%40mail.gmail.com.


Re: can Django replace PHP ?

2021-06-28 Thread Tim Chase
On 2021-06-27 21:20, Krishna Adhikari wrote:
> *can we solve all kinds of web application problems with Django
> without learning PHP ?? *
> *or PHP also recommended.*

For just about aspect, either they're interchangeable, or I find that
Python/Django wins (readability, library consistency, breadth of
library, security, availability).

The one area where PHP excels is deployment.  Want to deploy a PHP
app?  It usually involves dumping some files in a folder on a shared
hosting service, using a config-wizard to point it at the right
data-store, and you're done.  So if ease-of-new-installation mattered
most to me (such as setting up NextCloud/OwnCloud, dropping a gallery
or blog on shared cPanel hosting, etc), I might choose PHP.

Deploying Django project takes a little more hand-holding and the
right type of service-offerings from the hosting machine.

But if you have successfully deployed a Django project, you've
overcome the biggest hurdle, and Python/Django wins in pretty much
every subsequent category.

-tkc



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


Re: can Django replace PHP ?

2021-06-28 Thread Sam Chaffy
Django gives you a builtin admin panel for free.

Enjoy

On Mon, Jun 28, 2021 at 3:49 PM Boris Pérez  wrote:

> Hi friend...u can do everything u need in django...without use php...
> Greetings
>
>
> 2021-06-28 10:23 GMT-04:00, Luis Zárate :
> > Hi, you can create several web applications with Django. So I guest you
> can
> > replace all web stuff with Django or other lib in python for web
> > development.
> >
> > El lun, 28 jun 2021 a las 7:17, Krishna Adhikari ()
> > escribió:
> >
> >> Hello all  my seniors
> >>
> >> I am doing Data Science programming (python) for 3 years now in my
> >> organization I also have to develop a Web Platform to deeply ML models
> >> and
> >> also to develop other web applications together.
> >>
> >> I searched a lot of information on google, but till now I did not make a
> >> decision should I learn PHP or I can handle it all with Django?
> >>
> >> *can we solve all kinds of web application problems with Django without
> >> learning PHP ?? *
> >> *or PHP also recommended.*
> >>
> >> Thank you all 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/f2007209-a90e-4a08-8d03-b2b3a1007e1en%40googlegroups.com
> >> <
> https://groups.google.com/d/msgid/django-users/f2007209-a90e-4a08-8d03-b2b3a1007e1en%40googlegroups.com?utm_medium=email_source=footer
> >
> >> .
> >>
> >
> >
> > --
> > "La utopía sirve para caminar" Fernando Birri
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to django-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/django-users/CAG%2B5VyOqHw6jRfSu3WL97csjz2npODsO-anVRkGALOhD7fbrvw%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/CAObPVPDDwTg2tCTu_EtC_r5kw7zAekV_0YEL0QEchVsVJqk3qw%40mail.gmail.com
> .
>
-- 
Oussama Chafiqui

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


Re: can Django replace PHP ?

2021-06-28 Thread Boris Pérez
Hi friend...u can do everything u need in django...without use php...
Greetings


2021-06-28 10:23 GMT-04:00, Luis Zárate :
> Hi, you can create several web applications with Django. So I guest you can
> replace all web stuff with Django or other lib in python for web
> development.
>
> El lun, 28 jun 2021 a las 7:17, Krishna Adhikari ()
> escribió:
>
>> Hello all  my seniors
>>
>> I am doing Data Science programming (python) for 3 years now in my
>> organization I also have to develop a Web Platform to deeply ML models
>> and
>> also to develop other web applications together.
>>
>> I searched a lot of information on google, but till now I did not make a
>> decision should I learn PHP or I can handle it all with Django?
>>
>> *can we solve all kinds of web application problems with Django without
>> learning PHP ?? *
>> *or PHP also recommended.*
>>
>> Thank you all 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/f2007209-a90e-4a08-8d03-b2b3a1007e1en%40googlegroups.com
>> 
>> .
>>
>
>
> --
> "La utopía sirve para caminar" Fernando Birri
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAG%2B5VyOqHw6jRfSu3WL97csjz2npODsO-anVRkGALOhD7fbrvw%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/CAObPVPDDwTg2tCTu_EtC_r5kw7zAekV_0YEL0QEchVsVJqk3qw%40mail.gmail.com.


Re: can Django replace PHP ?

2021-06-28 Thread Luis Zárate
Hi, you can create several web applications with Django. So I guest you can
replace all web stuff with Django or other lib in python for web
development.

El lun, 28 jun 2021 a las 7:17, Krishna Adhikari ()
escribió:

> Hello all  my seniors
>
> I am doing Data Science programming (python) for 3 years now in my
> organization I also have to develop a Web Platform to deeply ML models and
> also to develop other web applications together.
>
> I searched a lot of information on google, but till now I did not make a
> decision should I learn PHP or I can handle it all with Django?
>
> *can we solve all kinds of web application problems with Django without
> learning PHP ?? *
> *or PHP also recommended.*
>
> Thank you all 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/f2007209-a90e-4a08-8d03-b2b3a1007e1en%40googlegroups.com
> 
> .
>


-- 
"La utopía sirve para caminar" Fernando Birri

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


can Django replace PHP ?

2021-06-28 Thread Krishna Adhikari
Hello all  my seniors 

I am doing Data Science programming (python) for 3 years now in my 
organization I also have to develop a Web Platform to deeply ML models and 
also to develop other web applications together.

I searched a lot of information on google, but till now I did not make a 
decision should I learn PHP or I can handle it all with Django?

*can we solve all kinds of web application problems with Django without 
learning PHP ?? *
*or PHP also recommended.*

Thank you all 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/f2007209-a90e-4a08-8d03-b2b3a1007e1en%40googlegroups.com.


Re: user profile in Django

2021-06-28 Thread Abdoulaye Koumaré
If you're new the best way to create a profile is by using django signals 
you'll get more information about that 
at 
https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html
 
.

On Sunday, 27 June 2021 at 21:46:28 UTC suabiut wrote:

> You can use the user model, do something like that
>
> class user_register(models.Model):
>   user = models.OneToOneField(User,on_delete=models.CASCADE)
>   join_date = models.DateTimeField(default=timezone.now)
>
> To view the user profile, you can do something like this.
>
> def user_profile(request, username):
> user = User.objects.get(username=username)
> context = {
>"user": user
> }
>
>
> return render(request, 'profile.html', context)
>
> profile.html
>
> {{user.username}}
> {{user.first_name}}
>
>
> On Mon, Jun 28, 2021 at 2:43 AM Samir Areh  wrote:
>
>> Hello
>> I'm new to django. i want to create a user profile. I want to know the 
>> best way to do this. 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/f84c5af2-12f1-41d3-9002-f0bc96f0371fn%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/a66be5bb-fff2-4b7e-a76c-4072fc5a3586n%40googlegroups.com.


MODEL CONSTRAINT (based on two dates)

2021-06-28 Thread ngallen4
I have two models like this



How can I make models constraint based on the dates as shows on image??

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/018101d76c16%242bbdd360%2483397a20%24%40gmail.com.


Re: In need of urgent help for products sorting and displaying

2021-06-28 Thread Kasper Laudrup
On 28/06/2021 13.58, Aritra Ray wrote:
> We've realised the error but are unable to fix it. We'll be grateful if
> you can solve it for us as we've been stuck on this for a long time.

I cannot solve your problems for you, but I and many others will be
happy to help if you provide some details on exactly what problems
you're having.

The idea of a mailing list/forum like this is helping each other and
learning from each other.

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/f956a3dc-d444-bd2b-1fcb-f6d7488c1679%40stacktrace.dk.


OpenPGP_signature
Description: OpenPGP digital signature


Re: In need of urgent help for products sorting and displaying

2021-06-28 Thread Aritra Ray
We've realised the error but are unable to fix it. We'll be grateful if you
can solve it for us as we've been stuck on this for a long time. The search
function in the views.py is conditioning the products via products.html
filter form which is requesting for a "products-list url" which looks like
this: path('products', Product.as_view(), name='products-list').
The problem is the url pattern. Can you help us resolve this issue?
The GitHub link to our repo is
https://github.com/First-project-01/Django-ecommerce


Will be of great help
Regards,
Aritra.


On Mon, 28 Jun 2021 at 16:40, Kasper Laudrup  wrote:

> On 28/06/2021 12.51, Adarsh Sarda wrote:
> >  I've been building a Django E-commerce website and I'm facing problems
> > displaying the sorted products on the products page of my website. I can
> > display the products by category sorting in which I'm using crispy-forms
> > to display the form but I am unable to display the products when sorted
> > by price. I've attached the required files below.
> >
> > Do let me know if anything else is needed.
> > Thanks for your help in advance
> >
>
> Check the "action" parameter to your form. Where exactly does the string
> given to that parameter end?
>
> That should help you figure out how to fix it.
>
> 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/bec6b39c-53a2-2905-eb4c-77cb24ba6c25%40stacktrace.dk
> .
>

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


Re: In need of urgent help for products sorting and displaying

2021-06-28 Thread Kasper Laudrup
On 28/06/2021 12.51, Adarsh Sarda wrote:
>  I've been building a Django E-commerce website and I'm facing problems
> displaying the sorted products on the products page of my website. I can
> display the products by category sorting in which I'm using crispy-forms
> to display the form but I am unable to display the products when sorted
> by price. I've attached the required files below.  
> 
> Do let me know if anything else is needed. 
> Thanks for your help in advance
> 

Check the "action" parameter to your form. Where exactly does the string
given to that parameter end?

That should help you figure out how to fix it.

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/bec6b39c-53a2-2905-eb4c-77cb24ba6c25%40stacktrace.dk.


OpenPGP_signature
Description: OpenPGP digital signature


I've got a problem with using factory with python zeep

2021-06-28 Thread Sencer Hamarat
Would you please checkout this StackOverflow link:

https://stackoverflow.com/questions/68160839/python-zeep-xml-factory-exception-with-no-namespace-defined-for-the-prefix

Regards,
Sencer HAMARAT

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


Re: using .annotate on a queryset and output field is a result of function

2021-06-28 Thread VISHESH MANGLA
this looks good, thanks

On Thu, Jun 17, 2021 at 6:08 PM Nikeet NA  wrote:

> Its not the perfect method you can optimize ot more if you want.
> You can prefer this Link
> 
>
> On Thu, 17 Jun 2021 at 18:06, Nikeet NA  wrote:
>
>> You can do it like this :
>>
>> class TransactionEntry(models.Manager):
>>def get_total_prices(self):
>>  return
>> self.queryset().defer("users").annotate.(total_price=F("num_shares")*F("price_per_share"))
>>
>> On Thu, 17 Jun 2021 at 15:31, VISHESH MANGLA <
>> f20170...@pilani.bits-pilani.ac.in> wrote:
>>
>>> what about overwriting the manager? How to make the manager auto-add
>>> those computed properties ?
>>>
>>> On Thursday, June 17, 2021 at 8:50:27 AM UTC+5:30 Nikeet NA wrote:
>>>
 You cannot use properties in django orm , it does not allow that.

 TransactionEntry.objects.defer("users").annotate(total_price=F("num_shares")*F("price_per_share")).values('total_price')
 On Thursday, 17 June 2021 at 03:23:01 UTC+5:30 VISHESH MANGLA wrote:

> Hello,
>
> I wanted to know that how for the model below,  how can I get a
> queryset with  all the fields excluding the `user` and including the
> output of get_output_field? Please avoid hardcoding.
> One way is
>
> `TransactionEntry
> .objects.defer("users").annotate(total_price=F("num_shares")*F("price_per_share"))`
>
> but that is undesirable. I just want to use that function on the model
> and not hard code the formula.
> Thanks,
>
>
>
> class TransactionEntry(models.Model):
> """Model to save data of users who want to buy/sell shares"""
>
> user = models.ForeignKey(
> to=Relative,
> on_delete=models.CASCADE,
> related_name="transaction_entry",
> )
>
> num_shares = models.PositiveIntegerField(null=False, blank=False)
> date_of_trade = models.DateField(null=False, blank=False)
> transaction_type = models.CharField(
> max_length=1,
> choices=TransactionType.choices,
> default=TransactionType.SELL,
> null=False,
> )
> price_per_share = models.FloatField(null=False, blank=False)
>
> def get_total_price(self):
> return self.num_shares * self.price_per_share
>
> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/35d917c8-e321-42eb-8050-f7849c0374e8n%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/CAFOOHnP8Y285E9HztCq8LUcTwZ3G%2BDT2T%2BgB35j_JfdK8va6ow%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/CALG_zn4xVxRhQPFD%2Bq%2BcC%3DAiFNfU3ZSxLgmPXhQu%3DQ-_hySbvQ%40mail.gmail.com.