Re: Working on a Django server Need Team to join me

2024-02-15 Thread DJANGO DEVELOPER
Not working.

On Thu, 15 Feb 2024, 6:13 pm Space1 Technology, 
wrote:

> Join via the WhatsApp link
> https://chat.whatsapp.com/Hlqd0qZJtQOEVfIpQSWHW8
>
> On Thu, 15 Feb 2024 at 14:11, Tushar  wrote:
>
>> Hi, I'm interested
>>
>> On Thu, Feb 15, 2024, 6:35 PM Space1 Technology 
>> wrote:
>>
>>> Anyone interested in working with me am working on a personal Django
>>> server project for my flutter frontend app. It’s a project am working on to
>>> boost my portfolio. Kindly send me hi. It’s a complex project with
>>> different features. Am using Django as a security layer to secure the
>>> frontend app which actually uses firebase as backend.
>>>
>>> You can join via the link:
>>>
>>> https://chat.whatsapp.com/Hlqd0qZJtQOEVfIpQSWHW8
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAPSG2fc8NaNLPwcOv3DKBehrK%3Dw5NnZmS5k1UXd_fSk25YcH3A%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/CAMiLjhZHWhu%3D105%3DieFycwT-9TvxyC6K3H%3DTbRGiG4SZtFqxow%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/CAPSG2ffVGA4T%2Bb%3DhQVSmnNLEdrMdbVpFy_%2BZ%3DRH6vNmKqQ1jWQ%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/CAKPY9pkQ4SwF6P0vRi9L5ZqJNLA_DviLXVFoz9KzUrX41cc2Lg%40mail.gmail.com.


Re: Working on a Django server Need Team to join me

2024-02-15 Thread DJANGO DEVELOPER
Hi. I am interested however your link is not working.

On Thu, 15 Feb 2024, 6:04 pm Space1 Technology, 
wrote:

> Anyone interested in working with me am working on a personal Django
> server project for my flutter frontend app. It’s a project am working on to
> boost my portfolio. Kindly send me hi. It’s a complex project with
> different features. Am using Django as a security layer to secure the
> frontend app which actually uses firebase as backend.
>
> You can join via the link:
>
> https://chat.whatsapp.com/Hlqd0qZJtQOEVfIpQSWHW8
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPSG2fc8NaNLPwcOv3DKBehrK%3Dw5NnZmS5k1UXd_fSk25YcH3A%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/CAKPY9pndwdHGrUBgdo5gfGJg%3Dbo-r6oAN0HxWuWDt3%3D40zZRng%40mail.gmail.com.


Re: In Need of Collaboration With a Django Dev in Europe

2023-06-20 Thread DJANGO DEVELOPER
Weldone Sebastian.

On Tue, 20 Jun 2023, 5:31 pm Sebastian Jung, 
wrote:

> Hello Ome,
>
> I open zerotenweb.com.ng and no https security. When i force https
> connection then i get security risk error. All .js,.jpg etc.pp. are not
> loading. I am sorry but i think when you are not able to implement your own
> website then you couldn't make a website for european customer.
>
> Sorry but first try to make a very good own website... Then writes again.
>
> Regards
>
>
> ome chukwuemeka  schrieb am Di., 20. Juni 2023,
> 11:22:
>
>> Hello Everyone,
>>
>> I'm the lead developer at ZeroTen Technologies and we are looking at
>> expanding our business to the European Market.
>>
>> We build Software, Mobile Apps and Websites. Most of our website products
>> are built with Django.
>>
>> We are looking for a business partnership and collaboration with a Django
>> Developer that is resident in Austria or Europe. But we prefer Austria.
>>
>> If you are available, kindly reply to this conversation or send me an
>> email at ad...@zerotenweb.com.ng
>>
>> Thanks
>>
>> Ome Chukwuemeka
>> Lead Developer ZeroTen Technologies
>> +2348064515245(WhatsApp only)
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/0473ac50-37ff-4aa7-bf02-20d2892fb945n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/0473ac50-37ff-4aa7-bf02-20d2892fb945n%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/CAKGT9mxn%2BR33UUF9OWL0pMOyYw_w-d-2cfFFHK2sG%2BiB4czMJQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAKGT9mxn%2BR33UUF9OWL0pMOyYw_w-d-2cfFFHK2sG%2BiB4czMJQ%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/CAKPY9p%3DB60NErQY5iwL9uZ8hnq%2BDejvxbi1TDczRCe9e8PYkpw%40mail.gmail.com.


Re: Page Integration

2022-11-10 Thread DJANGO DEVELOPER
you need to share the code.no one will be able to help you this way.

On Thu, Nov 10, 2022 at 8:49 PM Lakshyaraj Dash <
dashlakshyaraj2...@gmail.com> wrote:

> Please see that if you're calling the .save() method or not
>
> On Thu, Nov 10, 2022, 21:02 Pooja Kumari  wrote:
>
>> Hi.. Can anyone help me with django templates? Actually I have a
>> registration page where user can signup and data will be saved in admin
>> panel or database but I am not able to do that. Registration page is
>> working when I hit URL but data is not saving in database. Let me know If
>> anyone have idea about this type of project. I'll be very grateful for your
>> help.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAHYvwbWDVFjuddPah3WUX8M9H6ojvDSjQD_mn7W6AgcT_pQsGQ%40mail.gmail.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAF7qQgBrQoWDSpStS9quQ1jSWxpAD9s7kJqHgFCgiCnEMtd%2BfQ%40mail.gmail.com
> 
> .
>

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


Re: Looking for available support to start a School Management Application

2022-11-06 Thread DJANGO DEVELOPER
Are you looking for a paid support?

On Mon, 7 Nov 2022, 9:41 am ritik sahoo,  wrote:

> I have
>
> On Mon, 7 Nov, 2022, 5:34 am Makrand,  wrote:
>
>> I have developed School management system. I am interested to complete
>> support.
>>
>> On Mon, Nov 7, 2022, 4:27 AM Ahmed omar miladi 
>> wrote:
>>
>>> hello frncseric i'm ahmed omar miladi i'm full stack developer and
>>> django specialist i build a platform with name is allcarta check
>>> https://www.allcarta.com and i can help you to build a
>>> school management system
>>>
>>> On Sun, 6 Nov 2022 at 23:05, nef  wrote:
>>>
 Hi everyone,
 I am beginer in Django, not much experience.
 I have been task to develop an application for school management
 (Admission, Registration,  Attendance, Report marks, and more functions).
 I am wondering if there is an existing open smilare app or something
 which can be use as baseline to start or guide me with best practices.
 Thank you
 Eric

 --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to django-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/176ec5a0-2e00-4f53-b5c3-1bfc72f3aa94n%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/CAE3Dc2PkKJUF19fSykG%2BAmYByW6MY49UW%3DHSiKEL%2BPnZ6CHrvA%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/CAA_ekM%2BRQKYixBpZnZzYaN9cE9ete_PpPX%2BVJEj3e%2B%2BK2jktbQ%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/CAJwehCvV8YkQXf5y5AM_OGTH0vmv_f_kuHyTq7K0p_HyKG3-Sg%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/CAKPY9pnVbYxmp%3DOq%2BbNtRXKJhy78jnzozkFn5VMnn%3DKcUTZ6Gw%40mail.gmail.com.


Re: Looking for support in optimizing mobile www... tips or someone would like to do that for $ ?

2022-09-20 Thread DJANGO DEVELOPER
Can you please tell me that how many users do you have in your app? What is
the current performance of your app and what is the expected performance in
your mind?

On Tue, 20 Sep 2022, 6:38 pm Krzysztof Krawczyk, 
wrote:

> 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/60b0d1cb-4eca-4f2d-8163-7729f66c0327n%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/CAKPY9pkUoYnnnFbbSmFAeW-b4Zq2Vrw_8sjM6V-6WOa6e_gQag%40mail.gmail.com.


Re: Looking for a Django firm

2022-09-14 Thread DJANGO DEVELOPER
Hello Mike!
I had interest in chemistry when I was in school. But I have ability to
work in any field using Django.
I am looking forward to meeting you so that you can

On Wed, 14 Sep 2022, 10:16 pm Chelsea Fan, 
wrote:

> I am interested, from Turkmenistan
>
> On Wed, Sep 14, 2022 at 9:49 PM Damanjeet Singh 
> wrote:
>
>> Hello Mike,
>>
>> I am interested and from UK.
>>
>> If you let me know your email, I can forward my profile to you.
>>
>> Regards
>> Damanjeet
>> mailtoda...@gmail.com
>>
>> On Tue, 13 Sept 2022, 01:01 Mike Dewhirst,  wrote:
>>
>>> Hi all - I'm looking for a Django outfit with an interest in chemistry
>>> or customers in the chemical industry in Australia.
>>>
>>> Possible opportunity.
>>>
>>> Best to respond off list and there will be an NDA.
>>>
>>> Cheers
>>>
>>> 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/5b7dfee7-dc18-052d-994f-a27bb78ed71d%40dewhirst.com.au
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAGLHGi4QeHpjA3RMgGh%2BWW1bz1cj2xxEN4gfdXu00NNnnBoDjw%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/CAJwZndeeATxK6aP9e_ZyZTS6DYo8gbGtCtfBcwbe8LD6%3DqZBdg%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/CAKPY9pk8M4Pyu4TjtRnUngkw1qeHWwYwvKasWNggbOziCWt2_A%40mail.gmail.com.


Re: Django Model related_name

2022-09-06 Thread DJANGO DEVELOPER
when you want to fetch multiple objects from that model ( having a foreign
key relation)

On Tue, Sep 6, 2022 at 3:21 PM Justin Kpakpa  wrote:

> Hello, pls under what circumstances do you need to defined a related_name
> of a model field?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/63171f1d.170a0220.87ca8.aef5%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/CAKPY9pkxaO3Gj9CZE7pwCchwe2kDhrazpZQYBOJjuM_BjH4ODA%40mail.gmail.com.


Re: Job -Fullstack python expert ( Django framework)

2022-08-19 Thread DJANGO DEVELOPER
Hey!
I am A Django developer with front-end skills and have been resolving my
clients' issues for 2 years now.
I may not have that much experience who can work on java or spring boot but
I consider myself a rockstar in Django.
I am interested to have a meeting with you if you think that I am the best
fit for your project.


On Fri, Aug 19, 2022 at 12:36 PM ola neat  wrote:

> I'm interested
>
> On Thu, Aug 18, 2022, 20:03 Each1Teach1 
> wrote:
>
>> This project is very straight to the point. We are building a micro
>> service on top of Django framework. We currently have a virtual private
>> cloud on DO and will like to migrate to AWS in the nearest future. This
>> hosts our encryption SDK including authentication APIs and licensing
>> mechanism.
>>
>> Our current stack is Django framework (major code in java) using python
>> over the py4j bridge to call and run it. This consumed via API (RestFul).
>> We recently added Springboot.
>>
>> What we want to accomplish:
>> We really need the qualified person to be ready to hit the ground running
>> with new ideas and able to train or teach other fullstack developers. We
>> fully cloud based.
>> 1. Design and Build a micro service with clusters to address demand with
>> licensing of our SDK orchestrated in a way that unauthorized cannot break
>> to use it.
>> 2. Automate our licensing protocols as we release bearer tokens for the
>> use of our algorithm
>> 3. Expand the API to include other functionality with 2 other companies
>> 4. Build a fetch request based on push from clients mobile and web
>> application in which our encryption algo is already embedded.
>> 5. Integrate with eth staking for challenge where the actionable
>> parameter e.g BMI could now be shared with data brokers n a secure and
>> privacy preserving way.
>>
>> If you have the skills and believe that you are a good fit don't hesitate
>> to reach me asap.
>> We require that you will be available online e.g skype, whatsapp and as
>> well as in our app for message..There could be a possible long term
>> opportunity for the right candidate.
>>
>> There are many interesting projects.
>>
>> Be certain that you are a guru and can impart knowledge to others.
>>
>> Reach if you are interested.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send 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%2BGDpiShO%2BF%3DtF_eB12kt0DSbVRWKRJ-39KpBfPfB%2BHmfvofKg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CA%2BGDpiShO%2BF%3DtF_eB12kt0DSbVRWKRJ-39KpBfPfB%2BHmfvofKg%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/CAHLKn71yUQ8H%3DMMbWDXGoCVxn%2BsBk_20NJX4aSdo5NnZHLf3mw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAHLKn71yUQ8H%3DMMbWDXGoCVxn%2BsBk_20NJX4aSdo5NnZHLf3mw%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/CAKPY9pkTitGNq-N9-__tSDKNcU9RPPeKYGuOCXYYPa-G2P_jKA%40mail.gmail.com.


Re: Django developer Resume

2022-08-17 Thread DJANGO DEVELOPER
Can you please share any project in which you have implemented a stripe
recurring system?

On Wed, Aug 17, 2022 at 8:21 PM M Adnan  wrote:

> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CABNyTSqv8Km%3DtWg-KnqQNZ_fo3zZ-Y_yo5Kx%2Bns18-voYj0Gzw%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/CAKPY9pnUiO9fbi4ZY4eQDU-kRak1GG_DCgHuzu4ZLUJR%2ByPXzg%40mail.gmail.com.


Re: Hiring experienced Python + Django engineer

2022-07-21 Thread DJANGO DEVELOPER
Hi Mathew!
I have just applied on the provided email. would love to work with an
interesting team of professionals.

On Thu, Jul 21, 2022 at 10:14 PM Matthew Sherman 
wrote:

> Hi folks! My company, Clarity (claritytuition.com) is looking to fill a
> Senior Software Engineer role. We are building a financial aid platform to
> simplify the process of applying and obtaining financial aid for families,
> as well as provide tools for schools to think more like the businesses that
> they are.
>
> Our team size has gone from 0 to 15 in the past 9 months. We are seeing
> some explosive growth and are hoping to find another technical partner to
> join the journey with us. The team is awesome, work culture is chill, we
> pay well, and care about each other. It's super fulfilling, genuinely.
>
> We have two open positions. If you're interested in chatting, we are too!
> jobs.claritytuition.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/1ce18235-3ebc-4ae6-8521-b7bb7f865d1an%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/CAKPY9pmQVFpAWV5%2BBBRyKtXdEo2-yWVvyW8SdPsvKK_9pLtm%3DA%40mail.gmail.com.


Re: HELP ON SETUP HEROKU ON CLOUDINARY FREE ACCOUNT

2022-07-03 Thread DJANGO DEVELOPER
following

On Sun, Jul 3, 2022 at 3:21 AM ola neat  wrote:

> hello guys,
> i've got a project i deployed on heroku and i'm using cloudinary to
> handle  image upload, which is working perfectly offline but the issue is
> once i try it online i get this err
> ```
>
> ValueError at /profile/247de095-6895-4bff-a836-dedfa75cde4b/update
>
> Must supply api_key
> ```
>
> and i have add heroku key & url to my heroku config variable using `heroku 
> config:set CLOUDINARY_API_KEY='api_key' ` but still i'm still hgetting err, 
> can anyone help ont
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHLKn71pdwojCuLaLJ%3DKt%3DXHsE38TTyKhRvuFozaqxSNfY3jPQ%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/CAKPY9pkfSrePeyswxp8MdxBjPAR1MNyPhzxO_hpYqvyC_%2Bdeow%40mail.gmail.com.


Re: Looking for experienced Django backend engineer

2022-07-02 Thread DJANGO DEVELOPER
Hi Tony!
I am also a Python/Django developer with 2 years of experience.
have helped almost 22 clients on upwork in 1 year.
you can reach out to me on this email: abubakarbr...@gmail.com

On Sun, Jul 3, 2022 at 3:38 AM Tony Wong  wrote:

> Yes. Please
> Good dev is always needed
>
> Tony
>
> On Sat, Jul 2, 2022 at 3:23 PM Sunday Ajayi  wrote:
>
>> Hi Tony,
>>
>> Apologies for the late response.
>> But if you still need a dev, I can still share my resume with you.
>> Regards
>> *AJAYI Sunday *
>> (+234) 806 771 5394
>> *sunnexaj...@gmail.com *
>>
>>
>>
>> On Fri, Feb 25, 2022 at 1:06 AM anderso...@gmail.com <
>> anderson.wan...@gmail.com> wrote:
>>
>>> the domain name we bought is : datamall DOT ai.
>>> In short, it help AI company to collect data they need ,and users get
>>> paid for submitting the data.
>>>
>>> We treat all user uploaded data as NFT, thus we are also building our
>>> public blockchain, but it might be centralized. Just like E-CNY, but we
>>> plan to open all transaction history.
>>>
>>> Best wishes.
>>> Tony
>>>
>>>
>>> On Thursday, February 24, 2022 at 8:34:50 AM UTC-8 sunne...@gmail.com
>>> wrote:
>>>
>>>> Hi Tony,
>>>>
>>>> You can share a mail of what the project is about. I may be interested.
>>>>
>>>> Regards
>>>> *AJAYI Sunday *
>>>> (+234) 806 771 5394 <+234%20806%20771%205394>
>>>> *sunne...@gmail.com*
>>>>
>>>>
>>>>
>>>> On Thu, Feb 24, 2022 at 3:05 PM anderso...@gmail.com <
>>>> anderso...@gmail.com> wrote:
>>>>
>>>>> Dear all,
>>>>>
>>>>> I'm a SDE, trying to start a startup company.
>>>>> Since I learned Django before, so, I plan to use Django to build the
>>>>> backend.
>>>>>
>>>>> But still, we need an backend engineer for our server.
>>>>> Ping me if you are interestd.
>>>>>
>>>>> You can consider this as both freelancer, and stock if it is a good
>>>>> match.
>>>>>
>>>>> Please send me your Resume.
>>>>>
>>>>> Best wishes.
>>>>>
>>>>> Tony Wong
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed 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/f13e6f81-8490-4418-9d38-ad14ba17790fn%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/django-users/f13e6f81-8490-4418-9d38-ad14ba17790fn%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/f9dd0af2-8917-4379-8dec-0a583db3605cn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/f9dd0af2-8917-4379-8dec-0a583db3605cn%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/veFA7lPluGg/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAKYSAw3S%3D_pgQcdq9ZN1Ho1AhNi_z1N83aUFbRhwdrM45uyXUA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAKYSAw3S%3D_pgQcdq9ZN1Ho1AhNi_z1N83aUFbRhwdrM45uyXUA%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/CAJkRgPc39kxCQdaewokTLLR52iq3Gj_gkqtHw%2BmPufcwUrtfNA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAJkRgPc39kxCQdaewokTLLR52iq3Gj_gkqtHw%2BmPufcwUrtfNA%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/CAKPY9pm0VdrQ6JL1E1pt%2BmSR_e1oEaLRMohABTWyrtpqfqCWAQ%40mail.gmail.com.


Re: is anybody know how to add multiple fields on html form when user click on + icon

2022-06-17 Thread DJANGO DEVELOPER
use jquery

On Fri, Jun 17, 2022 at 12:08 PM Abhinandan K 
wrote:

> for example-
> fields are-
> name,age,salary.  +
> and when user click on + sign same fields increased according to user
> clicks on + sign..
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAA6_Mp7YOmRprYhKu0Xb0%3DTVQqLTMEn7St2xRVrQjJeQ%2BghOgg%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/CAKPY9pnoFmjCjgyKpFe1X23wRiY07Qc3S_7vVDHK%3D%3DJHihSzRA%40mail.gmail.com.


Re: Single user as a seller and buyer at the same time.

2022-05-10 Thread DJANGO DEVELOPER
yes. I went through the documentation but did not work on what I wanted to
achieve. I am totally lost

On Tue, May 10, 2022 at 5:05 PM Kasper Laudrup 
wrote:

> On 10/05/2022 11.53, DJANGO DEVELOPER wrote:
> > yes, I know. but how to use them?
> >
>
> The link literally starts with "This document explains the usage of
> Django’s authentication system in its default configuration" so it seems
> like an obvious place to look in order to figure out "how to use them".
>
> Have you tried reading the documentation?
>
> 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/ab9cf185-708b-607e-5923-b98a1319e130%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/CAKPY9pkfi23fUwB1ri%3DtjwrwWdXXvK86TDJ9fb56%2B%3DE0OOjpgg%40mail.gmail.com.


Re: Single user as a seller and buyer at the same time.

2022-05-10 Thread DJANGO DEVELOPER
yes, I know. but how to use them?

On Tue, May 10, 2022 at 1:11 PM George Tantiras  wrote:

>
> What about Django permissions?
>
>  https://docs.djangoproject.com/en/4.0/topics/auth/default/
>
> A user can be related to many groups.
> 20:23, 9 May 2022, DJANGO DEVELOPER :
>
>
> https://stackoverflow.com/questions/72161764/how-to-make-a-user-act-as-a-seller-and-as-a-buyer-at-the-same-time-in-django
>
> I have posted my problem on StackOverflow. can anyone help me? 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/CAKPY9p%3D%2BirhRbBaH%3DXi033FAX9EhQZVWJJ7fUP0c0HOn6pHsSQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAKPY9p%3D%2BirhRbBaH%3DXi033FAX9EhQZVWJJ7fUP0c0HOn6pHsSQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
>
>
>
> --
> Sent from Yandex Mail for mobile
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1041181652170234%40sas1-229a7e5e75ed.qloud-c.yandex.net
> <https://groups.google.com/d/msgid/django-users/1041181652170234%40sas1-229a7e5e75ed.qloud-c.yandex.net?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/CAKPY9p%3Du3Y3Ap6%3DkgeEDTcYHcCWsxuEjRTjSsnZRNtuiUWRxbg%40mail.gmail.com.


Single user as a seller and buyer at the same time.

2022-05-09 Thread DJANGO DEVELOPER
https://stackoverflow.com/questions/72161764/how-to-make-a-user-act-as-a-seller-and-as-a-buyer-at-the-same-time-in-django

I have posted my problem on StackOverflow. can anyone help me? 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/CAKPY9p%3D%2BirhRbBaH%3DXi033FAX9EhQZVWJJ7fUP0c0HOn6pHsSQ%40mail.gmail.com.


Re: Got an error creating the test database: database "" already exists

2022-03-17 Thread DJANGO DEVELOPER
what version of Django are you using? and how did you make migrations?
Should be like this:
1 - python manage.py makemigrations
2 - python manage.py migrate
are you using custom user model? or django's built in User model?

On Thu, Mar 17, 2022 at 3:42 PM Prashanth Patelc 
wrote:

> Check your settings.py once
> Add auth_user='app.UserModel'
>
> Or
> 1) delete database and migrations
> 2) create new db
> 3) python manage.py makemigration
> 4) python manage.py migrate
>
>
> On Thu, Mar 17, 2022, 9:35 AM Avinash Alanjakar 
> wrote:
>
>>
>> Their are lots of pre-bulit apps in django so you need to migrate them
>> first.
>> In your case you are using the authentication with migrating their tables
>> with database.
>>
>> Try to run command in this sequence. This might be solve your problem.
>>
>>
>> python manage.py migrate
>>
>> python manage.py makemigrations
>>
>> python manage.py migrate
>>
>>
>> Thanks,
>> Avinash
>>
>> On Thu, 17 Mar, 2022, 8:53 am Salima Begum, 
>> wrote:
>>
>>> Yes I run migrations still I am seeing the new issue below
>>> ```
>>> django.db.utils.ProgrammingError: relation "auth_user" does not exist
>>> ```
>>> Thank you
>>> ~Salima
>>>
>>> On Wed, Mar 16, 2022 at 9:23 PM DJANGO DEVELOPER <
>>> abubakarbr...@gmail.com> wrote:
>>>
>>>> you need to run migrations first and then run the tests. if the issue
>>>> still persists. let me know
>>>>
>>>> On Wed, Mar 16, 2022 at 2:15 PM Sebastian Jung <
>>>> sebastian.ju...@gmail.com> wrote:
>>>>
>>>>> Hey salima,
>>>>>
>>>>> This error is strange. Django try to use a Relation in postgresql
>>>>> which doesn't exist.
>>>>>
>>>>> I have only tip that you cam reset database. I would delete database
>>>>> in postgresql and create it new with psql tool. After this you must reset
>>>>> all migrations:
>>>>>
>>>>>
>>>>> https://simpleisbetterthancomplex.com/tutorial/2016/07/26/how-to-reset-migrations.html
>>>>>
>>>>> And after this when you migrate it, then structure is created in new
>>>>> database.
>>>>>
>>>>> I am sorry i have no idea how yoz can fix relation exception manual.
>>>>>
>>>>> Regards
>>>>>
>>>>>
>>>>> Salima Begum  schrieb am Mi., 16. März
>>>>> 2022, 06:51:
>>>>>
>>>>>> Hi all,
>>>>>> After writing test cases I run test cases I am getting an error below
>>>>>> ```
>>>>>> Python manage.py behave
>>>>>> ```
>>>>>> After running the above command I am getting this error.
>>>>>> ```
>>>>>> Creating test database for alias 'default'...
>>>>>> Got an error creating the test database: database "test_newDataBase"
>>>>>> already exists
>>>>>>
>>>>>> Type 'yes' if you would like to try deleting the test database
>>>>>> 'test_newDataBase', or 'no' to cancel: yes
>>>>>> Destroying old test database for alias 'default'...
>>>>>> Traceback (most recent call last):
>>>>>>   File "C:\Users\USER
>>>>>> 1\PycharmProjects\behaveproject\venv\lib\site-packages\django\db\backends\utils.py",
>>>>>> line 86, in _execute
>>>>>> return self.cursor.execute(sql, params)
>>>>>> psycopg2.errors.UndefinedTable: relation "trades_trade_table" does
>>>>>> not exist
>>>>>> .
>>>>>> .
>>>>>> django.db.utils.ProgrammingError: relation "trades_vk_trade_table"
>>>>>> does not exist
>>>>>> ```
>>>>>> Please help me to resolve this issue.
>>>>>>
>>>>>> Thank you
>>>>>> ~Salima
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "Django users" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to django-users+unsubscr...@googlegroups.com.
>>>>>> To view this

Re: Got an error creating the test database: database "" already exists

2022-03-16 Thread DJANGO DEVELOPER
you need to run migrations first and then run the tests. if the issue still
persists. let me know

On Wed, Mar 16, 2022 at 2:15 PM Sebastian Jung 
wrote:

> Hey salima,
>
> This error is strange. Django try to use a Relation in postgresql which
> doesn't exist.
>
> I have only tip that you cam reset database. I would delete database in
> postgresql and create it new with psql tool. After this you must reset all
> migrations:
>
>
> https://simpleisbetterthancomplex.com/tutorial/2016/07/26/how-to-reset-migrations.html
>
> And after this when you migrate it, then structure is created in new
> database.
>
> I am sorry i have no idea how yoz can fix relation exception manual.
>
> Regards
>
>
> Salima Begum  schrieb am Mi., 16. März
> 2022, 06:51:
>
>> Hi all,
>> After writing test cases I run test cases I am getting an error below
>> ```
>> Python manage.py behave
>> ```
>> After running the above command I am getting this error.
>> ```
>> Creating test database for alias 'default'...
>> Got an error creating the test database: database "test_newDataBase"
>> already exists
>>
>> Type 'yes' if you would like to try deleting the test database
>> 'test_newDataBase', or 'no' to cancel: yes
>> Destroying old test database for alias 'default'...
>> Traceback (most recent call last):
>>   File "C:\Users\USER
>> 1\PycharmProjects\behaveproject\venv\lib\site-packages\django\db\backends\utils.py",
>> line 86, in _execute
>> return self.cursor.execute(sql, params)
>> psycopg2.errors.UndefinedTable: relation "trades_trade_table" does not
>> exist
>> .
>> .
>> django.db.utils.ProgrammingError: relation "trades_vk_trade_table" does
>> not exist
>> ```
>> Please help me to resolve this issue.
>>
>> Thank you
>> ~Salima
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAMSz6b%3DTEv%3DH25L7giQV6w%3DYw6%3D6GJrvh5zPezqQWMger3VNzQ%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/CAKGT9mx2sRizWo8Qd%3Dn6yYFKUB1KvjKH%2Bi92Hj_fdoStRYc%3DWg%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/CAKPY9pkx0hJ3U_DFCia_UUY-ecieMJ0%2BE3uE75aTziehr1KWSg%40mail.gmail.com.


Re: how to Display images other than from static folder.

2022-01-31 Thread DJANGO DEVELOPER
have you set up the static files in settings.py ?

On Mon, Jan 31, 2022 at 8:49 PM ramsha azhar 
wrote:

> I just want to display the attached Tree.png image on the HTML page but
> this image is created each time new according to the user input file. guide
> me how to set the path of this mage on an HTML page or how to display this
> tree.png as a user output image.
>
> On Mon, Jan 31, 2022 at 8:36 PM DJANGO DEVELOPER 
> wrote:
>
>> tell me what you want to get as a result? do you want to display multiple
>> images on HTML template?
>>
>> On Mon, Jan 31, 2022 at 8:27 PM ramsha azhar 
>> wrote:
>>
>>> So guide me the write way ...
>>>
>>> On Mon, 31 Jan 2022, 7:45 pm DJANGO DEVELOPER, 
>>> wrote:
>>>
>>>> you are doing it the wrong way. totally the wrong way. I am not being
>>>> rude.
>>>>
>>>> On Mon, Jan 31, 2022 at 7:42 PM ramsha azhar 
>>>> wrote:
>>>>
>>>>> Gide me Django develpers. I just want to display my pictures that are
>>>>> created each time new.
>>>>> My mages are created in my project folder, not in the static folder.
>>>>> how I display images on the HTML page by using the path of my project
>>>>> folder.
>>>>>
>>>>> views.py
>>>>>
>>>>> def Image_display(request):
>>>>>   BASE_DIR =
>>>>> os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>>>>>   filename = 'Tree.jpg'
>>>>>   filepath = BASE_DIR + '//' + filename
>>>>>   images = Image.objects.all('filepath')
>>>>>   return render(request, "xyz.html", {'images': images})
>>>>>
>>>>> url.py
>>>>> path('Image_display/', views.Image_display, name="Image_display"),
>>>>>
>>>>> HTML page
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Django users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to django-users+unsubscr...@googlegroups.com.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/django-users/8da245ea-ea90-4730-83c0-accafc93b86bn%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/django-users/8da245ea-ea90-4730-83c0-accafc93b86bn%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/CAKPY9p%3DE1FmUc%3Dqqy1tGYBJbimFX873XXSTDndnn4kVUjo3ZWg%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAKPY9p%3DE1FmUc%3Dqqy1tGYBJbimFX873XXSTDndnn4kVUjo3ZWg%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/CAMyb2%3DheLgJo5dMxsCgQ8cm%3Dp0px5EHpLr2frYtDowV8mmC%2BbQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAMyb2%3DheLgJo5dMxsCgQ8cm%3Dp0px5EHpLr2frYtDowV8mmC%2BbQ%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/CAKPY9p%3DOofwq7YrTp%3DWoKyO7mgxVovK2wN3-%3Dm9Ed2zTWZ%2BdAg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAKPY9p%3DOofwq7YrTp%3DWoKyO7mgxVovK2wN3-%3Dm9Ed2zTWZ%2BdAg%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/CAMyb2%3Dh18EtBixgvyLF2wn-eLNA-uvwejxszEMeu9-kqyVL5xQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAMyb2%3Dh18EtBixgvyLF2wn-eLNA-uvwejxszEMeu9-kqyVL5xQ%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/CAKPY9pmoTLTnt_5i%3DNeWtRSSS1BjfyVZ%2BL%3DCSALwnOnZwu6zGw%40mail.gmail.com.


Re: how to Display images other than from static folder.

2022-01-31 Thread DJANGO DEVELOPER
tell me what you want to get as a result? do you want to display multiple
images on HTML template?

On Mon, Jan 31, 2022 at 8:27 PM ramsha azhar 
wrote:

> So guide me the write way ...
>
> On Mon, 31 Jan 2022, 7:45 pm DJANGO DEVELOPER, 
> wrote:
>
>> you are doing it the wrong way. totally the wrong way. I am not being
>> rude.
>>
>> On Mon, Jan 31, 2022 at 7:42 PM ramsha azhar 
>> wrote:
>>
>>> Gide me Django develpers. I just want to display my pictures that are
>>> created each time new.
>>> My mages are created in my project folder, not in the static folder.
>>> how I display images on the HTML page by using the path of my project
>>> folder.
>>>
>>> views.py
>>>
>>> def Image_display(request):
>>>   BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>>>   filename = 'Tree.jpg'
>>>   filepath = BASE_DIR + '//' + filename
>>>   images = Image.objects.all('filepath')
>>>   return render(request, "xyz.html", {'images': images})
>>>
>>> url.py
>>> path('Image_display/', views.Image_display, name="Image_display"),
>>>
>>> HTML page
>>> 
>>> 
>>> 
>>> 
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/8da245ea-ea90-4730-83c0-accafc93b86bn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/8da245ea-ea90-4730-83c0-accafc93b86bn%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/CAKPY9p%3DE1FmUc%3Dqqy1tGYBJbimFX873XXSTDndnn4kVUjo3ZWg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAKPY9p%3DE1FmUc%3Dqqy1tGYBJbimFX873XXSTDndnn4kVUjo3ZWg%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/CAMyb2%3DheLgJo5dMxsCgQ8cm%3Dp0px5EHpLr2frYtDowV8mmC%2BbQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAMyb2%3DheLgJo5dMxsCgQ8cm%3Dp0px5EHpLr2frYtDowV8mmC%2BbQ%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/CAKPY9p%3DOofwq7YrTp%3DWoKyO7mgxVovK2wN3-%3Dm9Ed2zTWZ%2BdAg%40mail.gmail.com.


Re: how to Display images other than from static folder.

2022-01-31 Thread DJANGO DEVELOPER
you are doing it the wrong way. totally the wrong way. I am not being rude.

On Mon, Jan 31, 2022 at 7:42 PM ramsha azhar 
wrote:

> Gide me Django develpers. I just want to display my pictures that are
> created each time new.
> My mages are created in my project folder, not in the static folder.
> how I display images on the HTML page by using the path of my project
> folder.
>
> views.py
>
> def Image_display(request):
>   BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
>   filename = 'Tree.jpg'
>   filepath = BASE_DIR + '//' + filename
>   images = Image.objects.all('filepath')
>   return render(request, "xyz.html", {'images': images})
>
> url.py
> path('Image_display/', views.Image_display, name="Image_display"),
>
> HTML page
> 
> 
> 
> 
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/8da245ea-ea90-4730-83c0-accafc93b86bn%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/CAKPY9p%3DE1FmUc%3Dqqy1tGYBJbimFX873XXSTDndnn4kVUjo3ZWg%40mail.gmail.com.


Re: order_by on the basis of time difference (updated_at - created_at)

2022-01-22 Thread DJANGO DEVELOPER
you can use datetime.datetime.strptime to avoid this error. I resolved it
few days back.
for this you have to import datetime like this: import datetime

On Sat, Jan 22, 2022 at 12:19 PM Lalit Suthar 
wrote:

> Fabio C. Barrionuevo da Luz's answer will work like a charm!
>
>
>
> On Fri, 21 Jan 2022 at 21:04, Fabio C. Barrionuevo da Luz <
> bna...@gmail.com> wrote:
>
>> this can be easily solved by using an annotation to calculate the
>> difference and store it in a new temporary column, and then sort by it
>>
>>
>> from django.db.models import F
>> from myapp.models import ExampleModel
>>
>> queryset = ExampleModel.objects.annotate(
>> dt_difference=F('updated_at') - F('created_at')
>> ).order_by('dt_difference')
>>
>> for example in queryset[:10]:
>> print(f'created_at={example.created_at} -
>> updated_at={example.updated_at} - dt_difference={example.dt_difference}')
>>
>>
>>
>> Em sex., 21 de jan. de 2022 às 10:54, Gabriel Araya Garcia <
>> gabrielaraya2...@gmail.com> escreveu:
>>
>>> Try this:
>>> ExampleModel.objects.all().order_by('updated_at' , '-created_at')
>>> Gabriel Araya Garcia
>>> GMI - Desarrollo de Sistemas Informáticos
>>>
>>>
>>>
>>>
>>> El vie, 21 ene 2022 a las 1:54, Aadil Rashid ()
>>> escribió:
>>>
 class ExampleModel(models.Model):
 is_active = models.BooleanField(default=True)
 created_at = models.DateTimeField(auto_now_add=True)
 updated_at = models.DateTimeField(auto_now=True)



 I want to query on UserModel such that the Query set which I get
 should be orderable in terms of time difference of updated_at - created_at,
 I tried
 ExampleModel.objects.all().order_by('updated_at' - 'created_at')
 but this is not working
 it throws, *TypeError*: unsupported operand type(s) for -: 'str' and
 'str'


 Django Family Please 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/CAAYXZx8sABKuJn5Q1ATeHnYsrixfU9wTH_TtPYoR5%3DeAd8DOzA%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/CAKVvSDDy%2BnJNcFE-xpz38zfDVYgw6P3zDZ9BJ_5-EsoAtDDLTw%40mail.gmail.com
>>> 
>>> .
>>>
>>
>>
>> --
>> Fábio C. Barrionuevo da Luz
>> Palmas - Tocantins - Brasil - América do Sul
>>
>> http://pythonclub.com.br/
>>
>> Blog colaborativo sobre Python e tecnologias Relacionadas, mantido
>> totalmente no https://github.com/pythonclub/pythonclub.github.io .
>>
>> Todos são livres para publicar. É só fazer fork, escrever sua postagem e
>> mandar o pull-request. Leia mais sobre como publicar em README.md e
>> contributing.md.
>> Regra básica de postagem:
>> "Você" acha interessante? É útil para "você"? Pode ser utilizado com
>> Python ou é útil para quem usa Python? Está esperando o que? Publica logo,
>> que estou louco para ler...
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAPVjvMYVR1yqZjLuEh5u6DaR5DZfeYqvFy-MaNkt7MiWO7O%2Bxw%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/CAGp2JVEnnVbHDXN2tkQjKK1R3JYF19GY94Ax%3D91OYrKykL39_w%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 

Re: How can I scale my application to different teams ?

2021-11-30 Thread DJANGO DEVELOPER
I would like to know about sso. Answer related to your question is you can
use tuple before your custom user model and then pass it with
choices=created tuple ajd then in your v views just filter the team posts
according the given role.

On Tue, 30 Nov 2021, 7:02 pm Tim Chase, 
wrote:

> On 2021-11-30 02:11, Kumar Gaurav wrote:
> > How Can I group the users and show the contents related to them
> > only.
>
> You presumably have some sort of User model and have added some sort
> of Group model.  Depending on your business logic, either a User can
> belong to one-and-only-one group in which case you'd have a
> "User.group" foreign key; or a User can belong to multiple groups, in
> which case you'd have a many-to-many relationship between users and
> groups.
>
> I'd bias towards the latter even if *current* business rules say that
> a person can only be a memeber of one group.  It's easier to design
> for multiple groups now and then only use one.  It's much harder to
> design for one-group-per-person now and then switch to
> a-person-can-be-in-more-than-one-group later.
>
> Similarly, I imagine that Posts get associated with a particular
> group. Or maybe they can be broadcast to multiple groups.
>
> Then filter Posts based on Groups associated with the
> currently-logged-in User.
>
> -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/20211130080240.78a58df5%40bigbox.attlocal.net
> .
>

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


Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread DJANGO DEVELOPER
https://meet.google.com/pns-vbmz-sys

On Wed, Nov 24, 2021 at 12:08 AM DJANGO DEVELOPER 
wrote:

> okay
>
>
> On Wed, Nov 24, 2021 at 12:04 AM Duncan Santiago <
> duncansantiag...@gmail.com> wrote:
>
>> let's try google meet.
>>
>> On Tue, 23 Nov 2021 at 11:39, DJANGO DEVELOPER 
>> wrote:
>>
>>> can I have you on anydesk or any meeting tool?
>>>
>>> On Tue, Nov 23, 2021 at 11:31 PM Duncan Santiago <
>>> duncansantiag...@gmail.com> wrote:
>>>
>>>> send me your code then,
>>>> or GitHub repo handle.
>>>>
>>>> On Tue, 23 Nov 2021 at 11:27, DJANGO DEVELOPER 
>>>> wrote:
>>>>
>>>>> sorry if you get offended because I need a solution. a working
>>>>> solution. I am not familiar with javascript. so getting a lot of issues
>>>>>
>>>>> On Tue, Nov 23, 2021 at 10:38 PM Duncan Santiago <
>>>>> duncansantiag...@gmail.com> wrote:
>>>>>
>>>>>> your page also reloads and results may not be displayed on your
>>>>>> frontend, just add this lines on your onclick listerner
>>>>>>
>>>>>> function(e){ //notice the e parameter, it is the event parameter.
>>>>>> e.preventDefault()
>>>>>>  your code here.
>>>>>>
>>>>>> }
>>>>>>
>>>>>> or you can just paste this on your script section
>>>>>>
>>>>>>
>>>>>> (function () {
>>>>>> var output = document.getElementById('output');
>>>>>> document.getElementById('post').onclick = function (e) {
>>>>>> e.preventDefault()
>>>>>>   var data = document.getElementById('data').value;
>>>>>>
>>>>>>   axios.post('http://127.0.0.1:8000/predict/',
>>>>>> JSON.parse(data))
>>>>>> .then(function (res) {
>>>>>>   output.className = 'container';
>>>>>>   output.innerHTML = res.data;
>>>>>> })
>>>>>> .catch(function (err) {
>>>>>>   output.className = 'container text-danger';
>>>>>>   output.innerHTML = err.message;
>>>>>> });
>>>>>> };
>>>>>>   })();
>>>>>>
>>>>>> On Tue, 23 Nov 2021 at 10:34, Duncan Santiago <
>>>>>> duncansantiag...@gmail.com> wrote:
>>>>>>
>>>>>>> do a demo, enter the URL on the text area and click on the post
>>>>>>> button.
>>>>>>> Then send me the logs on the terminal running Django and also open
>>>>>>> the console and send the output,
>>>>>>>
>>>>>>> On Tue, 23 Nov 2021 at 10:21, DJANGO DEVELOPER <
>>>>>>> abubakarbr...@gmail.com> wrote:
>>>>>>>
>>>>>>>> okay let me explain.
>>>>>>>> I have trained models which tells us that which website is
>>>>>>>> legitimate or which website is not legitimate. I have integrated that 
>>>>>>>> model
>>>>>>>> with my django web app using rest api.
>>>>>>>> I tested the API on postman and working.
>>>>>>>> now I want to get the result on front end using HTML CSS and
>>>>>>>> javascript. so how can I achieve it?
>>>>>>>>
>>>>>>>> On Tue, Nov 23, 2021 at 10:16 PM Duncan Santiago <
>>>>>>>> duncansantiag...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> hello, am not sure what the question is. Kindly elaborate.
>>>>>>>>>
>>>>>>>>> On Tue, 23 Nov 2021 at 09:19, DJANGO DEVELOPER <
>>>>>>>>> abubakarbr...@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> I am working on a django based project in which I have integrated
>>>>>>>>>> ML trained models to check if a https url is legitimate or not. for 
>>>>>>>>>> this I
>>>>>>>>>> need javascript or ajax to call a rest api for my form in which I 
>>>>>>>>&g

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread DJANGO DEVELOPER
okay


On Wed, Nov 24, 2021 at 12:04 AM Duncan Santiago 
wrote:

> let's try google meet.
>
> On Tue, 23 Nov 2021 at 11:39, DJANGO DEVELOPER 
> wrote:
>
>> can I have you on anydesk or any meeting tool?
>>
>> On Tue, Nov 23, 2021 at 11:31 PM Duncan Santiago <
>> duncansantiag...@gmail.com> wrote:
>>
>>> send me your code then,
>>> or GitHub repo handle.
>>>
>>> On Tue, 23 Nov 2021 at 11:27, DJANGO DEVELOPER 
>>> wrote:
>>>
>>>> sorry if you get offended because I need a solution. a working
>>>> solution. I am not familiar with javascript. so getting a lot of issues
>>>>
>>>> On Tue, Nov 23, 2021 at 10:38 PM Duncan Santiago <
>>>> duncansantiag...@gmail.com> wrote:
>>>>
>>>>> your page also reloads and results may not be displayed on your
>>>>> frontend, just add this lines on your onclick listerner
>>>>>
>>>>> function(e){ //notice the e parameter, it is the event parameter.
>>>>> e.preventDefault()
>>>>>  your code here.
>>>>>
>>>>> }
>>>>>
>>>>> or you can just paste this on your script section
>>>>>
>>>>>
>>>>> (function () {
>>>>> var output = document.getElementById('output');
>>>>> document.getElementById('post').onclick = function (e) {
>>>>> e.preventDefault()
>>>>>   var data = document.getElementById('data').value;
>>>>>
>>>>>   axios.post('http://127.0.0.1:8000/predict/',
>>>>> JSON.parse(data))
>>>>> .then(function (res) {
>>>>>   output.className = 'container';
>>>>>   output.innerHTML = res.data;
>>>>> })
>>>>>         .catch(function (err) {
>>>>>   output.className = 'container text-danger';
>>>>>   output.innerHTML = err.message;
>>>>> });
>>>>> };
>>>>>   })();
>>>>>
>>>>> On Tue, 23 Nov 2021 at 10:34, Duncan Santiago <
>>>>> duncansantiag...@gmail.com> wrote:
>>>>>
>>>>>> do a demo, enter the URL on the text area and click on the post
>>>>>> button.
>>>>>> Then send me the logs on the terminal running Django and also open
>>>>>> the console and send the output,
>>>>>>
>>>>>> On Tue, 23 Nov 2021 at 10:21, DJANGO DEVELOPER <
>>>>>> abubakarbr...@gmail.com> wrote:
>>>>>>
>>>>>>> okay let me explain.
>>>>>>> I have trained models which tells us that which website is
>>>>>>> legitimate or which website is not legitimate. I have integrated that 
>>>>>>> model
>>>>>>> with my django web app using rest api.
>>>>>>> I tested the API on postman and working.
>>>>>>> now I want to get the result on front end using HTML CSS and
>>>>>>> javascript. so how can I achieve it?
>>>>>>>
>>>>>>> On Tue, Nov 23, 2021 at 10:16 PM Duncan Santiago <
>>>>>>> duncansantiag...@gmail.com> wrote:
>>>>>>>
>>>>>>>> hello, am not sure what the question is. Kindly elaborate.
>>>>>>>>
>>>>>>>> On Tue, 23 Nov 2021 at 09:19, DJANGO DEVELOPER <
>>>>>>>> abubakarbr...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> I am working on a django based project in which I have integrated
>>>>>>>>> ML trained models to check if a https url is legitimate or not. for 
>>>>>>>>> this I
>>>>>>>>> need javascript or ajax to call a rest api for my form in which I 
>>>>>>>>> want to
>>>>>>>>> send a post request so that I can check if a https url is legitimate 
>>>>>>>>> or not.
>>>>>>>>> *NOTE: My code is running successfully and giving correct answers
>>>>>>>>> on postman.* so just want to integrate it with my HTML form.
>>>>>>>>> *My work:*
>>>>>>>>> *form.html:*
>>>>>>>>> 

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread DJANGO DEVELOPER
can I have you on anydesk or any meeting tool?

On Tue, Nov 23, 2021 at 11:31 PM Duncan Santiago 
wrote:

> send me your code then,
> or GitHub repo handle.
>
> On Tue, 23 Nov 2021 at 11:27, DJANGO DEVELOPER 
> wrote:
>
>> sorry if you get offended because I need a solution. a working solution.
>> I am not familiar with javascript. so getting a lot of issues
>>
>> On Tue, Nov 23, 2021 at 10:38 PM Duncan Santiago <
>> duncansantiag...@gmail.com> wrote:
>>
>>> your page also reloads and results may not be displayed on your
>>> frontend, just add this lines on your onclick listerner
>>>
>>> function(e){ //notice the e parameter, it is the event parameter.
>>> e.preventDefault()
>>>  your code here.
>>>
>>> }
>>>
>>> or you can just paste this on your script section
>>>
>>>
>>> (function () {
>>> var output = document.getElementById('output');
>>> document.getElementById('post').onclick = function (e) {
>>> e.preventDefault()
>>>   var data = document.getElementById('data').value;
>>>
>>>   axios.post('http://127.0.0.1:8000/predict/', JSON.parse(data))
>>> .then(function (res) {
>>>   output.className = 'container';
>>>   output.innerHTML = res.data;
>>> })
>>> .catch(function (err) {
>>>   output.className = 'container text-danger';
>>>   output.innerHTML = err.message;
>>> });
>>> };
>>>   })();
>>>
>>> On Tue, 23 Nov 2021 at 10:34, Duncan Santiago <
>>> duncansantiag...@gmail.com> wrote:
>>>
>>>> do a demo, enter the URL on the text area and click on the post button.
>>>> Then send me the logs on the terminal running Django and also open the
>>>> console and send the output,
>>>>
>>>> On Tue, 23 Nov 2021 at 10:21, DJANGO DEVELOPER 
>>>> wrote:
>>>>
>>>>> okay let me explain.
>>>>> I have trained models which tells us that which website is legitimate
>>>>> or which website is not legitimate. I have integrated that model with my
>>>>> django web app using rest api.
>>>>> I tested the API on postman and working.
>>>>> now I want to get the result on front end using HTML CSS and
>>>>> javascript. so how can I achieve it?
>>>>>
>>>>> On Tue, Nov 23, 2021 at 10:16 PM Duncan Santiago <
>>>>> duncansantiag...@gmail.com> wrote:
>>>>>
>>>>>> hello, am not sure what the question is. Kindly elaborate.
>>>>>>
>>>>>> On Tue, 23 Nov 2021 at 09:19, DJANGO DEVELOPER <
>>>>>> abubakarbr...@gmail.com> wrote:
>>>>>>
>>>>>>> I am working on a django based project in which I have integrated ML
>>>>>>> trained models to check if a https url is legitimate or not. for this I
>>>>>>> need javascript or ajax to call a rest api for my form in which I want 
>>>>>>> to
>>>>>>> send a post request so that I can check if a https url is legitimate or 
>>>>>>> not.
>>>>>>> *NOTE: My code is running successfully and giving correct answers on
>>>>>>> postman.* so just want to integrate it with my HTML form.
>>>>>>> *My work:*
>>>>>>> *form.html:*
>>>>>>> 
>>>>>>> 
>>>>>>>   
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>>
>>>>>>> 
>>>>>>> https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css;
>>>>>>> rel="stylesheet"
>>>>>>> integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
>>>>>>> crossorigin="anonymous">
>>>>>>>
>>>>>>> SITE URL Form
>>>>>>>   
>>>>>>>   
>>>>>>>   
>>>>>>>   
>>>>>>> SITE URL
>>>>>>> 
>>>>>>>   
>>>>>>>   POST
>>>>>>> 
>>>>>>>
>>>

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread DJANGO DEVELOPER
sorry if you get offended because I need a solution. a working solution. I
am not familiar with javascript. so getting a lot of issues

On Tue, Nov 23, 2021 at 10:38 PM Duncan Santiago 
wrote:

> your page also reloads and results may not be displayed on your frontend,
> just add this lines on your onclick listerner
>
> function(e){ //notice the e parameter, it is the event parameter.
> e.preventDefault()
>  your code here.
>
> }
>
> or you can just paste this on your script section
>
>
> (function () {
> var output = document.getElementById('output');
> document.getElementById('post').onclick = function (e) {
> e.preventDefault()
>   var data = document.getElementById('data').value;
>
>   axios.post('http://127.0.0.1:8000/predict/', JSON.parse(data))
> .then(function (res) {
>   output.className = 'container';
>   output.innerHTML = res.data;
> })
> .catch(function (err) {
>   output.className = 'container text-danger';
>   output.innerHTML = err.message;
> });
> };
>   })();
>
> On Tue, 23 Nov 2021 at 10:34, Duncan Santiago 
> wrote:
>
>> do a demo, enter the URL on the text area and click on the post button.
>> Then send me the logs on the terminal running Django and also open the
>> console and send the output,
>>
>> On Tue, 23 Nov 2021 at 10:21, DJANGO DEVELOPER 
>> wrote:
>>
>>> okay let me explain.
>>> I have trained models which tells us that which website is legitimate or
>>> which website is not legitimate. I have integrated that model with my
>>> django web app using rest api.
>>> I tested the API on postman and working.
>>> now I want to get the result on front end using HTML CSS and javascript.
>>> so how can I achieve it?
>>>
>>> On Tue, Nov 23, 2021 at 10:16 PM Duncan Santiago <
>>> duncansantiag...@gmail.com> wrote:
>>>
>>>> hello, am not sure what the question is. Kindly elaborate.
>>>>
>>>> On Tue, 23 Nov 2021 at 09:19, DJANGO DEVELOPER 
>>>> wrote:
>>>>
>>>>> I am working on a django based project in which I have integrated ML
>>>>> trained models to check if a https url is legitimate or not. for this I
>>>>> need javascript or ajax to call a rest api for my form in which I want to
>>>>> send a post request so that I can check if a https url is legitimate or 
>>>>> not.
>>>>> *NOTE: My code is running successfully and giving correct answers on
>>>>> postman.* so just want to integrate it with my HTML form.
>>>>> *My work:*
>>>>> *form.html:*
>>>>> 
>>>>> 
>>>>>   
>>>>> 
>>>>> 
>>>>> 
>>>>>
>>>>> 
>>>>> https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css;
>>>>> rel="stylesheet"
>>>>> integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
>>>>> crossorigin="anonymous">
>>>>>
>>>>> SITE URL Form
>>>>>   
>>>>>   
>>>>>   
>>>>>   
>>>>> SITE URL
>>>>> 
>>>>>   
>>>>>   POST
>>>>> 
>>>>>
>>>>> 
>>>>>
>>>>> 
>>>>> 
>>>>>   (function () {
>>>>> var output = document.getElementById('output');
>>>>> document.getElementById('post').onclick = function () {
>>>>>   var data = document.getElementById('data').value;
>>>>>
>>>>>   axios.post('<a  rel="nofollow" href="http://127.0.0.1:8000/predict/">http://127.0.0.1:8000/predict/</a>',
>>>>> JSON.parse(data))
>>>>> .then(function (res) {
>>>>>   output.className = 'container';
>>>>>   output.innerHTML = res.data;
>>>>> })
>>>>> .catch(function (err) {
>>>>>   output.className = 'container text-danger';
>>>>>   output.innerHTML = err.message;
>>>>> });
>>>>> };
>>>>>

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread DJANGO DEVELOPER
okay let me explain.
I have trained models which tells us that which website is legitimate or
which website is not legitimate. I have integrated that model with my
django web app using rest api.
I tested the API on postman and working.
now I want to get the result on front end using HTML CSS and javascript. so
how can I achieve it?

On Tue, Nov 23, 2021 at 10:16 PM Duncan Santiago 
wrote:

> hello, am not sure what the question is. Kindly elaborate.
>
> On Tue, 23 Nov 2021 at 09:19, DJANGO DEVELOPER 
> wrote:
>
>> I am working on a django based project in which I have integrated ML
>> trained models to check if a https url is legitimate or not. for this I
>> need javascript or ajax to call a rest api for my form in which I want to
>> send a post request so that I can check if a https url is legitimate or not.
>> *NOTE: My code is running successfully and giving correct answers on
>> postman.* so just want to integrate it with my HTML form.
>> *My work:*
>> *form.html:*
>> 
>> 
>>   
>> 
>> 
>> 
>>
>> 
>> https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css;
>> rel="stylesheet"
>> integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
>> crossorigin="anonymous">
>>
>> SITE URL Form
>>   
>>   
>>   
>>   
>> SITE URL
>> 
>>   
>>   POST
>> 
>>
>> 
>>
>> 
>> 
>>   (function () {
>> var output = document.getElementById('output');
>> document.getElementById('post').onclick = function () {
>>   var data = document.getElementById('data').value;
>>
>>   axios.post('<a  rel="nofollow" href="http://127.0.0.1:8000/predict/">http://127.0.0.1:8000/predict/</a>', JSON.parse(data))
>> .then(function (res) {
>>   output.className = 'container';
>>   output.innerHTML = res.data;
>> })
>> .catch(function (err) {
>>   output.className = 'container text-danger';
>>   output.innerHTML = err.message;
>> });
>> };
>>   })();
>> 
>>
>> 
>>
>> 
>> https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js&quot</a>;
>> integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
>> crossorigin="anonymous">
>>
>> 
>> 
>>   
>> 
>>
>> *myapp/urls.py:*
>> path('form/', form, name="form"),
>> path('predict/', predict, name='predict')
>> *this is the response I am returning:*
>> if list(model.predict([test]))[0] == 1:
>> return JsonResponse({"Response":"Legitimate"})
>> else:
>> return JsonResponse({"Response":"Phishing or fake"})
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/e81cf4f0-1208-4623-97f9-4b88f01d67b3n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/e81cf4f0-1208-4623-97f9-4b88f01d67b3n%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/CACPcFdJ11YDrrpcCChwMcufz4CqcySacbKVQ-OtvEAVZEhK%3DBg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CACPcFdJ11YDrrpcCChwMcufz4CqcySacbKVQ-OtvEAVZEhK%3DBg%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/CAKPY9pnmOXaLFnBRE4Eqi52yY-E%2BP1ih7arBDbxCqru4a-ZXxA%40mail.gmail.com.


AJAX or Javascript POST request for Django form

2021-11-23 Thread DJANGO DEVELOPER
I am working on a django based project in which I have integrated ML 
trained models to check if a https url is legitimate or not. for this I 
need javascript or ajax to call a rest api for my form in which I want to 
send a post request so that I can check if a https url is legitimate or not.
*NOTE: My code is running successfully and giving correct answers on 
postman.* so just want to integrate it with my HTML form.
*My work:*
*form.html:*


  





https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css; 
rel="stylesheet" 
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
 
crossorigin="anonymous">

SITE URL Form
  
  
  
  
SITE URL

  
  POST






  (function () {
var output = document.getElementById('output');
document.getElementById('post').onclick = function () {
  var data = document.getElementById('data').value;

  axios.post('http://127.0.0.1:8000/predict/', JSON.parse(data))
.then(function (res) {
  output.className = 'container';
  output.innerHTML = res.data;
})
.catch(function (err) {
  output.className = 'container text-danger';
  output.innerHTML = err.message;
});
};
  })();





https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js";
 
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
 
crossorigin="anonymous">



  


*myapp/urls.py:*
path('form/', form, name="form"),
path('predict/', predict, name='predict')
*this is the response I am returning:*
if list(model.predict([test]))[0] == 1:
return JsonResponse({"Response":"Legitimate"})
else:
return JsonResponse({"Response":"Phishing or fake"})

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


Re: costum user in Django 3.2

2021-11-09 Thread DJANGO DEVELOPER
have you added AUTH_USER_MODEL = 'my_app.custommodel' in your settings.py?

On Monday, November 8, 2021 at 10:50:14 PM UTC+5 ngboua...@gmail.com wrote:

>
> hello team, how can i fix this error please? 
>
> ValueError: Related model 'My_App.costumuser' cannot be resolved
>
> i want to costumize my user, i got this error when i migrate the model
>

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


Re: Keycloak & Django Setup Error - "UNIQUE constraint failed: auth_user.username" & usernames are being hashed

2021-10-05 Thread DJANGO DEVELOPER
you're facing this error because django receives nique usernames. so you
are not allowed to create another username with the same username.

On Wed, Oct 6, 2021 at 1:36 AM Ammon Quackenbush  wrote:

>
> I am setting up keycloak for a django project and this is the error I
> receive:
>
>
> IntegrityError at /oidccallback/UNIQUE constraint failed:
> auth_user.usernameRequest Method:
> GET
>
> It looks like when I log in, keycloak tries to create my user again, even
> though my user is in the database.
>
> Also, my usernames are hashed in the auth_user table in the database.
>
> This is my code in my settings.py:
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.sqlite3',
> 'NAME': BASE_DIR / 'db.sqlite3',
> }
> }
>
> I also tried setting the OIDC_CREATE_USER setting to False but that only
> prevented django from from detecting login sessions (which still were
> created properly).
>
> Any ideas on what is going wrong and how I can fix it?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/6be23087-ab54-4bfb-8a57-1bc8fbe35359n%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/CAKPY9pmEdZCt%2BG0JH-Yy8t6YOEVZBnikWritg0xxuPxj4Bbhkg%40mail.gmail.com.


Re: A server error occurred. Please contact the administrator.

2021-09-27 Thread DJANGO DEVELOPER
you just don't need to be rude if I didn't get it.

On Mon, Sep 27, 2021 at 9:14 PM Kasper Laudrup 
wrote:

> On 27/09/2021 17.40, DJANGO DEVELOPER wrote:
> > are you facing an internal server error(500)
> >
>
> No, but thanks for asking.
>
> I'm just writing a silly reply to a silly question.
>
> 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/93349c1f-e873-dafb-c66d-096b31c26cbb%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/CAKPY9pk1OT4HNBwGNupGAK-BvJ8u2PeaYawYoBd8zacMW06p2A%40mail.gmail.com.


Re: A server error occurred. Please contact the administrator.

2021-09-27 Thread DJANGO DEVELOPER
are you facing an internal server error(500)

On Mon, Sep 27, 2021 at 8:29 PM Kasper Laudrup 
wrote:

> On 27/09/2021 12.03, Ardhendu Sekhar Sahoo wrote:
> > I got this error ,I need your help to fix this.so kindly tell me how can
> > I fix it.
>
> Have you tried contacting the administrator like the error message said
> you should?
>
> 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/2b47123e-0d7b-9dc6-5b35-6ccc948d4603%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/CAKPY9p%3DD4Gv%3DPXdRmMOq7jAYqiFwufehpfe1bt_moH_RkZVh3A%40mail.gmail.com.


Re: UML to Django models

2021-08-26 Thread DJANGO DEVELOPER
Hi, Cale thanks for the reply. but in uml diagram Product Feature doesn't
have any relation with the product. so why did you made a relation with the
product model? can you please guide me on how to do this?

On Thu, Aug 26, 2021 at 8:44 PM Cale Roco  wrote:

> theres a lot of different ways you can do this, depending on your desired
> functionality, the amount of data you intend to store etc,
>
> // Simple Example
> class Product(models.Model):
>name = models.Charfield(max_length=255)
>
>
> class ProductFeature(models.Model):
> product = models.ForeignKey(Product, on_delete=models.CASCADE)
> feature = models.ForeignKey("Feature", on_delete=models.CASCADE)
>
> class Feature(models.Model):
> name = models.CharField(max_length=60)
> value = models.CharField(max_length=60)
>
> On Thursday, 26 August 2021 at 16:14:04 UTC+1 abubak...@gmail.com wrote:
>
>> Hi Derek it is not difficult for me to write the model for the product
>> entity. but there are also other diagrams that I want to convert into
>> models. so I was just wanted to clear my concept.
>> I am confused in Super types and sub types as you can see an entity
>> within the entity. how should I convert them into models?
>>
>> On Thu, Aug 26, 2021 at 6:50 PM Derek  wrote:
>>
>>> There is not sufficient data in that image to create models.  You don't
>>> know the field types, for example.
>>>
>>> Once you have those, it should not be too hard e.g.:
>>>
>>> from django.db import models
>>>
>>> class Product(models.Model):
>>> product_id = models.AutoField()
>>> name = models.CharField( max_length=255)
>>> date_introduction = models.DateField()
>>> comment = models.TextField()
>>>
>>> #etc.
>>>
>>> You'll need to use ForeignKey fields to link related tables, of course.
>>>
>>> HTH.
>>>
>>> On Thursday, 26 August 2021 at 10:28:23 UTC+2 abubak...@gmail.com wrote:
>>>
>>>> can anyone help me?
>>>>
>>>> On Thu, Aug 26, 2021 at 9:32 AM DJANGO DEVELOPER 
>>>> wrote:
>>>>
>>>>> Currently, I am working on an inventory management system and I have
>>>>> got some UML diagrams and want to convert those uml diagrams into django
>>>>> models. So can anyone guide me on how to convert those UML diagrams into
>>>>> django models?
>>>>> an example is below of uml diagram
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed 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/d7cc08c3-cb88-422b-8cb3-a15130abeba1n%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/django-users/d7cc08c3-cb88-422b-8cb3-a15130abeba1n%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/74f7d899-ceb8-42a4-8809-fdd5aac48625n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/74f7d899-ceb8-42a4-8809-fdd5aac48625n%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/dbc1bde9-06d9-440d-95ea-1c9c55d1c698n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/dbc1bde9-06d9-440d-95ea-1c9c55d1c698n%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/CAKPY9pndwiaa8qv5b55e%2BOtvzb0pERSgQZ0xUv8saff%2BW8-hKQ%40mail.gmail.com.


Re: UML to Django models

2021-08-26 Thread DJANGO DEVELOPER
Hi Derek it is not difficult for me to write the model for the product
entity. but there are also other diagrams that I want to convert into
models. so I was just wanted to clear my concept.
I am confused in Super types and sub types as you can see an entity within
the entity. how should I convert them into models?

On Thu, Aug 26, 2021 at 6:50 PM Derek  wrote:

> There is not sufficient data in that image to create models.  You don't
> know the field types, for example.
>
> Once you have those, it should not be too hard e.g.:
>
> from django.db import models
>
> class Product(models.Model):
> product_id = models.AutoField()
> name = models.CharField( max_length=255)
> date_introduction = models.DateField()
> comment = models.TextField()
>
> #etc.
>
> You'll need to use ForeignKey fields to link related tables, of course.
>
> HTH.
>
> On Thursday, 26 August 2021 at 10:28:23 UTC+2 abubak...@gmail.com wrote:
>
>> can anyone help me?
>>
>> On Thu, Aug 26, 2021 at 9:32 AM DJANGO DEVELOPER 
>> wrote:
>>
>>> Currently, I am working on an inventory management system and I have got
>>> some UML diagrams and want to convert those uml diagrams into django
>>> models. So can anyone guide me on how to convert those UML diagrams into
>>> django models?
>>> an example is below of uml diagram
>>>
>>> --
>>> You received this message because you are subscribed 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/d7cc08c3-cb88-422b-8cb3-a15130abeba1n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/d7cc08c3-cb88-422b-8cb3-a15130abeba1n%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/74f7d899-ceb8-42a4-8809-fdd5aac48625n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/74f7d899-ceb8-42a4-8809-fdd5aac48625n%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/CAKPY9pne-RqvLjtELHR-%2BK4RXPnhsPyAMBzcfbzfUjLZKXwqeQ%40mail.gmail.com.


Re: UML to Django models

2021-08-26 Thread DJANGO DEVELOPER
can anyone help me?

On Thu, Aug 26, 2021 at 9:32 AM DJANGO DEVELOPER 
wrote:

> Currently, I am working on an inventory management system and I have got
> some UML diagrams and want to convert those uml diagrams into django
> models. So can anyone guide me on how to convert those UML diagrams into
> django models?
> an example is below of uml diagram
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d7cc08c3-cb88-422b-8cb3-a15130abeba1n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/d7cc08c3-cb88-422b-8cb3-a15130abeba1n%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/CAKPY9pnF%3DrgdNm9EjDBXWLYQjs%2Bv%2BrtTxkbf8seumtSRvK-ing%40mail.gmail.com.


UML to Django models

2021-08-25 Thread DJANGO DEVELOPER
Currently, I am working on an inventory management system and I have got 
some UML diagrams and want to convert those uml diagrams into django 
models. So can anyone guide me on how to convert those UML diagrams into 
django models?
an example is below of uml diagram

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


Re: Error: NoReverseMatch at

2021-08-16 Thread DJANGO DEVELOPER
show me your django app url and views as well.

On Tue, Aug 17, 2021 at 1:10 AM DJANGO DEVELOPER 
wrote:

> okay add a url. first of all import the view into urls.py file and make a
> path.
>
> On Mon, Aug 16, 2021 at 5:32 PM 'Rahul Chauhan' via Django users <
> django-users@googlegroups.com> wrote:
>
>> Here is how the the project's url.py looks like. Not made any changes to
>> it.
>>
>> [image: dj_4.jpg]
>>
>> *change_list.html: *Copied this (
>> https://github.com/django/django/blob/main/django/contrib/admin/templates/admin/change_list.html)
>>  to
>> the local app folder.
>>
>> On Monday, August 16, 2021 at 3:36:27 PM UTC+5:30 abubak...@gmail.com
>> wrote:
>>
>>> show your url, view and html code.
>>>
>>> On Mon, Aug 16, 2021 at 2:56 PM 'Rahul Chauhan' via Django users <
>>> django...@googlegroups.com> wrote:
>>>
>>>> Hi All,
>>>>
>>>> I have a customized/override "*changelist_view.html*" to display
>>>> hierarchical data in Django admin panel.
>>>>
>>>> The problem is that the default form to add the Model data throws below
>>>> error when clicked the button "add category". Please refer to the attached
>>>> screenshot.
>>>>
>>>> [image: dj_1.jpg]
>>>>
>>>> *NoReverseMatch at /admin/category/category/add/*
>>>>
>>>> *Reverse for 'app_list' with keyword arguments '{'app_label': ''}' not
>>>> found. 1 pattern(s) tried: ['admin/(?Pcategory|auth)/$']*
>>>>
>>>> [image: dj_2.jpg]
>>>>
>>>> If I remove the function
>>>> "def changelist_view(self, request, extra_context={}):", the model starts
>>>> appearing fine. Please refer to the screenshot below. But then I loose the
>>>> functionality to display custom hierarchical data.
>>>>
>>>> [image: dj_3.jpg]
>>>>
>>>> How can I still show the default form to add data to the model and
>>>> override the  *changelist_view.html*" .
>>>>
>>>> Appreciate any help in advance.
>>>>
>>>> Thanks
>>>> Rahul
>>>>
>>>> This e-mail is intended only for the named person or entity to which it is 
>>>> addressed and contains valuable business information that is privileged, 
>>>> confidential and/or otherwise protected from disclosure. If you received 
>>>> this e-mail in error, any review, use, dissemination, distribution or 
>>>> copying of this e-mail is strictly prohibited. Please notify us 
>>>> immediately of the error via e-mail to discl...@email-abuse.com and please 
>>>> delete the e-mail from your system, retaining no copies in any media. We 
>>>> appreciate your cooperation.
>>>>
>>>> --
>>>> You received this message because you are subscribed 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/a3088233-47f7-4433-ae5c-3cd37b1fd9dbn%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/a3088233-47f7-4433-ae5c-3cd37b1fd9dbn%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>>
>> This e-mail is intended only for the named person or entity to which it is 
>> addressed and contains valuable business information that is privileged, 
>> confidential and/or otherwise protected from disclosure. If you received 
>> this e-mail in error, any review, use, dissemination, distribution or 
>> copying of this e-mail is strictly prohibited. Please notify us immediately 
>> of the error via e-mail to disclai...@email-abuse.com and please delete the 
>> e-mail from your system, retaining no copies in any media. We appreciate 
>> your cooperation.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/0b99bc76-6423-432e-b114-107b88976fc4n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/0b99bc76-6423-432e-b114-107b88976fc4n%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/CAKPY9pmTXmUZQ--W6wTFQpr0jstahL%2BdUjPh2DQ7CRcxb%2B%3D7dg%40mail.gmail.com.


Re: Error: NoReverseMatch at

2021-08-16 Thread DJANGO DEVELOPER
okay add a url. first of all import the view into urls.py file and make a
path.

On Mon, Aug 16, 2021 at 5:32 PM 'Rahul Chauhan' via Django users <
django-users@googlegroups.com> wrote:

> Here is how the the project's url.py looks like. Not made any changes to
> it.
>
> [image: dj_4.jpg]
>
> *change_list.html: *Copied this (
> https://github.com/django/django/blob/main/django/contrib/admin/templates/admin/change_list.html)
>  to
> the local app folder.
>
> On Monday, August 16, 2021 at 3:36:27 PM UTC+5:30 abubak...@gmail.com
> wrote:
>
>> show your url, view and html code.
>>
>> On Mon, Aug 16, 2021 at 2:56 PM 'Rahul Chauhan' via Django users <
>> django...@googlegroups.com> wrote:
>>
>>> Hi All,
>>>
>>> I have a customized/override "*changelist_view.html*" to display
>>> hierarchical data in Django admin panel.
>>>
>>> The problem is that the default form to add the Model data throws below
>>> error when clicked the button "add category". Please refer to the attached
>>> screenshot.
>>>
>>> [image: dj_1.jpg]
>>>
>>> *NoReverseMatch at /admin/category/category/add/*
>>>
>>> *Reverse for 'app_list' with keyword arguments '{'app_label': ''}' not
>>> found. 1 pattern(s) tried: ['admin/(?Pcategory|auth)/$']*
>>>
>>> [image: dj_2.jpg]
>>>
>>> If I remove the function
>>> "def changelist_view(self, request, extra_context={}):", the model starts
>>> appearing fine. Please refer to the screenshot below. But then I loose the
>>> functionality to display custom hierarchical data.
>>>
>>> [image: dj_3.jpg]
>>>
>>> How can I still show the default form to add data to the model and
>>> override the  *changelist_view.html*" .
>>>
>>> Appreciate any help in advance.
>>>
>>> Thanks
>>> Rahul
>>>
>>> This e-mail is intended only for the named person or entity to which it is 
>>> addressed and contains valuable business information that is privileged, 
>>> confidential and/or otherwise protected from disclosure. If you received 
>>> this e-mail in error, any review, use, dissemination, distribution or 
>>> copying of this e-mail is strictly prohibited. Please notify us immediately 
>>> of the error via e-mail to discl...@email-abuse.com and please delete the 
>>> e-mail from your system, retaining no copies in any media. We appreciate 
>>> your cooperation.
>>>
>>> --
>>> You received this message because you are subscribed 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/a3088233-47f7-4433-ae5c-3cd37b1fd9dbn%40googlegroups.com
>>> 
>>> .
>>>
>>
> This e-mail is intended only for the named person or entity to which it is 
> addressed and contains valuable business information that is privileged, 
> confidential and/or otherwise protected from disclosure. If you received this 
> e-mail in error, any review, use, dissemination, distribution or copying of 
> this e-mail is strictly prohibited. Please notify us immediately of the error 
> via e-mail to disclai...@email-abuse.com and please delete the e-mail from 
> your system, retaining no copies in any media. We appreciate your cooperation.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/0b99bc76-6423-432e-b114-107b88976fc4n%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/CAKPY9pnb52b%2BtTTo3Zx-KnvBCewrQtWcVSA6APGxEm7KU5azSw%40mail.gmail.com.


Re: Wish list functionality in products listing page.

2021-07-29 Thread DJANGO DEVELOPER
I think you have to save the products in your wishlist feature just by
doing the same way as we do in saving things in django

On Thu, Jul 29, 2021 at 10:07 AM Salima Begum 
wrote:

> Hi all,
> In my project I want to implement wishlist functionality in products
> listing pages.
> Is there any django packages to implement in my project and any ideas
> please let me know
>
> Thank you
> ~Salima
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMSz6bmra3%2BdQxxBHL9%2B1K_7-mXhKf88QF67kK_4Q1a%2B%3DuB1Fg%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/CAKPY9pmOKnHyuw%3D4dTgH%3DbcXn%3DP7X_SU%3DM%2Bi6%2BHDd4mc5PQU0w%40mail.gmail.com.


Re: Can anyone help me

2021-07-28 Thread DJANGO DEVELOPER
Hi nagaraju, if you're new to django then you should go for a CRUD
functionality to understand django. you can also build a blog post web app
then you will be able to build this form by yourself. well if you don't
want to build other ideas and want to work on this form then you should
search for formsets and then you can develop the form

On Wed, Jul 28, 2021 at 10:42 PM Sebastian Jung 
wrote:

> Hello,
>
> I have start with django girls tutorial. This is a relative easy start
> with a simple app. But i think after this you are able to develop your app.
> https://tutorial.djangogirls.org/en/
>
> Regards
>
> Nagaraju Singothu  schrieb am Mi., 28. Juli
> 2021, 15:51:
>
>> Dear friends,
>>
>> I'm new to django, plz help me how to develop this page and send me the
>> source code.
>>
>> This task only using bootstrap and 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/CAMyGuAayru0Zg-imwncZasP36Ur5%3DQFLbi%2BWV8RARrN5qPfKTA%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/CAKGT9my3R3n5rF%2B%2Baj9DqfCN%3DkL7jmPCJd%3D612qcea5ZmNk_3g%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/CAKPY9pkz3ShbhGJGh8Umc%2B%3DBE3y_1-tNruMBcF1y%3Dt0fMJarYQ%40mail.gmail.com.


Re: OperationalError: foreign key mismatch

2021-07-27 Thread DJANGO DEVELOPER
so issue resolved now?

On Tue, Jul 27, 2021 at 9:09 PM Wai Yeung  wrote:

> Hello,
>
> Thanks for the suggestion.  I actually changed it to the following to as
> to not have the "_id" suffix:
>
> filename_number =
> models.ForeignKey(FilenameTbl,db_column='filename_number',
> to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
>
> This is what eventually worked for me:
>
> https://stackoverflow.com/questions/68537031/how-do-i-resolve-the-following-error-in-django-operationalerror-foreign-key-m
>
> Cheers,
> Wai
>
> On Mon, Jul 26, 2021 at 9:32 PM DJANGO DEVELOPER 
> wrote:
>
>> can you please  change your object from this:
>> filename_id = models.ForeignKey(FilenameTbl,db_column='filename_id',
>> to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
>> to :
>> filename_id = models.ForeignKey(FilenameTbl,db_column='filename',
>> to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
>>
>> On Tue, Jul 27, 2021 at 1:53 AM Wai Yeung  wrote:
>>
>>> Hello,
>>>
>>> I'm getting the following error whenever I attempt to save to the table
>>> in a SQLite database:
>>>
>>> foreign key mismatch - "procedure_tbl" referencing "filename_tbl"
>>>
>>> In models.py, these are the tables that the error is refering to:
>>>
>>> class FilenameTbl(models.Model):
>>> rowid = models.AutoField(auto_created=True, primary_key=True,
>>> serialize=False, verbose_name='FileID', db_column='rowid')
>>> filename = models.TextField(blank=True, null=True)
>>> creation_datetime = models.TextField(blank=True, null=True)
>>>
>>> class Meta:
>>> managed = False
>>> db_table = 'filename_tbl'
>>> ordering = ['rowid']
>>>
>>>
>>> class ProcedureTbl(models.Model):
>>> rowid = models.AutoField(auto_created=True, primary_key=True,
>>> serialize=False, verbose_name='ProcedureID', db_column='rowid')
>>> ...
>>> filename_id = models.ForeignKey(FilenameTbl,db_column='filename_id',
>>> to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
>>>
>>> class Meta:
>>> managed = False
>>> db_table = 'procedure_tbl'
>>> ordering = ['rowid']
>>>
>>> Data can be read from the tables and querysets like the following return
>>> the correct data:
>>> queryset = FilenameTbl.objects.values(
>>> 'rowid', 'filename',
>>> 'proceduretbl__rowid')
>>>
>>> Raw SQLite commands to write/update to the ProcedureTbl table function
>>> properly.
>>>
>>> If I removed filename_id from the ProcedureTbl, then data can be saved
>>> to the table.
>>>
>>> Any insight into the issue would be much appreciated.
>>>
>>> Cheers,
>>> Wai
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/b90d237f-8c29-42ef-897a-34221704699dn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/b90d237f-8c29-42ef-897a-34221704699dn%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/nqYRTN3m6Bg/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAKPY9pkH2pp3bkARsviqUdmn007Hc30ckrVOPH4yTBakJqXjDw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAKPY9pkH2pp3bkARsviqUdmn007Hc30ckrVOPH4yTBakJqXjDw%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/CAKDLG%3DTx_oX5o7fhW9aaeMcyXsqhB2GsqRujLAxy1HVi3QjBPg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAKDLG%3DTx_oX5o7fhW9aaeMcyXsqhB2GsqRujLAxy1HVi3QjBPg%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/CAKPY9p%3D-zeLdKNLg990KO%3D9PczU0WNEG2H7j9jfs9xis2ZLrOg%40mail.gmail.com.


Re: iterate over query set

2021-07-26 Thread DJANGO DEVELOPER
because you have provided the get_department with index 0. so it will only
give you the info about first department.

On Tue, Jul 27, 2021 at 3:17 AM sum abiut  wrote:

> I am trying to get the values of the userid by iterating through the
> queryset. However not all the values are displayed. I am not sure why I am
> not getting all the values when I iterate through it.
>
> users - Users.objects.filter(depid=get_department[0].depid)
> print(users) #when i test it here it pring all the values
> #however it only prints one value when i loop through it below. i want to
> be able to print all the #values
> for a in users:
>   print(a)# this only print value for the first user
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPCf-y65WJVjZC2PA4tz3ZubOtP5CjLtdHegiThhRnK8W5hSiw%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/CAKPY9pkp-vCz8%2BfJoGRkjfL-ohECO%2Bq1nH9mfZ3o-isYB3NUXg%40mail.gmail.com.


Re: OperationalError: foreign key mismatch

2021-07-26 Thread DJANGO DEVELOPER
can you please  change your object from this:
filename_id = models.ForeignKey(FilenameTbl,db_column='filename_id',
to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
to :
filename_id = models.ForeignKey(FilenameTbl,db_column='filename',
to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)

On Tue, Jul 27, 2021 at 1:53 AM Wai Yeung  wrote:

> Hello,
>
> I'm getting the following error whenever I attempt to save to the table in
> a SQLite database:
>
> foreign key mismatch - "procedure_tbl" referencing "filename_tbl"
>
> In models.py, these are the tables that the error is refering to:
>
> class FilenameTbl(models.Model):
> rowid = models.AutoField(auto_created=True, primary_key=True,
> serialize=False, verbose_name='FileID', db_column='rowid')
> filename = models.TextField(blank=True, null=True)
> creation_datetime = models.TextField(blank=True, null=True)
>
> class Meta:
> managed = False
> db_table = 'filename_tbl'
> ordering = ['rowid']
>
>
> class ProcedureTbl(models.Model):
> rowid = models.AutoField(auto_created=True, primary_key=True,
> serialize=False, verbose_name='ProcedureID', db_column='rowid')
> ...
> filename_id = models.ForeignKey(FilenameTbl,db_column='filename_id',
> to_field='rowid',null=True,blank=True,on_delete=models.SET_NULL)
>
> class Meta:
> managed = False
> db_table = 'procedure_tbl'
> ordering = ['rowid']
>
> Data can be read from the tables and querysets like the following return
> the correct data:
> queryset = FilenameTbl.objects.values(
> 'rowid', 'filename',
> 'proceduretbl__rowid')
>
> Raw SQLite commands to write/update to the ProcedureTbl table function
> properly.
>
> If I removed filename_id from the ProcedureTbl, then data can be saved to
> the table.
>
> Any insight into the issue would be much appreciated.
>
> Cheers,
> Wai
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b90d237f-8c29-42ef-897a-34221704699dn%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/CAKPY9pkH2pp3bkARsviqUdmn007Hc30ckrVOPH4yTBakJqXjDw%40mail.gmail.com.


Re: AttributeError: module 'polls.views' has no attribute 'index'

2021-07-26 Thread DJANGO DEVELOPER
as you mentioned that you're using django 3.2 but your urls.py file is
following the pattern of django 1.7.
use your urls.py this way : path('your polls url here', views.index,
name='index')

On Mon, Jul 26, 2021 at 6:45 PM Zain  wrote:

> Had the same issue.
>
> Solved, make sure you run each edited python file during the tutorial.
> I guess it needs to update. All I know is this fixed the issue.
>
> On Monday, April 19, 2021 at 2:07:34 AM UTC+10 avi.me...@gmail.com wrote:
>
>> I followed the same tutorial on 17th April 2021 with Python 3.9.2 and
>> Django 3.2 and have exactly the same problems as mentioned above.
>>
>> path('', views.index, name='index'),
>>
>> AttributeError: module 'polls.views' has no attribute 'index'
>>
>> any help on how can I debug this? I am a django noob
>>
>> On Wednesday, 19 April 2017 at 16:31:59 UTC+2 lce...@gmail.com wrote:
>>
>>> Thanks for your reploy.
>>>
>>> Actually I followed the tutorial exactly.
>>>
>>> My polls/views.py has:
>>>
>>> from django.http import HttpResponse
>>>
>>>
>>> def index(request):
>>> return HttpResponse("Hello, world. You're at the polls index.")
>>>
>>> My polls/urls.py has:
>>>
>>> from django.conf.urls import url
>>>
>>> from . import views
>>>
>>> urlpatterns = [
>>> url(r'^$', views.index, name='index'),
>>> ]
>>>
>>>
>>> On Wednesday, 19 April 2017 15:43:57 UTC+2, m712 - Developer wrote:
>>>
 You didn't give us enough info, but I am thinking that you don't have
 an index() function in your polls/views.py. Start the tutorial from the
 beginning and follow it closely.
 On Apr 19, 2017 4:17 PM, Billy Lin  wrote:

 I'm following the getting started tutorial 01 and running into issues
 after creating the polls app. Can someone please help?

 I'm using Python 3.6.1 and Django 1.11.

 Here's the detailed trace:

 Performing system checks...
 Unhandled exception in thread started by >>> check_errors..wrapper at 0x04222810>
 Traceback (most recent call last):
   File
 "C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\autoreload.py",
 line
 227, in wrapper
 fn(*args, **kwargs)
   File
 "C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\commands\ru
 nserver.py", line 125, in inner_run
 self.check(display_num_errors=True)
   File
 "C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\base.py",
 l
 ine 359, in check
 include_deployment_checks=include_deployment_checks,
   File
 "C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\base.py",
 l
 ine 346, in _run_checks
 return checks.run_checks(**kwargs)
   File
 "C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\checks\registry.py",
 l
 ine 81, in run_checks
 new_errors = check(app_configs=app_configs)
   File
 "C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\checks\urls.py",
 line
 16, in check_url_config
 return check_resolver(resolver)
   File
 "C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\checks\urls.py",
 line
 26, in check_resolver
 return check_method()
   File
 "C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\urls\resolvers.py",
 line 25
 4, in check
 for pattern in self.url_patterns:
   File
 "C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\functional.py",
 line
 35, in __get__
 res = instance.__dict__[self.name] = self.func(instance)
   File
 "C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\urls\resolvers.py",
 line 40
 5, in url_patterns
 patterns = getattr(self.urlconf_module, "urlpatterns",
 self.urlconf_module)
   File
 "C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\utils\functional.py",
 line
 35, in __get__
 res = instance.__dict__[self.name] = self.func(instance)
   File
 "C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\urls\resolvers.py",
 line 39
 8, in urlconf_module
 return import_module(self.urlconf_name)
   File
 "C:\Users\cephalin\AppData\Local\Programs\Python\Python36-32\lib\importlib\__init__.py",
 line 126, in import_modu
 le
 return _bootstrap._gcd_import(name[level:], package, level)
   File "", line 978, in _gcd_import
   File "", line 961, in _find_and_load
   File "", line 950, in
 _find_and_load_unlocked
   File "", line 655, in _load_unlocked
   File "", line 678, 

Re: counting the same words within a song added by a user using Django

2021-07-11 Thread DJANGO DEVELOPER
Sum thanks for your interest.
these are the screenshots of my requirements and of models.

On Mon, Jul 12, 2021 at 2:44 AM sum abiut  wrote:

> I might not fully understand your question. Can you show me what you have
> done? show us your models and what you want to achieve.
>
>
>
> On Fri, Jul 9, 2021 at 4:57 PM DJANGO DEVELOPER 
> wrote:
>
>> sum it is giving me error of TextField is not iterable
>>
>> On Wed, Jul 7, 2021 at 5:30 AM DJANGO DEVELOPER 
>> wrote:
>>
>>> so will it run smoothly?
>>> I mean there is no filter function there so will it filter a specific
>>> field and will give me count for the words?
>>>
>>> On Tue, Jul 6, 2021 at 9:40 PM sum abiut  wrote:
>>>
>>>> You can to something like this
>>>>
>>>> def count_songs(request):
>>>> #get the field that you want to count the words in it
>>>> field_name = model._meta.get_field('your_field)
>>>>
>>>> word_count =Counter(field_name)
>>>>
>>>> for key, value in word_count.items():
>>>>
>>>>   key = key
>>>>
>>>>   value=value
>>>>
>>>> context={
>>>>
>>>> 'key':key,
>>>>
>>>> 'value':value,
>>>> }
>>>>
>>>> return render(request, 'template.html', context)
>>>>
>>>>
>>>>
>>>> On Tue, Jul 6, 2021 at 7:09 PM lalit suthar 
>>>> wrote:
>>>>
>>>>> cool :D
>>>>>
>>>>> On Tuesday, 6 July 2021 at 10:25:06 UTC+5:30 abubak...@gmail.com
>>>>> wrote:
>>>>>
>>>>>> I found this as well. and I think  I want the result this way.
>>>>>>
>>>>>> On Tue, Jul 6, 2021 at 9:21 AM Lalit Suthar 
>>>>>> wrote:
>>>>>>
>>>>>>> [image: Screen Shot 2021-07-06 at 9.50.12 AM.png]
>>>>>>> Counter works with words also
>>>>>>>
>>>>>>> nice one Simon Charette learned something new :)
>>>>>>>
>>>>>>> On Tue, 6 Jul 2021 at 07:56, DJANGO DEVELOPER 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> thanks Simon but I am not using postgresql. I am using sqlite3
>>>>>>>> database. so I want a global solution, that work in all the databases.
>>>>>>>>
>>>>>>>> On Tue, Jul 6, 2021 at 1:54 AM Simon Charette 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> If you're using a PostgreSQL you might want to look at using a 
>>>>>>>>> tsvector
>>>>>>>>> column instead which will ignore stop words (the, or, of, ...) and map
>>>>>>>>> lexemes to their number of occurrence and position in the
>>>>>>>>> lyrics[0]. Assuming you were to index this column you'd be able to
>>>>>>>>> efficiently query it for existence of a particular lexeme or multiple 
>>>>>>>>> of
>>>>>>>>> them.
>>>>>>>>>
>>>>>>>>> You could then a union of all a user's song lyrics tsvector and
>>>>>>>>> even apply weights based on their listening frequency or their 
>>>>>>>>> favorite
>>>>>>>>> songs.
>>>>>>>>>
>>>>>>>>> Cheers,
>>>>>>>>> Simon
>>>>>>>>>
>>>>>>>>> [0]
>>>>>>>>> https://stackoverflow.com/questions/25445670/retrieving-position-and-number-of-lexem-occurrences-from-tsvector
>>>>>>>>> Le lundi 5 juillet 2021 à 13:51:48 UTC-4, abubak...@gmail.com a
>>>>>>>>> écrit :
>>>>>>>>>
>>>>>>>>>> Thank you Lalit bhai.
>>>>>>>>>> it seems to be a solution.
>>>>>>>>>> but what if I want to get the result for each single word rather
>>>>>>>>>> than single letter?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Mon, Jul 5, 2021 at 5:43 PM Lalit Suthar 
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>

Re: Django help| Urgent | how to find the frequency of a string for each word using django admin?

2021-07-09 Thread DJANGO DEVELOPER
hi Sebastian, do you know how can I resolve my problem? I want to count
same words in a string. after splitting it

On Fri, Jul 9, 2021 at 10:14 PM DJANGO DEVELOPER 
wrote:

> Hi Peter, thanks for your reply. Sorry I have m2m relationship of User
> model with Song model and I am using m2m_changes signal for it but still
> not giving me the desired output.
>
> On Fri, Jul 9, 2021 at 9:20 PM Sebastian Jung 
> wrote:
>
>> Hello Peter,
>>
>> ich would make it with a signal.
>>
>> Here a another example to use a post save signal:
>>
>> from django.db.models.signals import post_savefrom django.dispatch import 
>> receiver
>> class TransactionDetail(models.Model):
>> product = models.ForeignKey(Product)
>> # method for updating@receiver(post_save, sender=TransactionDetail, 
>> dispatch_uid="update_stock_count")def update_stock(sender, instance, 
>> **kwargs):
>> instance.product.stock -= instance.amount
>> instance.product.save()
>>
>>
>> Please write me if you don't understand these example.
>>
>>
>> P.S. i have no idea why you have a foreignkey relation. Why you save words 
>> not in another column in String class?
>>
>> Regards
>>
>>
>> Am Fr., 9. Juli 2021 um 17:30 Uhr schrieb 'Peter van der Does' via Django
>> users :
>>
>>> Overwrite the save method on the String model and when you hit save you
>>> split and save the words in the S_W_C model. This does mean when you update
>>> the String record all the words are added to the S_W_C model as well, as
>>> there is no correlation between the two model you don't know if that String
>>> was already counted.
>>> On 7/8/21 10:26 PM, DJANGO DEVELOPER wrote:
>>>
>>> is there anyone who can help me here?
>>>
>>> On Fri, Jul 9, 2021 at 2:51 AM DJANGO DEVELOPER 
>>> wrote:
>>>
>>>> let suppose I have 2 models:
>>>> *class String(models.model):*
>>>> *string = models.textarea(null = True, blank = True)*
>>>> *user = models.ForeignKey(user, on_delete=models.CASCADE)*
>>>> *def __str__(self):*
>>>> *return self.string*
>>>>
>>>> and
>>>>
>>>>
>>>> *class Song_Words_Count(models.model):*
>>>> *song = models.ForeignKey(user, on_delete=models.SET_NULL)*
>>>> *def __str__(self):*
>>>> *return self.song*
>>>>
>>>> now what I want to do at django admin side that the string added in*
>>>> "String" *model should be saved in Song_Wors_count model and string
>>>> should be splitted in a single word and frequency should be counted this
>>>> way:
>>>>
>>>> word word_freq
>>>> word1 10
>>>> word2 15
>>>> word3 20
>>>>
>>>> I need Urgent help please.
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Django users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to django-users+unsubscr...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/f53fc668-ca86-4c51-8d4c-673dee3d180cn%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/f53fc668-ca86-4c51-8d4c-673dee3d180cn%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/CAKPY9pkPqSbN0OoxVyQ%2BYcfqq2fRX1NDWqpdyo-KmOG2X_vYeQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAKPY9pkPqSbN0OoxVyQ%2BYcfqq2fRX1NDWqpdyo-KmOG2X_vYeQ%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>>> --
>>>
>>> *Peter van der Does o: **410-584-2500*
>>> * m: 732-425-3102 ONeil Interactive, Inc  oneilinteractive.com
>>> <http://www.oneilinteractive.com/> *
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from th

Re: Django help| Urgent | how to find the frequency of a string for each word using django admin?

2021-07-09 Thread DJANGO DEVELOPER
Hi Peter, thanks for your reply. Sorry I have m2m relationship of User
model with Song model and I am using m2m_changes signal for it but still
not giving me the desired output.

On Fri, Jul 9, 2021 at 9:20 PM Sebastian Jung 
wrote:

> Hello Peter,
>
> ich would make it with a signal.
>
> Here a another example to use a post save signal:
>
> from django.db.models.signals import post_savefrom django.dispatch import 
> receiver
> class TransactionDetail(models.Model):
> product = models.ForeignKey(Product)
> # method for updating@receiver(post_save, sender=TransactionDetail, 
> dispatch_uid="update_stock_count")def update_stock(sender, instance, 
> **kwargs):
> instance.product.stock -= instance.amount
> instance.product.save()
>
>
> Please write me if you don't understand these example.
>
>
> P.S. i have no idea why you have a foreignkey relation. Why you save words 
> not in another column in String class?
>
> Regards
>
>
> Am Fr., 9. Juli 2021 um 17:30 Uhr schrieb 'Peter van der Does' via Django
> users :
>
>> Overwrite the save method on the String model and when you hit save you
>> split and save the words in the S_W_C model. This does mean when you update
>> the String record all the words are added to the S_W_C model as well, as
>> there is no correlation between the two model you don't know if that String
>> was already counted.
>> On 7/8/21 10:26 PM, DJANGO DEVELOPER wrote:
>>
>> is there anyone who can help me here?
>>
>> On Fri, Jul 9, 2021 at 2:51 AM DJANGO DEVELOPER 
>> wrote:
>>
>>> let suppose I have 2 models:
>>> *class String(models.model):*
>>> *string = models.textarea(null = True, blank = True)*
>>> *user = models.ForeignKey(user, on_delete=models.CASCADE)*
>>> *def __str__(self):*
>>> *return self.string*
>>>
>>> and
>>>
>>>
>>> *class Song_Words_Count(models.model):*
>>> *song = models.ForeignKey(user, on_delete=models.SET_NULL)*
>>> *def __str__(self):*
>>> *return self.song*
>>>
>>> now what I want to do at django admin side that the string added in*
>>> "String" *model should be saved in Song_Wors_count model and string
>>> should be splitted in a single word and frequency should be counted this
>>> way:
>>>
>>> word word_freq
>>> word1 10
>>> word2 15
>>> word3 20
>>>
>>> I need Urgent help please.
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/f53fc668-ca86-4c51-8d4c-673dee3d180cn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/f53fc668-ca86-4c51-8d4c-673dee3d180cn%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/CAKPY9pkPqSbN0OoxVyQ%2BYcfqq2fRX1NDWqpdyo-KmOG2X_vYeQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAKPY9pkPqSbN0OoxVyQ%2BYcfqq2fRX1NDWqpdyo-KmOG2X_vYeQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>> --
>>
>> *Peter van der Does o: **410-584-2500*
>> * m: 732-425-3102 ONeil Interactive, Inc  oneilinteractive.com
>> <http://www.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/3921f39e-60d9-0e67-87ff-c8684bafc8f4%40oneilinteractive.com
>> <https://groups.google.com/d/msgid/django-users/3921f39e-60d9-0e67-87ff-c8684bafc8f4%40oneilinteractive.com?utm_medium=email_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from t

Re: counting the same words within a song added by a user using Django

2021-07-09 Thread DJANGO DEVELOPER
https://stackoverflow.com/questions/41689274/split-multiple-selections-into-separate-records-in-a-django-model

I also want the same result as it is mentioned here in the stackoverflow
question

On Fri, Jul 9, 2021 at 10:56 AM DJANGO DEVELOPER 
wrote:

> sum it is giving me error of TextField is not iterable
>
> On Wed, Jul 7, 2021 at 5:30 AM DJANGO DEVELOPER 
> wrote:
>
>> so will it run smoothly?
>> I mean there is no filter function there so will it filter a specific
>> field and will give me count for the words?
>>
>> On Tue, Jul 6, 2021 at 9:40 PM sum abiut  wrote:
>>
>>> You can to something like this
>>>
>>> def count_songs(request):
>>> #get the field that you want to count the words in it
>>> field_name = model._meta.get_field('your_field)
>>>
>>> word_count =Counter(field_name)
>>>
>>> for key, value in word_count.items():
>>>
>>>   key = key
>>>
>>>   value=value
>>>
>>> context={
>>>
>>> 'key':key,
>>>
>>> 'value':value,
>>> }
>>>
>>> return render(request, 'template.html', context)
>>>
>>>
>>>
>>> On Tue, Jul 6, 2021 at 7:09 PM lalit suthar 
>>> wrote:
>>>
>>>> cool :D
>>>>
>>>> On Tuesday, 6 July 2021 at 10:25:06 UTC+5:30 abubak...@gmail.com wrote:
>>>>
>>>>> I found this as well. and I think  I want the result this way.
>>>>>
>>>>> On Tue, Jul 6, 2021 at 9:21 AM Lalit Suthar 
>>>>> wrote:
>>>>>
>>>>>> [image: Screen Shot 2021-07-06 at 9.50.12 AM.png]
>>>>>> Counter works with words also
>>>>>>
>>>>>> nice one Simon Charette learned something new :)
>>>>>>
>>>>>> On Tue, 6 Jul 2021 at 07:56, DJANGO DEVELOPER 
>>>>>> wrote:
>>>>>>
>>>>>>> thanks Simon but I am not using postgresql. I am using sqlite3
>>>>>>> database. so I want a global solution, that work in all the databases.
>>>>>>>
>>>>>>> On Tue, Jul 6, 2021 at 1:54 AM Simon Charette 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> If you're using a PostgreSQL you might want to look at using a tsvector
>>>>>>>> column instead which will ignore stop words (the, or, of, ...) and map
>>>>>>>> lexemes to their number of occurrence and position in the
>>>>>>>> lyrics[0]. Assuming you were to index this column you'd be able to
>>>>>>>> efficiently query it for existence of a particular lexeme or multiple 
>>>>>>>> of
>>>>>>>> them.
>>>>>>>>
>>>>>>>> You could then a union of all a user's song lyrics tsvector and
>>>>>>>> even apply weights based on their listening frequency or their favorite
>>>>>>>> songs.
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>> Simon
>>>>>>>>
>>>>>>>> [0]
>>>>>>>> https://stackoverflow.com/questions/25445670/retrieving-position-and-number-of-lexem-occurrences-from-tsvector
>>>>>>>> Le lundi 5 juillet 2021 à 13:51:48 UTC-4, abubak...@gmail.com a
>>>>>>>> écrit :
>>>>>>>>
>>>>>>>>> Thank you Lalit bhai.
>>>>>>>>> it seems to be a solution.
>>>>>>>>> but what if I want to get the result for each single word rather
>>>>>>>>> than single letter?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Jul 5, 2021 at 5:43 PM Lalit Suthar 
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> https://www.guru99.com/python-counter-collections-example.html
>>>>>>>>>> Counter can be helpful for this situation
>>>>>>>>>>
>>>>>>>>>> On Mon, 5 Jul 2021 at 17:07, DJANGO DEVELOPER <
>>>>>>>>>> abubak...@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi there.
>>>>>>>>>>> I am developing a project based on adding songs to the user's
>>>>>&g

Re: counting the same words within a song added by a user using Django

2021-07-09 Thread DJANGO DEVELOPER
sum it is giving me error of TextField is not iterable

On Wed, Jul 7, 2021 at 5:30 AM DJANGO DEVELOPER 
wrote:

> so will it run smoothly?
> I mean there is no filter function there so will it filter a specific
> field and will give me count for the words?
>
> On Tue, Jul 6, 2021 at 9:40 PM sum abiut  wrote:
>
>> You can to something like this
>>
>> def count_songs(request):
>> #get the field that you want to count the words in it
>> field_name = model._meta.get_field('your_field)
>>
>> word_count =Counter(field_name)
>>
>> for key, value in word_count.items():
>>
>>   key = key
>>
>>   value=value
>>
>> context={
>>
>> 'key':key,
>>
>> 'value':value,
>> }
>>
>> return render(request, 'template.html', context)
>>
>>
>>
>> On Tue, Jul 6, 2021 at 7:09 PM lalit suthar 
>> wrote:
>>
>>> cool :D
>>>
>>> On Tuesday, 6 July 2021 at 10:25:06 UTC+5:30 abubak...@gmail.com wrote:
>>>
>>>> I found this as well. and I think  I want the result this way.
>>>>
>>>> On Tue, Jul 6, 2021 at 9:21 AM Lalit Suthar 
>>>> wrote:
>>>>
>>>>> [image: Screen Shot 2021-07-06 at 9.50.12 AM.png]
>>>>> Counter works with words also
>>>>>
>>>>> nice one Simon Charette learned something new :)
>>>>>
>>>>> On Tue, 6 Jul 2021 at 07:56, DJANGO DEVELOPER 
>>>>> wrote:
>>>>>
>>>>>> thanks Simon but I am not using postgresql. I am using sqlite3
>>>>>> database. so I want a global solution, that work in all the databases.
>>>>>>
>>>>>> On Tue, Jul 6, 2021 at 1:54 AM Simon Charette 
>>>>>> wrote:
>>>>>>
>>>>>>> If you're using a PostgreSQL you might want to look at using a tsvector
>>>>>>> column instead which will ignore stop words (the, or, of, ...) and map
>>>>>>> lexemes to their number of occurrence and position in the
>>>>>>> lyrics[0]. Assuming you were to index this column you'd be able to
>>>>>>> efficiently query it for existence of a particular lexeme or multiple of
>>>>>>> them.
>>>>>>>
>>>>>>> You could then a union of all a user's song lyrics tsvector and even
>>>>>>> apply weights based on their listening frequency or their favorite 
>>>>>>> songs.
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Simon
>>>>>>>
>>>>>>> [0]
>>>>>>> https://stackoverflow.com/questions/25445670/retrieving-position-and-number-of-lexem-occurrences-from-tsvector
>>>>>>> Le lundi 5 juillet 2021 à 13:51:48 UTC-4, abubak...@gmail.com a
>>>>>>> écrit :
>>>>>>>
>>>>>>>> Thank you Lalit bhai.
>>>>>>>> it seems to be a solution.
>>>>>>>> but what if I want to get the result for each single word rather
>>>>>>>> than single letter?
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Jul 5, 2021 at 5:43 PM Lalit Suthar 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> https://www.guru99.com/python-counter-collections-example.html
>>>>>>>>> Counter can be helpful for this situation
>>>>>>>>>
>>>>>>>>> On Mon, 5 Jul 2021 at 17:07, DJANGO DEVELOPER 
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>> Hi there.
>>>>>>>>>> I am developing a project based on adding songs to the user's
>>>>>>>>>> library and to the home page.
>>>>>>>>>> other users can also purchase the songs like wise people do
>>>>>>>>>> shopping on eCommerce stores.
>>>>>>>>>> *Problem:(Question)*
>>>>>>>>>> The problem that I want to discuss here is that when a user adds
>>>>>>>>>> a sing through django forms, and now that song is added to the user's
>>>>>>>>>> personal library.
>>>>>>>>>> now what I want to do is :
>>>>>>>>>>
>>>>>>>>

Re: Django help| Urgent | how to find the frequency of a string for each word using django admin?

2021-07-08 Thread DJANGO DEVELOPER
is there anyone who can help me here?

On Fri, Jul 9, 2021 at 2:51 AM DJANGO DEVELOPER 
wrote:

> let suppose I have 2 models:
> *class String(models.model):*
> *string = models.textarea(null = True, blank = True)*
> *user = models.ForeignKey(user, on_delete=models.CASCADE)*
> *def __str__(self):*
> *return self.string*
>
> and
>
>
> *class Song_Words_Count(models.model):*
> *song = models.ForeignKey(user, on_delete=models.SET_NULL)*
> *def __str__(self):*
> *return self.song*
>
> now what I want to do at django admin side that the string added in*
> "String" *model should be saved in Song_Wors_count model and string
> should be splitted in a single word and frequency should be counted this
> way:
>
> word word_freq
> word1 10
> word2 15
> word3 20
>
> I need Urgent help please.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f53fc668-ca86-4c51-8d4c-673dee3d180cn%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/f53fc668-ca86-4c51-8d4c-673dee3d180cn%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/CAKPY9pkPqSbN0OoxVyQ%2BYcfqq2fRX1NDWqpdyo-KmOG2X_vYeQ%40mail.gmail.com.


Django help| Urgent | how to find the frequency of a string for each word using django admin?

2021-07-08 Thread DJANGO DEVELOPER
let suppose I have 2 models:
*class String(models.model):*
*string = models.textarea(null = True, blank = True)*
*user = models.ForeignKey(user, on_delete=models.CASCADE)*
*def __str__(self):*
*return self.string*

and


*class Song_Words_Count(models.model):*
*song = models.ForeignKey(user, on_delete=models.SET_NULL)*
*def __str__(self):*
*return self.song*

now what I want to do at django admin side that the string added in* 
"String" *model should be saved in Song_Wors_count model and string should 
be splitted in a single word and frequency should be counted this way:

word word_freq
word1 10
word2 15
word3 20

I need Urgent help please.

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


Re: Role based Authentication

2021-07-08 Thread DJANGO DEVELOPER
can you please give me a example? so that I can understand it well. thanks
in advance.

<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Thu, Jul 8, 2021 at 9:57 AM Avi shah  wrote:

> you can normally do it using fbv's , just make sure while saving the model
> , you also save the user model also parallely with the student model(in
> reference with my repo)
>
> On Thu, Jul 8, 2021 at 7:44 AM DJANGO DEVELOPER 
> wrote:
>
>> Avi Shah I have just visited your github repo. is there any other code
>> where you have performed multi-user sign up with FBV's?
>>
>> On Thu, Jul 8, 2021 at 4:53 AM sum abiut  wrote:
>>
>>> From the admin site you can create different groups and then assign
>>> specific users to specific groups.
>>> then  filter users' roles based on the specific group that you have
>>> assigned them to.
>>>
>>>
>>>
>>> On Thu, Jul 8, 2021 at 3:53 AM Lalit Suthar 
>>> wrote:
>>>
>>>> you can extend User model and have a role field in default User model
>>>>
>>>> https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html
>>>>
>>>> On Wed, 7 Jul 2021 at 20:47, Avi shah  wrote:
>>>>
>>>>> https://github.com/Avishah123/Multi-user-auth1
>>>>>
>>>>> On Wed, Jul 7, 2021 at 8:16 PM DJANGO DEVELOPER <
>>>>> abubakarbr...@gmail.com> wrote:
>>>>>
>>>>>> f
>>>>>>
>>>>>> On Wed, Jul 7, 2021 at 7:07 PM LokRaj Kumar Vuppu <
>>>>>> lokrajkumarvu...@gmail.com> wrote:
>>>>>>
>>>>>>> How to assign a role to user when registered into our application.
>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "Django users" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to django-users+unsubscr...@googlegroups.com.
>>>>>>> To view this discussion on the web visit
>>>>>>> https://groups.google.com/d/msgid/django-users/21f87894-278b-4705-83cb-9a426ea85ee7n%40googlegroups.com
>>>>>>> <https://groups.google.com/d/msgid/django-users/21f87894-278b-4705-83cb-9a426ea85ee7n%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/CAKPY9pn6SGzjAsfTpoMJPeXBn0XSyNcW-ko8rJ%2BUH-WksRr-oA%40mail.gmail.com
>>>>>> <https://groups.google.com/d/msgid/django-users/CAKPY9pn6SGzjAsfTpoMJPeXBn0XSyNcW-ko8rJ%2BUH-WksRr-oA%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/CALa7AFOCSQ-cr1pkBTVzDmZvH7b2%3DEb7TPcjHK%2BkhaonuwL%2BRQ%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/django-users/CALa7AFOCSQ-cr1pkBTVzDmZvH7b2%3DEb7TPcjHK%2BkhaonuwL%2BRQ%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.c

Re: Role based Authentication

2021-07-07 Thread DJANGO DEVELOPER
Avi Shah I have just visited your github repo. is there any other code
where you have performed multi-user sign up with FBV's?

On Thu, Jul 8, 2021 at 4:53 AM sum abiut  wrote:

> From the admin site you can create different groups and then assign
> specific users to specific groups.
> then  filter users' roles based on the specific group that you have
> assigned them to.
>
>
>
> On Thu, Jul 8, 2021 at 3:53 AM Lalit Suthar 
> wrote:
>
>> you can extend User model and have a role field in default User model
>>
>> https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html
>>
>> On Wed, 7 Jul 2021 at 20:47, Avi shah  wrote:
>>
>>> https://github.com/Avishah123/Multi-user-auth1
>>>
>>> On Wed, Jul 7, 2021 at 8:16 PM DJANGO DEVELOPER 
>>> wrote:
>>>
>>>> f
>>>>
>>>> On Wed, Jul 7, 2021 at 7:07 PM LokRaj Kumar Vuppu <
>>>> lokrajkumarvu...@gmail.com> wrote:
>>>>
>>>>> How to assign a role to user when registered into our application.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Django users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to django-users+unsubscr...@googlegroups.com.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/django-users/21f87894-278b-4705-83cb-9a426ea85ee7n%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/django-users/21f87894-278b-4705-83cb-9a426ea85ee7n%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/CAKPY9pn6SGzjAsfTpoMJPeXBn0XSyNcW-ko8rJ%2BUH-WksRr-oA%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAKPY9pn6SGzjAsfTpoMJPeXBn0XSyNcW-ko8rJ%2BUH-WksRr-oA%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/CALa7AFOCSQ-cr1pkBTVzDmZvH7b2%3DEb7TPcjHK%2BkhaonuwL%2BRQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CALa7AFOCSQ-cr1pkBTVzDmZvH7b2%3DEb7TPcjHK%2BkhaonuwL%2BRQ%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/CAGp2JVEvTHTGsdFbrk5w_b%2B_h9T4u0rnL4R-Zr2TWBt12PyhYA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAGp2JVEvTHTGsdFbrk5w_b%2B_h9T4u0rnL4R-Zr2TWBt12PyhYA%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/CAPCf-y6tk1KO50uJg5d94HfGAfiYXfcDJd3fL-UPF8HWO3Q7qw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAPCf-y6tk1KO50uJg5d94HfGAfiYXfcDJd3fL-UPF8HWO3Q7qw%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/CAKPY9p%3DpNRdO8TDMHUHQFFJq6gdGdi5mXeSKchT6VG3MDZq6Dg%40mail.gmail.com.


Re: i have a picture field in my model that was not stored properly in django database and i can't retrive that picture

2021-07-07 Thread DJANGO DEVELOPER
you're doing well but it is not the right way o ask the question. you need
to describe all of your problem and what you have done to resolve it, then
may be someone will be able to help you.

On Wed, Jul 7, 2021 at 7:07 PM Hugh Frost 
wrote:

> please check below view Function
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/8d5c1a31-8781-4eec-8840-bc6b58969c97n%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/CAKPY9pmak_2wn_d5wwM8MBb0WROq%2BaZ6XjzMHNHZPJKZyEgahw%40mail.gmail.com.


Re: Role based Authentication

2021-07-07 Thread DJANGO DEVELOPER
f

On Wed, Jul 7, 2021 at 7:07 PM LokRaj Kumar Vuppu <
lokrajkumarvu...@gmail.com> wrote:

> How to assign a role to user when registered into our application.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/21f87894-278b-4705-83cb-9a426ea85ee7n%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/CAKPY9pn6SGzjAsfTpoMJPeXBn0XSyNcW-ko8rJ%2BUH-WksRr-oA%40mail.gmail.com.


Re: Django Help | Counting word frequency in Django using dictionary.

2021-07-06 Thread DJANGO DEVELOPER
I am using sqlite3. so only needs to store the data in django
admin/database but in the form of dictionary or in the form of counted
words.

On Wed, Jul 7, 2021 at 9:09 AM Lalit Suthar 
wrote:

> you can use postgres JsonField
> https://docs.djangoproject.com/en/3.2/ref/contrib/postgres/fields/#jsonfield
>
> On Wed, 7 Jul 2021 at 06:05, DJANGO DEVELOPER 
> wrote:
>
>> Hi
>>  I am developing a django project and I want to count word frequency at
>> the django admin side.
>> Means a word is repeating in a string should be counted and be saved in
>> the database only.
>> I have managed to do it on front-end side but now I also want to do it on
>> django admin side.
>> example: any_string = {'word1': 12,'word2': 29}
>> this the example because I want to get the data this way. word1 is there
>> for 12 times in a string and same is the case for word2.
>> so I need help and your help would be appreciated.
>> 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/672d9b02-382e-4b79-bcaf-6b618b514c28n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/672d9b02-382e-4b79-bcaf-6b618b514c28n%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/CAGp2JVEM2mq8EPokL9KwU3OGz%2BgaJf%3DgMALZbVa%3DdsEeW1WGiw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAGp2JVEM2mq8EPokL9KwU3OGz%2BgaJf%3DgMALZbVa%3DdsEeW1WGiw%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/CAKPY9pmAPnbeEvgL1%3DHdid7yZ_BgF-b34AVKr-n3-bDvcTmgjw%40mail.gmail.com.


Re: hardware required to use django?

2021-07-06 Thread DJANGO DEVELOPER
you can use linux as well and I am using windows 10 right now and it is
working fine with django development.
I also used windows8 and it worked.

On Wed, Jul 7, 2021 at 6:39 AM Rusty  wrote:

> We are planning the development using django.
>
> Could I know the minimum specifications of hardware required to use django?
>
> I would appreciate it if you could let me know based on Windows and Linux.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/fdb37212-03a4-4d58-8b5e-070c2a2ddd67n%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/CAKPY9pk30qjeSS75ctZW8oE6s1si%3DLr5%2BuCP--YMLmA4A1ZN_Q%40mail.gmail.com.


Django Help | Counting word frequency in Django using dictionary.

2021-07-06 Thread DJANGO DEVELOPER
Hi
 I am developing a django project and I want to count word frequency at the 
django admin side.
Means a word is repeating in a string should be counted and be saved in the 
database only.
I have managed to do it on front-end side but now I also want to do it on 
django admin side.
example: any_string = {'word1': 12,'word2': 29}
this the example because I want to get the data this way. word1 is there 
for 12 times in a string and same is the case for word2.
so I need help and your help would be appreciated.
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/672d9b02-382e-4b79-bcaf-6b618b514c28n%40googlegroups.com.


Re: counting the same words within a song added by a user using Django

2021-07-06 Thread DJANGO DEVELOPER
so will it run smoothly?
I mean there is no filter function there so will it filter a specific field
and will give me count for the words?

On Tue, Jul 6, 2021 at 9:40 PM sum abiut  wrote:

> You can to something like this
>
> def count_songs(request):
> #get the field that you want to count the words in it
> field_name = model._meta.get_field('your_field)
>
> word_count =Counter(field_name)
>
> for key, value in word_count.items():
>
>   key = key
>
>   value=value
>
> context={
>
> 'key':key,
>
> 'value':value,
> }
>
> return render(request, 'template.html', context)
>
>
>
> On Tue, Jul 6, 2021 at 7:09 PM lalit suthar 
> wrote:
>
>> cool :D
>>
>> On Tuesday, 6 July 2021 at 10:25:06 UTC+5:30 abubak...@gmail.com wrote:
>>
>>> I found this as well. and I think  I want the result this way.
>>>
>>> On Tue, Jul 6, 2021 at 9:21 AM Lalit Suthar 
>>> wrote:
>>>
>>>> [image: Screen Shot 2021-07-06 at 9.50.12 AM.png]
>>>> Counter works with words also
>>>>
>>>> nice one Simon Charette learned something new :)
>>>>
>>>> On Tue, 6 Jul 2021 at 07:56, DJANGO DEVELOPER 
>>>> wrote:
>>>>
>>>>> thanks Simon but I am not using postgresql. I am using sqlite3
>>>>> database. so I want a global solution, that work in all the databases.
>>>>>
>>>>> On Tue, Jul 6, 2021 at 1:54 AM Simon Charette 
>>>>> wrote:
>>>>>
>>>>>> If you're using a PostgreSQL you might want to look at using a tsvector
>>>>>> column instead which will ignore stop words (the, or, of, ...) and map
>>>>>> lexemes to their number of occurrence and position in the lyrics[0].
>>>>>> Assuming you were to index this column you'd be able to efficiently query
>>>>>> it for existence of a particular lexeme or multiple of them.
>>>>>>
>>>>>> You could then a union of all a user's song lyrics tsvector and even
>>>>>> apply weights based on their listening frequency or their favorite songs.
>>>>>>
>>>>>> Cheers,
>>>>>> Simon
>>>>>>
>>>>>> [0]
>>>>>> https://stackoverflow.com/questions/25445670/retrieving-position-and-number-of-lexem-occurrences-from-tsvector
>>>>>> Le lundi 5 juillet 2021 à 13:51:48 UTC-4, abubak...@gmail.com a
>>>>>> écrit :
>>>>>>
>>>>>>> Thank you Lalit bhai.
>>>>>>> it seems to be a solution.
>>>>>>> but what if I want to get the result for each single word rather
>>>>>>> than single letter?
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Jul 5, 2021 at 5:43 PM Lalit Suthar 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> https://www.guru99.com/python-counter-collections-example.html
>>>>>>>> Counter can be helpful for this situation
>>>>>>>>
>>>>>>>> On Mon, 5 Jul 2021 at 17:07, DJANGO DEVELOPER 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Hi there.
>>>>>>>>> I am developing a project based on adding songs to the user's
>>>>>>>>> library and to the home page.
>>>>>>>>> other users can also purchase the songs like wise people do
>>>>>>>>> shopping on eCommerce stores.
>>>>>>>>> *Problem:(Question)*
>>>>>>>>> The problem that I want to discuss here is that when a user adds a
>>>>>>>>> sing through django forms, and now that song is added to the user's
>>>>>>>>> personal library.
>>>>>>>>> now what I want to do is :
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> *When the lyrics of a song are added as a record to the "Song"
>>>>>>>>> table, the individual words in that song should be added to a 2nd 
>>>>>>>>> table
>>>>>>>>> with their frequency of usage within that song (so the words need to 
>>>>>>>>> be
>>>>>>>>> counted and a signal needs to be created).Also, when a user adds the 
>>>>>>>>> song
>>>

Re: No reverse match at /

2021-07-06 Thread DJANGO DEVELOPER
you have to provide id in your urls and in subject.html as well. share you
views and url as well.


On Tue, Jul 6, 2021 at 6:08 PM Bhanu prasad Ch  wrote:

> I had a problem in passing special characters in Charfield in DB of Django.
> Is that possible to pass special characters in CharField DB?
> GitHub Issue 
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b57636e3-35c4-4798-abe3-b6f97576a53fn%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/CAKPY9p%3DeBKaDSk8PsnmHXaPAmM9rbPhrvpyc6om85QPV7vXxyg%40mail.gmail.com.


Re: counting the same words within a song added by a user using Django

2021-07-05 Thread DJANGO DEVELOPER
thanks Simon but I am not using postgresql. I am using sqlite3 database. so
I want a global solution, that work in all the databases.

On Tue, Jul 6, 2021 at 1:54 AM Simon Charette  wrote:

> If you're using a PostgreSQL you might want to look at using a tsvector
> column instead which will ignore stop words (the, or, of, ...) and map
> lexemes to their number of occurrence and position in the lyrics[0].
> Assuming you were to index this column you'd be able to efficiently query
> it for existence of a particular lexeme or multiple of them.
>
> You could then a union of all a user's song lyrics tsvector and even apply
> weights based on their listening frequency or their favorite songs.
>
> Cheers,
> Simon
>
> [0]
> https://stackoverflow.com/questions/25445670/retrieving-position-and-number-of-lexem-occurrences-from-tsvector
> Le lundi 5 juillet 2021 à 13:51:48 UTC-4, abubak...@gmail.com a écrit :
>
>> Thank you Lalit bhai.
>> it seems to be a solution.
>> but what if I want to get the result for each single word rather than
>> single letter?
>>
>>
>> On Mon, Jul 5, 2021 at 5:43 PM Lalit Suthar  wrote:
>>
>>> https://www.guru99.com/python-counter-collections-example.html
>>> Counter can be helpful for this situation
>>>
>>> On Mon, 5 Jul 2021 at 17:07, DJANGO DEVELOPER 
>>> wrote:
>>>
>>>> Hi there.
>>>> I am developing a project based on adding songs to the user's library
>>>> and to the home page.
>>>> other users can also purchase the songs like wise people do shopping on
>>>> eCommerce stores.
>>>> *Problem:(Question)*
>>>> The problem that I want to discuss here is that when a user adds a sing
>>>> through django forms, and now that song is added to the user's personal
>>>> library.
>>>> now what I want to do is :
>>>>
>>>>
>>>> *When the lyrics of a song are added as a record to the "Song" table,
>>>> the individual words in that song should be added to a 2nd table with their
>>>> frequency of usage within that song (so the words need to be counted and a
>>>> signal needs to be created).Also, when a user adds the song to his/her
>>>> personal library, all of the words from the song and their frequencies
>>>> within that song should be added to another table and associated with that
>>>> user.*
>>>>
>>>> how to count same word within a song?
>>>>
>>>> can anyone help me here?
>>>> your 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...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/bc7bc37b-6f26-465c-b330-d275ab86b76an%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/bc7bc37b-6f26-465c-b330-d275ab86b76an%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/CAGp2JVHuos6d4%3D-_S%3DR-q8hq48Yzf%3D-xgmPziKEA2a3DYXAzbg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAGp2JVHuos6d4%3D-_S%3DR-q8hq48Yzf%3D-xgmPziKEA2a3DYXAzbg%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/c77799f3-1492-459a-8187-8d62985407b6n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/c77799f3-1492-459a-8187-8d62985407b6n%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/CAKPY9pnp0GG%2BwUHf68gfbMXUMV9BiY7qsR%3D_Dw1yrmsEkK6SdA%40mail.gmail.com.


Re: counting the same words within a song added by a user using Django

2021-07-05 Thread DJANGO DEVELOPER
Thank you Lalit bhai.
it seems to be a solution.
but what if I want to get the result for each single word rather than
single letter?


On Mon, Jul 5, 2021 at 5:43 PM Lalit Suthar 
wrote:

> https://www.guru99.com/python-counter-collections-example.html
> Counter can be helpful for this situation
>
> On Mon, 5 Jul 2021 at 17:07, DJANGO DEVELOPER 
> wrote:
>
>> Hi there.
>> I am developing a project based on adding songs to the user's library and
>> to the home page.
>> other users can also purchase the songs like wise people do shopping on
>> eCommerce stores.
>> *Problem:(Question)*
>> The problem that I want to discuss here is that when a user adds a sing
>> through django forms, and now that song is added to the user's personal
>> library.
>> now what I want to do is :
>>
>>
>> *When the lyrics of a song are added as a record to the "Song" table, the
>> individual words in that song should be added to a 2nd table with their
>> frequency of usage within that song (so the words need to be counted and a
>> signal needs to be created).Also, when a user adds the song to his/her
>> personal library, all of the words from the song and their frequencies
>> within that song should be added to another table and associated with that
>> user.*
>>
>> how to count same word within a song?
>>
>> can anyone help me here?
>> your 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/bc7bc37b-6f26-465c-b330-d275ab86b76an%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/bc7bc37b-6f26-465c-b330-d275ab86b76an%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/CAGp2JVHuos6d4%3D-_S%3DR-q8hq48Yzf%3D-xgmPziKEA2a3DYXAzbg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAGp2JVHuos6d4%3D-_S%3DR-q8hq48Yzf%3D-xgmPziKEA2a3DYXAzbg%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/CAKPY9p%3Dyw_AE71kRi5JMmi8Vsj3J07RUhWCpS2i6UPaDUr4jCQ%40mail.gmail.com.


counting the same words within a song added by a user using Django

2021-07-05 Thread DJANGO DEVELOPER
Hi there.
I am developing a project based on adding songs to the user's library and 
to the home page.
other users can also purchase the songs like wise people do shopping on 
eCommerce stores.
*Problem:(Question)*
The problem that I want to discuss here is that when a user adds a sing 
through django forms, and now that song is added to the user's personal 
library.
now what I want to do is :


*When the lyrics of a song are added as a record to the "Song" table, the 
individual words in that song should be added to a 2nd table with their 
frequency of usage within that song (so the words need to be counted and a 
signal needs to be created).Also, when a user adds the song to his/her 
personal library, all of the words from the song and their frequencies 
within that song should be added to another table and associated with that 
user.*

how to count same word within a song? 

can anyone help me here?
your 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/bc7bc37b-6f26-465c-b330-d275ab86b76an%40googlegroups.com.


Re: DRF | Django | Up votes | Down Votes

2021-06-25 Thread DJANGO DEVELOPER
Hi Mr Mike.
Can you please share you knowledge here to help me?

On Sat, Jun 26, 2021 at 6:54 AM Mike Dewhirst  wrote:

> HE lmbo pop l9m6oo9k
>
>
>
> --
> (Unsigned mail from my phone)
>
>
>
>  Original message ----
> From: DJANGO DEVELOPER 
> Date: 26/6/21 04:38 (GMT+10:00)
> To: Django users 
> Subject: Re: DRF | Django | Up votes | Down Votes
>
> Ryan Thank you so much. I will give it try. and let you know about the
> results
>
> On Fri, Jun 25, 2021 at 8:59 PM Ryan Nowakowski 
> wrote:
>
>> On Thu, Jun 24, 2021 at 07:15:09AM -0700, DJANGO DEVELOPER wrote:
>> > Hi Django experts.
>> > I am building a Django, DRF based mobile app and I want to have
>> > functionality of up votes and down votes for posts that user will post.
>> > So what I want to say here that, if an user upvotes a post then it
>> should
>> > be get higher ranks as quora questions do. and if there are more down
>> votes
>> > than up votes then a post should be moved down ward rather than going
>> up.
>> > I have applied a logic already here and shared the screenshots as well.
>> but
>> > I am sure that there is a better logic or solution for this problem.
>>
>> Do you want your users to be able to change or delete their vote?
>> In that case, you'll need to keep track of who voted what. Maybe create
>> a model like this:
>>
>> class VoteQuerySet(models.QuerySet):
>>
>> def down(self):
>> """Return only the down votes"""
>> return self.filter(value__lt=0)
>>
>> def up(self):
>> """Return only the up votes"""
>> return self.filter(value__gt=0)
>>
>> def down_total(self):
>> """Return the down vote total as a negative number"""
>> return self.down().aggregate(Sum('value'))['value__sum']
>>
>> def up_total(self):
>> """Return the up vote total as a positive number"""
>> return self.up().aggregate(Sum('value'))['value__sum']
>>
>> def total(self):
>> """Return the total of all up and down votes"""
>> return self.aggregate(Sum('value'))['value__sum']
>>
>>
>> class Vote(models.Model):
>> """A user's up or down vote for a post
>>
>> "value" should be -1 for a down vote and 1 for an up vote
>>
>> """
>> user = models.ForeignKey(User, on_delete=models.CASCADE)
>> post = models.ForeignKey(Post, on_delete=models.CASCADE)
>> value = models.SmallIntegerField()
>>
>> objects = VoteQuerySet.as_manager()
>>
>> class Meta:
>> unique_together = (user, post)
>>
>> def vote_up(self):
>> self.value = 1
>>
>> def vote_down(self):
>> self.value = -1
>>
>>
>> You can then vote like this:
>>
>> vote = Vote(user=user, post=post)
>> vote.vote_up()  # or vote.vote_down()
>> vote.save()
>>
>>
>> Here's a post's up vote count:
>>
>> post.vote_set.up_total()
>>
>>
>> You can change a user's vote like this:
>>
>> vote = user.vote_set.get(post=post)
>> vote.vote_down()
>>
>> ... or delete:
>>
>> vote.delete()
>>
>>
>> Any finally, here's how you can sort your posts:
>>
>>
>> Post.objects.all().annotate(vote_total=Sum('vote__value')).order_by('-vote_total')
>>
>>
>> Caveat: code untested
>>
>>
>>
>> Hope this helps!
>>
>> Ryan
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/20210625155946.GC16290%40fattuba.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

Re: DRF | Django | Up votes | Down Votes

2021-06-25 Thread DJANGO DEVELOPER
Ryan Thank you so much. I will give it try. and let you know about the
results

On Fri, Jun 25, 2021 at 8:59 PM Ryan Nowakowski  wrote:

> On Thu, Jun 24, 2021 at 07:15:09AM -0700, DJANGO DEVELOPER wrote:
> > Hi Django experts.
> > I am building a Django, DRF based mobile app and I want to have
> > functionality of up votes and down votes for posts that user will post.
> > So what I want to say here that, if an user upvotes a post then it
> should
> > be get higher ranks as quora questions do. and if there are more down
> votes
> > than up votes then a post should be moved down ward rather than going up.
> > I have applied a logic already here and shared the screenshots as well.
> but
> > I am sure that there is a better logic or solution for this problem.
>
> Do you want your users to be able to change or delete their vote?
> In that case, you'll need to keep track of who voted what. Maybe create
> a model like this:
>
> class VoteQuerySet(models.QuerySet):
>
> def down(self):
> """Return only the down votes"""
> return self.filter(value__lt=0)
>
> def up(self):
> """Return only the up votes"""
> return self.filter(value__gt=0)
>
> def down_total(self):
> """Return the down vote total as a negative number"""
> return self.down().aggregate(Sum('value'))['value__sum']
>
> def up_total(self):
> """Return the up vote total as a positive number"""
> return self.up().aggregate(Sum('value'))['value__sum']
>
> def total(self):
> """Return the total of all up and down votes"""
> return self.aggregate(Sum('value'))['value__sum']
>
>
> class Vote(models.Model):
> """A user's up or down vote for a post
>
> "value" should be -1 for a down vote and 1 for an up vote
>
> """
> user = models.ForeignKey(User, on_delete=models.CASCADE)
> post = models.ForeignKey(Post, on_delete=models.CASCADE)
> value = models.SmallIntegerField()
>
> objects = VoteQuerySet.as_manager()
>
> class Meta:
> unique_together = (user, post)
>
> def vote_up(self):
> self.value = 1
>
> def vote_down(self):
> self.value = -1
>
>
> You can then vote like this:
>
> vote = Vote(user=user, post=post)
> vote.vote_up()  # or vote.vote_down()
> vote.save()
>
>
> Here's a post's up vote count:
>
> post.vote_set.up_total()
>
>
> You can change a user's vote like this:
>
> vote = user.vote_set.get(post=post)
> vote.vote_down()
>
> ... or delete:
>
> vote.delete()
>
>
> Any finally, here's how you can sort your posts:
>
>
> Post.objects.all().annotate(vote_total=Sum('vote__value')).order_by('-vote_total')
>
>
> Caveat: code untested
>
>
>
> Hope this helps!
>
> Ryan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/20210625155946.GC16290%40fattuba.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/CAKPY9pnmqN46L93O38djOKdCKP3Vp%2B_vHLetC479zDxuOU6x_g%40mail.gmail.com.


Re: DRF | Django | Up votes | Down Votes

2021-06-25 Thread DJANGO DEVELOPER
Chetan I got what you're saying. so how diff_votes will be updated? do have
I to apply the same logic as Oba discussed above?
and yes by calculating the up and down votes at the same time was that, if
a user up votes my post and another user down votes my post then should be
ranked accordingly.
means I just want to rank my post higher if there are more up votes than
down votes. I think I have described well, what I want to apply at the
moment.

On Fri, Jun 25, 2021 at 2:17 PM Chetan Ganji  wrote:

> You should have a field on Votes Model diff_vote as integerfield, which
> will be updated when a user upvote or downvote.
>
> WHY??
> Calculating this value on list view will result in higher latency.
> So we can dump that calculation on creating on updating.
>
> What do you mean by calculate the up votes and down votes at the same time?
>
>
> Regards,
> Chetan Ganji
> +91-900-483-4183
> ganji.che...@gmail.com
> http://ryucoder.in
>
>
> On Fri, Jun 25, 2021 at 12:39 PM DJANGO DEVELOPER 
> wrote:
>
>> Oba Thank you so much. and let me try it.
>> and one more thing that I want to ask that how can I calculate the up
>> votes and down votes at the same time? as Facebook likes and dislikes do.
>> can you guide me in this regard?
>>
>> On Fri, Jun 25, 2021 at 11:15 AM oba stephen 
>> wrote:
>>
>>> Hi,
>>>
>>> One way would be to create an extra field to track the difference in
>>> both fields and then in your meta information on that model set the
>>> ordering to that field.
>>>
>>> Another approach which is better is to do something like this.
>>>
>>> Votes.objects.extra(select={'diff': 'upvote - downvote'}).order_by('diff')
>>>
>>>
>>> Best regards
>>>
>>> Stephen Oba
>>>
>>> On Fri, Jun 25, 2021, 6:03 AM DJANGO DEVELOPER 
>>> wrote:
>>>
>>>> Is there anyone who can help me here?
>>>>
>>>> On Thu, Jun 24, 2021 at 7:15 PM DJANGO DEVELOPER <
>>>> abubakarbr...@gmail.com> wrote:
>>>>
>>>>> Hi Django experts.
>>>>> I am building a Django, DRF based mobile app and I want to have
>>>>> functionality of up votes and down votes for posts that user will post.
>>>>> So what I want to say here that, if an user upvotes a post then it
>>>>> should be get higher ranks as quora questions do. and if there are more
>>>>> down votes than up votes then a post should be moved down ward rather than
>>>>> going up.
>>>>> I have applied a logic already here and shared the screenshots as
>>>>> well. but I am sure that there is a better logic or solution for this
>>>>> problem.
>>>>> Thanks in advance.
>>>>> Mr Mike and Mr Lalit can you guide me here please?
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Django users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to django-users+unsubscr...@googlegroups.com.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/django-users/c72fefe7-58d2-4c43-84b8-0faa3d9747b0n%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/django-users/c72fefe7-58d2-4c43-84b8-0faa3d9747b0n%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/CAKPY9pkAYcmio_U%2BAUPMcxzxbdT8QM1QPfPDftMgrj2NQvsJRQ%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAKPY9pkAYcmio_U%2BAUPMcxzxbdT8QM1QPfPDftMgrj2NQvsJRQ%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/CAAJ

Re: DRF | Django | Up votes | Down Votes

2021-06-25 Thread DJANGO DEVELOPER
Oba Thank you so much. and let me try it.
and one more thing that I want to ask that how can I calculate the up votes
and down votes at the same time? as Facebook likes and dislikes do. can you
guide me in this regard?

On Fri, Jun 25, 2021 at 11:15 AM oba stephen  wrote:

> Hi,
>
> One way would be to create an extra field to track the difference in both
> fields and then in your meta information on that model set the ordering to
> that field.
>
> Another approach which is better is to do something like this.
>
> Votes.objects.extra(select={'diff': 'upvote - downvote'}).order_by('diff')
>
>
> Best regards
>
> Stephen Oba
>
> On Fri, Jun 25, 2021, 6:03 AM DJANGO DEVELOPER 
> wrote:
>
>> Is there anyone who can help me here?
>>
>> On Thu, Jun 24, 2021 at 7:15 PM DJANGO DEVELOPER 
>> wrote:
>>
>>> Hi Django experts.
>>> I am building a Django, DRF based mobile app and I want to have
>>> functionality of up votes and down votes for posts that user will post.
>>> So what I want to say here that, if an user upvotes a post then it
>>> should be get higher ranks as quora questions do. and if there are more
>>> down votes than up votes then a post should be moved down ward rather than
>>> going up.
>>> I have applied a logic already here and shared the screenshots as well.
>>> but I am sure that there is a better logic or solution for this problem.
>>> Thanks in advance.
>>> Mr Mike and Mr Lalit can you guide me here please?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/c72fefe7-58d2-4c43-84b8-0faa3d9747b0n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/c72fefe7-58d2-4c43-84b8-0faa3d9747b0n%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/CAKPY9pkAYcmio_U%2BAUPMcxzxbdT8QM1QPfPDftMgrj2NQvsJRQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAKPY9pkAYcmio_U%2BAUPMcxzxbdT8QM1QPfPDftMgrj2NQvsJRQ%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/CAAJsLnras7ETsnRc5yj2F-S%3DMo5xfEMWDbVXPOvm08oQDxoFAg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAAJsLnras7ETsnRc5yj2F-S%3DMo5xfEMWDbVXPOvm08oQDxoFAg%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/CAKPY9pkYmP2xvW8FYRxBH8a55kURefFwrJGE59O-g%2Be8ktF%2B0g%40mail.gmail.com.


Re: DRF | Django | Up votes | Down Votes

2021-06-24 Thread DJANGO DEVELOPER
Is there anyone who can help me here?

On Thu, Jun 24, 2021 at 7:15 PM DJANGO DEVELOPER 
wrote:

> Hi Django experts.
> I am building a Django, DRF based mobile app and I want to have
> functionality of up votes and down votes for posts that user will post.
> So what I want to say here that, if an user upvotes a post then it should
> be get higher ranks as quora questions do. and if there are more down votes
> than up votes then a post should be moved down ward rather than going up.
> I have applied a logic already here and shared the screenshots as well.
> but I am sure that there is a better logic or solution for this problem.
> Thanks in advance.
> Mr Mike and Mr Lalit can you guide me here please?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c72fefe7-58d2-4c43-84b8-0faa3d9747b0n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/c72fefe7-58d2-4c43-84b8-0faa3d9747b0n%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/CAKPY9pkAYcmio_U%2BAUPMcxzxbdT8QM1QPfPDftMgrj2NQvsJRQ%40mail.gmail.com.


Re: Hi django

2021-06-24 Thread DJANGO DEVELOPER
muhammad haris salamat just make a form in your template, then have a
name='any name here' and then make a view in which you have to get the name
in the following way.
query = request.POST.get('any name here')
and then do this:
value = ModelName.objects.filter(Q(model_field = query)


On Thu, Jun 24, 2021 at 10:31 PM muhammad haris salamat <
harissalama...@gmail.com> wrote:

> Hi all can u help me plz how I can use filter with Contain query in Django
> I wanna fetch all data from my database with the help of filter query
>
> On Thu, 24 Jun 2021, 9:17 pm Richard Dushime, 
> wrote:
>
>> THANK U I HAVE DONE TO FIX IT ITS NOW WORKING
>>
>> On Thu, Jun 24, 2021 at 6:04 PM Julio Cojom 
>> wrote:
>>
>>> Django framework uses urls to math the html files. This work with the
>>> same syntax of static files, you would use {% url 'app:viewname' %} to
>>> render any page with Django.
>>>
>>> You should check the docs of urls to understand how it works and get
>>> this done.
>>>
>>> Regards
>>>
>>> El jue., 24 de junio de 2021 9:00 a. m., Richard Dushime <
>>> mudaherar...@gmail.com> escribió:
>>>
 i have a problem on my navigation bar on the index.html link when i
 click on it its showing me the error (see error.png)  or everything apart
 that its working fine  need ur help
 >>> "{% static 'assets/img/hero-logo.png' %}" alt="">
   
 >>> "{% static 'assets/img/logo.png' %}" alt="" class="img-fluid">
   

   
 
   Home
   About
 
   About Us
   Team
 
   
   Services

   >>> "{% static 'assets/img/logo.png' %}" alt="" class="img-fluid">

   Portfolio
   Pricing
   Contact

 
   


 --
 You received this message because you are subscribed to the Google
 Groups "Django users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to django-users+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/CAJCm56L%2BG%3D8tLZ%3D3sZ0%3Dh%3Ds-w5AXaLroU3nkgoKZO6Fj8xqFBw%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/CAHRQUHmOdq-yXfQdkDRcvjdf727U1Wr1HogjVpP1bw0o7rN61w%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/CAJCm56Jn1WOtp-hGbFoDS6uYy8A5ZSom7fD6j_UG%3D-oM4WQWng%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%2BOEwHsNuBGuH8fr3LoooK6K78F%2BZJb0OhBMxJcCuTG-K9Zkbw%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/CAKPY9pkHrO9HEPKsK15qfnKqFMkfvMR4EDqysB0MpJ2MJTKEEQ%40mail.gmail.com.


Re: Partner

2021-06-23 Thread DJANGO DEVELOPER
Hi Erick!
I am a python/Django developer and use it for many projects and I would
love to have a meeting with you to discuss the projects.
Regards:
Muhammad Abubakar

On Thu, Jun 24, 2021 at 4:12 AM Natalie Smyth 
wrote:

> Dear Erick,
>
> My name is Natalie, I am a full stack web developer and I would love to
> work with you on some projects!
>
> I love the Django framework, have used it a lot, and am very familiar with
> DRF and using restful routes in general.
>
> Best,
> Natalie
>
>
>
> On Wed, Jun 23, 2021 at 11:18 AM ...@gmail.com 
> wrote:
>
>> hello guys am looking for any one good at Django and DRF i have couple of
>> personal projects which needs this tech spec am not good at them if any one
>> is interested plz i will be grateful
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/b21836a0-1b17-4467-9b3c-5aba128e2c23n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/b21836a0-1b17-4467-9b3c-5aba128e2c23n%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/CAMFvn%2B1Y3WinwDa412csDfb%3DPn7E0WCyyZrq%3D71b3zgyi8n-9g%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAMFvn%2B1Y3WinwDa412csDfb%3DPn7E0WCyyZrq%3D71b3zgyi8n-9g%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/CAKPY9pm1YK45ShVuaqbTkZN8zciDNga%3DU9vP-ro%3DOzE0YyVM8A%40mail.gmail.com.


Re: How to insert into multiple tables cascading

2021-06-23 Thread DJANGO DEVELOPER
https://docs.djangoproject.com/en/3.2/topics/forms/modelforms/
read this official doc of django. all is written about modelformset and
inlineformset_factory.

On Thu, Jun 24, 2021 at 6:35 AM DJANGO DEVELOPER 
wrote:

> have you tried to implement the inlineformset_factory function within your
> views? if not then give a try to  inlineformset_factory. because through
> inlineformset_factory you can populate data of different models through a
> single form. for now it looks a solution to me.
>
> On Wed, Jun 23, 2021 at 6:35 PM David Crandell 
> wrote:
>
>> Sorry customer is inherited from these types
>>
>> class BaseInfo(models.Model):
>> contact1_first_name = models.CharField(help_text='Primary Contact First
>> name', max_length=50, default=None)
>> contact1_last_name = models.CharField(help_text='Primary Contact Last
>> name', max_length=50, default=None)
>> address1 = models.CharField(help_text='Address 1', max_length=50,
>> default=None)
>> address2 = models.CharField(help_text='Address 2', max_length=50,
>> default=None, blank=True)
>> city = models.CharField(help_text='City', max_length=50, default=None)
>> state = models.CharField(help_text='State', max_length=50, default=None)
>> zip_code = models.CharField(help_text='Postal/ZIP', max_length=20,
>> default=None)
>> phone = models.CharField(help_text='Phone', max_length=20, default=None)
>> email = models.EmailField(default=None)
>>
>>
>> class Prospects(BaseInfo):
>> associations = models.CharField(max_length=200, default=None, null=True,
>> blank=True)
>> company_name = models.CharField(help_text='Company Name', max_length=200,
>> default=None)
>> contact2_first_name = models.CharField(max_length=50, null=True,
>> blank=True)
>> contact2_last_name = models.CharField(max_length=50, null=True,
>> blank=True)
>> contact2_phone = models.CharField(help_text='Phone', max_length=20,
>> default=None, null=True, blank=True)
>> contact2_email = models.EmailField(default=None, null=True, blank=True)
>> fax = models.CharField(max_length=20, null=True, blank=True)
>> mobile = models.CharField(max_length=50, default=None, blank=True,
>> null=True)
>> web_address = models.CharField(max_length=50, null=True, blank=True)
>> date_entered = models.DateTimeField(auto_now_add=True)
>> is_active = models.BooleanField(default=True)
>> date_turned_off = models.DateTimeField(default=None, null=True,
>> blank=True)
>> notes = models.TextField(help_text='Notes', null=True, blank=True,
>> default=None)
>>
>> On Wednesday, June 23, 2021 at 8:34:07 AM UTC-5 David Crandell wrote:
>>
>>> Thank you for your reply.
>>>
>>> here are my models. Forms below.
>>>
>>> MODELS
>>>
>>> class Customers(Prospects):
>>> cust_id = models.IntegerField(default=0)
>>> vertical_cat = models.IntegerField(default=0)
>>> custom_cat = models.IntegerField(default=0)
>>> logo = models.ImageField(default='default.png',
>>> upload_to='media/cust-logos/')
>>> max_scripts = models.IntegerField(default=0)
>>> branch_custom_scripts = models.BooleanField(default=False)
>>> receive_emails = models.BooleanField(default=True)
>>> customer_rep_id = models.SmallIntegerField(default=0)
>>> customer_writer_id = models.SmallIntegerField(default=0)
>>> customer_male_vt_id = models.SmallIntegerField(default=0)
>>> customer_fem_vt = models.SmallIntegerField(default=0)
>>> customer_sales_rep = models.SmallIntegerField(default=0)
>>> contract_date_first = models.DateTimeField(default=None, null=True,
>>> blank=True)
>>> contract_date_renewal = models.DateTimeField(default=None, null=True,
>>> blank=True)
>>> contract_billing_type = models.CharField(max_length=200, null=True,
>>> blank=True)
>>> anniversary = models.DateTimeField(default=None, null=True, blank=True)
>>> is_on_contract = models.BooleanField(default=False)
>>> internal_flag = models.IntegerField(default=0)
>>> shuff_freq_pref = models.SmallIntegerField(default=0)
>>> shuff_freq_upd = models.DateTimeField(default=None, null=True,
>>> blank=True)
>>> shuff_freq_7 = models.BooleanField(default=True)
>>> shuff_freq_14 = models.BooleanField(default=True)
>>> shuff_freq_30 = models.BooleanField(default=True)
>>> shuff_freq_60 = models.BooleanField(default=True)
>>> shuff_freq_90 = models.BooleanField(default=True)
>>> shuff_freq_180 = models.BooleanField(default=False)
>>> shuff_walk_thru = models.DateTimeField(default

Re: How to insert into multiple tables cascading

2021-06-23 Thread DJANGO DEVELOPER
have you tried to implement the inlineformset_factory function within your
views? if not then give a try to  inlineformset_factory. because through
inlineformset_factory you can populate data of different models through a
single form. for now it looks a solution to me.

On Wed, Jun 23, 2021 at 6:35 PM David Crandell 
wrote:

> Sorry customer is inherited from these types
>
> class BaseInfo(models.Model):
> contact1_first_name = models.CharField(help_text='Primary Contact First
> name', max_length=50, default=None)
> contact1_last_name = models.CharField(help_text='Primary Contact Last
> name', max_length=50, default=None)
> address1 = models.CharField(help_text='Address 1', max_length=50,
> default=None)
> address2 = models.CharField(help_text='Address 2', max_length=50,
> default=None, blank=True)
> city = models.CharField(help_text='City', max_length=50, default=None)
> state = models.CharField(help_text='State', max_length=50, default=None)
> zip_code = models.CharField(help_text='Postal/ZIP', max_length=20,
> default=None)
> phone = models.CharField(help_text='Phone', max_length=20, default=None)
> email = models.EmailField(default=None)
>
>
> class Prospects(BaseInfo):
> associations = models.CharField(max_length=200, default=None, null=True,
> blank=True)
> company_name = models.CharField(help_text='Company Name', max_length=200,
> default=None)
> contact2_first_name = models.CharField(max_length=50, null=True,
> blank=True)
> contact2_last_name = models.CharField(max_length=50, null=True, blank=True)
> contact2_phone = models.CharField(help_text='Phone', max_length=20,
> default=None, null=True, blank=True)
> contact2_email = models.EmailField(default=None, null=True, blank=True)
> fax = models.CharField(max_length=20, null=True, blank=True)
> mobile = models.CharField(max_length=50, default=None, blank=True,
> null=True)
> web_address = models.CharField(max_length=50, null=True, blank=True)
> date_entered = models.DateTimeField(auto_now_add=True)
> is_active = models.BooleanField(default=True)
> date_turned_off = models.DateTimeField(default=None, null=True, blank=True)
> notes = models.TextField(help_text='Notes', null=True, blank=True,
> default=None)
>
> On Wednesday, June 23, 2021 at 8:34:07 AM UTC-5 David Crandell wrote:
>
>> Thank you for your reply.
>>
>> here are my models. Forms below.
>>
>> MODELS
>>
>> class Customers(Prospects):
>> cust_id = models.IntegerField(default=0)
>> vertical_cat = models.IntegerField(default=0)
>> custom_cat = models.IntegerField(default=0)
>> logo = models.ImageField(default='default.png',
>> upload_to='media/cust-logos/')
>> max_scripts = models.IntegerField(default=0)
>> branch_custom_scripts = models.BooleanField(default=False)
>> receive_emails = models.BooleanField(default=True)
>> customer_rep_id = models.SmallIntegerField(default=0)
>> customer_writer_id = models.SmallIntegerField(default=0)
>> customer_male_vt_id = models.SmallIntegerField(default=0)
>> customer_fem_vt = models.SmallIntegerField(default=0)
>> customer_sales_rep = models.SmallIntegerField(default=0)
>> contract_date_first = models.DateTimeField(default=None, null=True,
>> blank=True)
>> contract_date_renewal = models.DateTimeField(default=None, null=True,
>> blank=True)
>> contract_billing_type = models.CharField(max_length=200, null=True,
>> blank=True)
>> anniversary = models.DateTimeField(default=None, null=True, blank=True)
>> is_on_contract = models.BooleanField(default=False)
>> internal_flag = models.IntegerField(default=0)
>> shuff_freq_pref = models.SmallIntegerField(default=0)
>> shuff_freq_upd = models.DateTimeField(default=None, null=True, blank=True)
>> shuff_freq_7 = models.BooleanField(default=True)
>> shuff_freq_14 = models.BooleanField(default=True)
>> shuff_freq_30 = models.BooleanField(default=True)
>> shuff_freq_60 = models.BooleanField(default=True)
>> shuff_freq_90 = models.BooleanField(default=True)
>> shuff_freq_180 = models.BooleanField(default=False)
>> shuff_walk_thru = models.DateTimeField(default=None, null=True,
>> blank=True)
>> shuff_walk_thru_by = models.SmallIntegerField(models.ForeignKey(Emp,
>> on_delete=models.CASCADE), default=0)
>> cust_classification = models.ForeignKey(CustomerClasses,
>> on_delete=models.CASCADE)
>> date_updated = models.DateTimeField(auto_now=True, null=True, blank=True)
>> updated_by = models.SmallIntegerField(default=0)
>> audit_note = models.TextField(default=None, null=True, blank=True)
>> audit_exception = models.BooleanField(default=False)
>> audit_date = models.DateTimeField(auto_now_add=True)
>> script_exception = models.BooleanField(default=False)
>> script_exception_date = models.DateTimeField(default=None, null=True,
>> blank=True)
>> reports_exception = models.BooleanField(default=False)
>> reports_exception_date = models.DateTimeField(default=None, null=True,
>> blank=True)
>> using_script_credits = models.BooleanField(default=False)
>>
>> def __str__(self):
>> return self.company_name
>>
>> def 

Re: How to insert into multiple tables cascading

2021-06-22 Thread DJANGO DEVELOPER
please share your related models and form as well.

On Wed, Jun 23, 2021 at 1:22 AM David Crandell 
wrote:

> Hello, I come from a platform where I built out forms and then manually
> wrote insert statements from the form input entering all the data at once.
>
> What I want to do is enter a customer (one table), have it populate a
> master region with the same name (another table), then fill out a master
> location record (another table) and then create a user from the person
> profiled in the customer information (another table)
>
> I'm trying to go to the next page which is a location form and pass the
> value of the customer ID to the region form included on the same page.
>
>   There has to be a better way to do this. I still have no idea how to
> combine and enter information into multiple models from one form. The ORM
> is cool but it seems so limited. I guess I just don't understand it.
>
> class CustomerCreateView(View):
> template_name = 'ohnet/customer_form.html'
> form_class = CustomerForm
> rform = RegionWCust
>
> def get(self, request, *args, **kwargs):
> form = self.form_class
> rform = self.rform
> return render(request, self.template_name, {'form': form, 'rform': 
> rform})
>
> def post(self, request, *args, **kwargs):
> form = self.form_class(request.POST, request.FILES)
> rform = self.rform(request.POST)
> if form.is_valid() and rform.is_valid():
> form.save()
> obj = Customers.objects.latest('id')
> f = rform.save(commit=False)
> f.customer_id = obj
> f.save()
> messages.success(request, f'Customer entered successfully')
> return redirect('ohnet:custlocs-new', obj)
>
>
> David L. Crandell
> 469-585-5009
> g uitard...@outlook.com
> guitardave8...@gmail.com
> da...@onholdwizard.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/CAACv6dMBaATx9V%3D0t6qrZk2WPVtcVGCOvXwW-aHurzxGE9PB%3Dw%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/CAKPY9p%3DSPsGj1sMuY4dutV8Gau7H0qEztgRNbKVNzLFGxiK4pw%40mail.gmail.com.


Re: Help me Please - Django and python program

2021-06-22 Thread DJANGO DEVELOPER
+923012876771, you can send me your queries here.

On Wed, Jun 23, 2021 at 7:39 AM DJANGO DEVELOPER 
wrote:

> is it resolved now? or still want some help?
>
> On Tue, Jun 22, 2021 at 9:44 PM mayank sandikar <
> mayanksandikar191...@gmail.com> wrote:
>
>> Thank you sir, sorry for all the troubles.
>>
>> On Tue, Jun 22, 2021 at 4:41 PM DJANGO DEVELOPER 
>> wrote:
>>
>>> request.FILES used when we need to insert images as well. if there is no
>>> image field then remove the request.FILES.
>>>
>>> On Tue, Jun 22, 2021 at 4:10 PM DJANGO DEVELOPER <
>>> abubakarbr...@gmail.com> wrote:
>>>
>>>> follow this code's pattern but remember one thing that you have to
>>>> follow it according to your needs.
>>>>
>>>> On Tue, Jun 22, 2021 at 4:10 PM DJANGO DEVELOPER <
>>>> abubakarbr...@gmail.com> wrote:
>>>>
>>>>> def insetdata(request):
>>>>> product_form = your_product_form()
>>>>> if request.method == 'POST':
>>>>> product_form = your_product_form(request.POST, request.FILES)
>>>>> if product_form.is_valid:
>>>>> product_form.save()
>>>>> return redirect('put your product's url name value here')
>>>>> return render(request, 'your template path here',
>>>>> {'product':product_form})
>>>>>
>>>>> On Tue, Jun 22, 2021 at 3:59 PM mayank sandikar <
>>>>> mayanksandikar191...@gmail.com> wrote:
>>>>>
>>>>>> Thank you sir, the html problem is solved, but I don't know how to
>>>>>> insert itemname, quantity and rate in the database
>>>>>>
>>>>>> On Tue, Jun 22, 2021 at 4:15 PM DJANGO DEVELOPER <
>>>>>> abubakarbr...@gmail.com> wrote:
>>>>>>
>>>>>>> is your code working now?
>>>>>>>
>>>>>>> On Tue, Jun 22, 2021 at 3:32 PM DJANGO DEVELOPER <
>>>>>>> abubakarbr...@gmail.com> wrote:
>>>>>>>
>>>>>>>> First of all please remove the for loop from your form.
>>>>>>>> secondly please add{{displayemp.userquantity_field}}
>>>>>>>>   {{displayemp.amount_field}} 
>>>>>>>>
>>>>>>>> On Tue, Jun 22, 2021 at 3:27 PM mayank sandikar <
>>>>>>>> mayanksandikar191...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> view.py
>>>>>>>>> def displaydata(request):
>>>>>>>>>results = editupdaterecord.objects.all()
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>if request.method=='POST':
>>>>>>>>>  if request.POST.get('userquantity')  :
>>>>>>>>>  quantity = request.POST.get('userquantity')
>>>>>>>>>  a = editupdaterecord.objects.all()
>>>>>>>>>  print(a)
>>>>>>>>>#  if results in a < quantity:
>>>>>>>>>  saverecord = editupdaterecord(userquantity = quantity)
>>>>>>>>>  saverecord.save()
>>>>>>>>>
>>>>>>>>>return render(request , 'index.html' ,{"editupdaterecord"
>>>>>>>>> :results})
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Tue, Jun 22, 2021 at 3:55 PM mayank sandikar <
>>>>>>>>> mayanksandikar191...@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> my index.html is
>>>>>>>>>>
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>>  Edit 
>>>>>>>>>> 
>>>>>>>>>> .button {
>>>>>>>>>>   border: none;
>>>>>>>>>>   color: black;
>>>>>>>>>>   padding: 15px 32px;
>>>>>>>>>>   text-align: center;
>>>>>>>>>>   text-decoration: none;
>>>>>>>>>>   display: inline-block;
>>>>>>>>>>   font-size: 16px;
>>>>>>>>>>   margin:

Re: Help me Please - Django and python program

2021-06-22 Thread DJANGO DEVELOPER
is it resolved now? or still want some help?

On Tue, Jun 22, 2021 at 9:44 PM mayank sandikar <
mayanksandikar191...@gmail.com> wrote:

> Thank you sir, sorry for all the troubles.
>
> On Tue, Jun 22, 2021 at 4:41 PM DJANGO DEVELOPER 
> wrote:
>
>> request.FILES used when we need to insert images as well. if there is no
>> image field then remove the request.FILES.
>>
>> On Tue, Jun 22, 2021 at 4:10 PM DJANGO DEVELOPER 
>> wrote:
>>
>>> follow this code's pattern but remember one thing that you have to
>>> follow it according to your needs.
>>>
>>> On Tue, Jun 22, 2021 at 4:10 PM DJANGO DEVELOPER <
>>> abubakarbr...@gmail.com> wrote:
>>>
>>>> def insetdata(request):
>>>> product_form = your_product_form()
>>>> if request.method == 'POST':
>>>> product_form = your_product_form(request.POST, request.FILES)
>>>> if product_form.is_valid:
>>>> product_form.save()
>>>> return redirect('put your product's url name value here')
>>>> return render(request, 'your template path here',
>>>> {'product':product_form})
>>>>
>>>> On Tue, Jun 22, 2021 at 3:59 PM mayank sandikar <
>>>> mayanksandikar191...@gmail.com> wrote:
>>>>
>>>>> Thank you sir, the html problem is solved, but I don't know how to
>>>>> insert itemname, quantity and rate in the database
>>>>>
>>>>> On Tue, Jun 22, 2021 at 4:15 PM DJANGO DEVELOPER <
>>>>> abubakarbr...@gmail.com> wrote:
>>>>>
>>>>>> is your code working now?
>>>>>>
>>>>>> On Tue, Jun 22, 2021 at 3:32 PM DJANGO DEVELOPER <
>>>>>> abubakarbr...@gmail.com> wrote:
>>>>>>
>>>>>>> First of all please remove the for loop from your form.
>>>>>>> secondly please add{{displayemp.userquantity_field}}
>>>>>>>   {{displayemp.amount_field}} 
>>>>>>>
>>>>>>> On Tue, Jun 22, 2021 at 3:27 PM mayank sandikar <
>>>>>>> mayanksandikar191...@gmail.com> wrote:
>>>>>>>
>>>>>>>> view.py
>>>>>>>> def displaydata(request):
>>>>>>>>results = editupdaterecord.objects.all()
>>>>>>>>
>>>>>>>>
>>>>>>>>if request.method=='POST':
>>>>>>>>  if request.POST.get('userquantity')  :
>>>>>>>>  quantity = request.POST.get('userquantity')
>>>>>>>>  a = editupdaterecord.objects.all()
>>>>>>>>  print(a)
>>>>>>>>#  if results in a < quantity:
>>>>>>>>  saverecord = editupdaterecord(userquantity = quantity)
>>>>>>>>  saverecord.save()
>>>>>>>>
>>>>>>>>return render(request , 'index.html' ,{"editupdaterecord"
>>>>>>>> :results})
>>>>>>>>
>>>>>>>>
>>>>>>>> On Tue, Jun 22, 2021 at 3:55 PM mayank sandikar <
>>>>>>>> mayanksandikar191...@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> my index.html is
>>>>>>>>>
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>>  Edit 
>>>>>>>>> 
>>>>>>>>> .button {
>>>>>>>>>   border: none;
>>>>>>>>>   color: black;
>>>>>>>>>   padding: 15px 32px;
>>>>>>>>>   text-align: center;
>>>>>>>>>   text-decoration: none;
>>>>>>>>>   display: inline-block;
>>>>>>>>>   font-size: 16px;
>>>>>>>>>   margin: 4px 2px;
>>>>>>>>>   cursor: pointer;
>>>>>>>>>
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> .button2 {background-color: #008CBA;}
>>>>>>>>>
>>>>>>>>> 
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 
>>>>>>>>> 
>>>>>>

Re: Help me - Django and python

2021-06-22 Thread DJANGO DEVELOPER
have you removed for loop from your form?

On Tue, Jun 22, 2021 at 8:33 PM DJANGO DEVELOPER 
wrote:

> because it is necessary to write when there are no more conditions left.
>
> On Tue, Jun 22, 2021 at 6:31 PM avdesh sharma 
> wrote:
>
>> what will happen if I change from elif to else ?
>> FYI - I checked it but still getting same error.
>>
>> On Tue, Jun 22, 2021 at 2:51 PM DJANGO DEVELOPER 
>> wrote:
>>
>>> your index.html
>>>
>>> 
>>> PASSWORD
>>> >> class="form-control" name="password" placeholder="Enter Password">
>>> 
>>> 
>>> {% if login == 'inactive' %}
>>> User Inactive! Contact 
>>> Admin!
>>> {% elif login == 'invalid' %}
>>> line 32 username or password 
>>> Invalid
>>> {% endif%}
>>> {% if tab_error == True %}
>>> Invalid Tab Selected
>>> {% endif %}
>>>
>>>
>>>
>>> changed index.html
>>>
>>> 
>>> PASSWORD
>>> >> class="form-control" name="password" placeholder="Enter Password" 
>>> value="{{login.password_field}}">
>>> 
>>> 
>>> {% if login == 'inactive' %}
>>> User Inactive! Contact 
>>> Admin!
>>> {% else %}
>>> line 32 username or password 
>>> Invalid
>>> {% endif%}
>>> {% if tab_error == True %}
>>> Invalid Tab Selected
>>> {% endif %}
>>>
>>>
>>> On Tue, Jun 22, 2021 at 2:16 PM DJANGO DEVELOPER <
>>> abubakarbr...@gmail.com> wrote:
>>>
>>>> by seeing your code, it seems that only the 'else' part is working.
>>>> have you provided value='{{dict_key.model_password_field}} in your html
>>>> input element?
>>>>
>>>> On Tue, Jun 22, 2021 at 12:52 PM avdesh sharma <
>>>> avdeshsharma...@gmail.com> wrote:
>>>>
>>>>> Here is my View.py code
>>>>>
>>>>> from django.shortcuts import render
>>>>> from django.http import HttpResponseRedirect
>>>>> from django.urls import reverse
>>>>> from django.contrib.auth import authenticate, logout, login
>>>>> from django.contrib.auth.decorators import login_required
>>>>> from student.models import *
>>>>> from django.views.generic import TemplateView
>>>>> import datetime, random
>>>>> from django.contrib.auth.backends import BaseBackend
>>>>> # Create your views here.
>>>>>
>>>>>
>>>>> def index_view(request):
>>>>> if request.method == 'POST':
>>>>> username = request.POST.get('username')
>>>>> password = request.POST.get('password')
>>>>> tab_selected = request.POST.get('tab_selected')
>>>>>
>>>>> user = authenticate(username=username, password=password)
>>>>> print(user)
>>>>> if user:
>>>>> # if get_user(username):
>>>>> if user.is_active:
>>>>> login(request, user)
>>>>> request.session['username'] = username
>>>>> request.session['tab_selected'] = tab_selected
>>>>> if tab_selected == 'student_tab':
>>>>> return 
>>>>> HttpResponseRedirect(reverse('student:stud_home'))
>>>>> elif tab_selected == 'dept_tab':
>>>>> if username[:3] == 'hod':
>>>>> return 
>>>>> HttpResponseRedirect(reverse('student:hod_home'))
>>>>> else:
>>>>>     return 
>>>>> HttpResponseRedirect(reverse('student:dep_home'))
>>>>> elif tab_selected == 'office_tab':
>>>>> return 
>>>>> HttpResponseRedirect(reverse('student:off_home'))
>>>>> else:
>>>>> user_login = 'inactive'
>>>>> return render(request, 'student/index.html', 
>>>>> context={'login': user_login})
>>>>> else:
>>>>> user_login = 'invalid'
>>>>> return render(request, 'student/index.html', 
&g

Re: Help me - Django and python

2021-06-22 Thread DJANGO DEVELOPER
because it is necessary to write when there are no more conditions left.

On Tue, Jun 22, 2021 at 6:31 PM avdesh sharma 
wrote:

> what will happen if I change from elif to else ?
> FYI - I checked it but still getting same error.
>
> On Tue, Jun 22, 2021 at 2:51 PM DJANGO DEVELOPER 
> wrote:
>
>> your index.html
>>
>> 
>> PASSWORD
>> > class="form-control" name="password" placeholder="Enter Password">
>> 
>> 
>> {% if login == 'inactive' %}
>> User Inactive! Contact 
>> Admin!
>> {% elif login == 'invalid' %}
>> line 32 username or password 
>> Invalid
>> {% endif%}
>> {% if tab_error == True %}
>> Invalid Tab Selected
>> {% endif %}
>>
>>
>>
>> changed index.html
>>
>> 
>> PASSWORD
>> > class="form-control" name="password" placeholder="Enter Password" 
>> value="{{login.password_field}}">
>> 
>> 
>> {% if login == 'inactive' %}
>> User Inactive! Contact 
>> Admin!
>> {% else %}
>> line 32 username or password 
>> Invalid
>> {% endif%}
>> {% if tab_error == True %}
>> Invalid Tab Selected
>> {% endif %}
>>
>>
>> On Tue, Jun 22, 2021 at 2:16 PM DJANGO DEVELOPER 
>> wrote:
>>
>>> by seeing your code, it seems that only the 'else' part is working. have
>>> you provided value='{{dict_key.model_password_field}} in your html input
>>> element?
>>>
>>> On Tue, Jun 22, 2021 at 12:52 PM avdesh sharma <
>>> avdeshsharma...@gmail.com> wrote:
>>>
>>>> Here is my View.py code
>>>>
>>>> from django.shortcuts import render
>>>> from django.http import HttpResponseRedirect
>>>> from django.urls import reverse
>>>> from django.contrib.auth import authenticate, logout, login
>>>> from django.contrib.auth.decorators import login_required
>>>> from student.models import *
>>>> from django.views.generic import TemplateView
>>>> import datetime, random
>>>> from django.contrib.auth.backends import BaseBackend
>>>> # Create your views here.
>>>>
>>>>
>>>> def index_view(request):
>>>> if request.method == 'POST':
>>>> username = request.POST.get('username')
>>>> password = request.POST.get('password')
>>>> tab_selected = request.POST.get('tab_selected')
>>>>
>>>> user = authenticate(username=username, password=password)
>>>> print(user)
>>>> if user:
>>>> # if get_user(username):
>>>> if user.is_active:
>>>> login(request, user)
>>>> request.session['username'] = username
>>>> request.session['tab_selected'] = tab_selected
>>>> if tab_selected == 'student_tab':
>>>> return 
>>>> HttpResponseRedirect(reverse('student:stud_home'))
>>>> elif tab_selected == 'dept_tab':
>>>> if username[:3] == 'hod':
>>>> return 
>>>> HttpResponseRedirect(reverse('student:hod_home'))
>>>> else:
>>>> return 
>>>> HttpResponseRedirect(reverse('student:dep_home'))
>>>> elif tab_selected == 'office_tab':
>>>> return 
>>>> HttpResponseRedirect(reverse('student:off_home'))
>>>> else:
>>>> user_login = 'inactive'
>>>> return render(request, 'student/index.html', 
>>>> context={'login': user_login})
>>>> else:
>>>> user_login = 'invalid'
>>>> return render(request, 'student/index.html', context={'login': 
>>>> user_login})
>>>> else:
>>>> return render(request, 'student/index.html', context={})
>>>>
>>>>
>>>> index.html
>>>>
>>>> 
>>>> PASSWORD
>>>> >>> class="form-control" name="password" placeholder="Enter Password">
>>>> 
>>>> 
>>>> {% if login == 'inactive' %}
>>>> User Inactive! Contact 
>>>> Admin!
>>>> {% e

Re: Help me Please - Django and python program

2021-06-22 Thread DJANGO DEVELOPER
request.FILES used when we need to insert images as well. if there is no
image field then remove the request.FILES.

On Tue, Jun 22, 2021 at 4:10 PM DJANGO DEVELOPER 
wrote:

> follow this code's pattern but remember one thing that you have to follow
> it according to your needs.
>
> On Tue, Jun 22, 2021 at 4:10 PM DJANGO DEVELOPER 
> wrote:
>
>> def insetdata(request):
>> product_form = your_product_form()
>> if request.method == 'POST':
>> product_form = your_product_form(request.POST, request.FILES)
>> if product_form.is_valid:
>> product_form.save()
>> return redirect('put your product's url name value here')
>> return render(request, 'your template path here',
>> {'product':product_form})
>>
>> On Tue, Jun 22, 2021 at 3:59 PM mayank sandikar <
>> mayanksandikar191...@gmail.com> wrote:
>>
>>> Thank you sir, the html problem is solved, but I don't know how to
>>> insert itemname, quantity and rate in the database
>>>
>>> On Tue, Jun 22, 2021 at 4:15 PM DJANGO DEVELOPER <
>>> abubakarbr...@gmail.com> wrote:
>>>
>>>> is your code working now?
>>>>
>>>> On Tue, Jun 22, 2021 at 3:32 PM DJANGO DEVELOPER <
>>>> abubakarbr...@gmail.com> wrote:
>>>>
>>>>> First of all please remove the for loop from your form.
>>>>> secondly please add{{displayemp.userquantity_field}}
>>>>>   {{displayemp.amount_field}} 
>>>>>
>>>>> On Tue, Jun 22, 2021 at 3:27 PM mayank sandikar <
>>>>> mayanksandikar191...@gmail.com> wrote:
>>>>>
>>>>>> view.py
>>>>>> def displaydata(request):
>>>>>>results = editupdaterecord.objects.all()
>>>>>>
>>>>>>
>>>>>>if request.method=='POST':
>>>>>>  if request.POST.get('userquantity')  :
>>>>>>  quantity = request.POST.get('userquantity')
>>>>>>  a = editupdaterecord.objects.all()
>>>>>>  print(a)
>>>>>>#  if results in a < quantity:
>>>>>>  saverecord = editupdaterecord(userquantity = quantity)
>>>>>>  saverecord.save()
>>>>>>
>>>>>>return render(request , 'index.html' ,{"editupdaterecord"
>>>>>> :results})
>>>>>>
>>>>>>
>>>>>> On Tue, Jun 22, 2021 at 3:55 PM mayank sandikar <
>>>>>> mayanksandikar191...@gmail.com> wrote:
>>>>>>
>>>>>>> my index.html is
>>>>>>>
>>>>>>> 
>>>>>>> 
>>>>>>>  Edit 
>>>>>>> 
>>>>>>> .button {
>>>>>>>   border: none;
>>>>>>>   color: black;
>>>>>>>   padding: 15px 32px;
>>>>>>>   text-align: center;
>>>>>>>   text-decoration: none;
>>>>>>>   display: inline-block;
>>>>>>>   font-size: 16px;
>>>>>>>   margin: 4px 2px;
>>>>>>>   cursor: pointer;
>>>>>>>
>>>>>>> }
>>>>>>>
>>>>>>> .button2 {background-color: #008CBA;}
>>>>>>>
>>>>>>> 
>>>>>>>
>>>>>>>
>>>>>>> 
>>>>>>> 
>>>>>>>
>>>>>>>
>>>>>>> 
>>>>>>>  
>>>>>>> 
>>>>>>> 
>>>>>>>   
>>>>>>> ID
>>>>>>> Itemname
>>>>>>> Quantity
>>>>>>>
>>>>>>>  rate
>>>>>>>   amount
>>>>>>>   
>>>>>>>
>>>>>>>   {% for displayemp in editupdaterecord%}
>>>>>>>   
>>>>>>>   {{displayemp.id}}
>>>>>>>   {{displayemp.Itemname}}
>>>>>>>   {{displayemp.quantity}} 
>>>>>>>{{displayemp.rate}} 
>>>>>>>   {{displayemp.basicamount}} 
>>>>>>&g

Re: Help me Please - Django and python program

2021-06-22 Thread DJANGO DEVELOPER
follow this code's pattern but remember one thing that you have to follow
it according to your needs.

On Tue, Jun 22, 2021 at 4:10 PM DJANGO DEVELOPER 
wrote:

> def insetdata(request):
> product_form = your_product_form()
> if request.method == 'POST':
> product_form = your_product_form(request.POST, request.FILES)
> if product_form.is_valid:
> product_form.save()
> return redirect('put your product's url name value here')
> return render(request, 'your template path here',
> {'product':product_form})
>
> On Tue, Jun 22, 2021 at 3:59 PM mayank sandikar <
> mayanksandikar191...@gmail.com> wrote:
>
>> Thank you sir, the html problem is solved, but I don't know how to insert
>> itemname, quantity and rate in the database
>>
>> On Tue, Jun 22, 2021 at 4:15 PM DJANGO DEVELOPER 
>> wrote:
>>
>>> is your code working now?
>>>
>>> On Tue, Jun 22, 2021 at 3:32 PM DJANGO DEVELOPER <
>>> abubakarbr...@gmail.com> wrote:
>>>
>>>> First of all please remove the for loop from your form.
>>>> secondly please add{{displayemp.userquantity_field}}
>>>>   {{displayemp.amount_field}} 
>>>>
>>>> On Tue, Jun 22, 2021 at 3:27 PM mayank sandikar <
>>>> mayanksandikar191...@gmail.com> wrote:
>>>>
>>>>> view.py
>>>>> def displaydata(request):
>>>>>results = editupdaterecord.objects.all()
>>>>>
>>>>>
>>>>>if request.method=='POST':
>>>>>  if request.POST.get('userquantity')  :
>>>>>  quantity = request.POST.get('userquantity')
>>>>>  a = editupdaterecord.objects.all()
>>>>>  print(a)
>>>>>#  if results in a < quantity:
>>>>>  saverecord = editupdaterecord(userquantity = quantity)
>>>>>  saverecord.save()
>>>>>
>>>>>return render(request , 'index.html' ,{"editupdaterecord":results})
>>>>>
>>>>>
>>>>> On Tue, Jun 22, 2021 at 3:55 PM mayank sandikar <
>>>>> mayanksandikar191...@gmail.com> wrote:
>>>>>
>>>>>> my index.html is
>>>>>>
>>>>>> 
>>>>>> 
>>>>>>  Edit 
>>>>>> 
>>>>>> .button {
>>>>>>   border: none;
>>>>>>   color: black;
>>>>>>   padding: 15px 32px;
>>>>>>   text-align: center;
>>>>>>   text-decoration: none;
>>>>>>   display: inline-block;
>>>>>>   font-size: 16px;
>>>>>>   margin: 4px 2px;
>>>>>>   cursor: pointer;
>>>>>>
>>>>>> }
>>>>>>
>>>>>> .button2 {background-color: #008CBA;}
>>>>>>
>>>>>> 
>>>>>>
>>>>>>
>>>>>> 
>>>>>> 
>>>>>>
>>>>>>
>>>>>> 
>>>>>>  
>>>>>> 
>>>>>> 
>>>>>>   
>>>>>> ID
>>>>>> Itemname
>>>>>> Quantity
>>>>>>
>>>>>>  rate
>>>>>>   amount
>>>>>>   
>>>>>>
>>>>>>   {% for displayemp in editupdaterecord%}
>>>>>>   
>>>>>>   {{displayemp.id}}
>>>>>>   {{displayemp.Itemname}}
>>>>>>   {{displayemp.quantity}} 
>>>>>>{{displayemp.rate}} 
>>>>>>   {{displayemp.basicamount}} 
>>>>>>
>>>>>>   
>>>>>>{% endfor %}
>>>>>>
>>>>>>
>>>>>>   
>>>>>>  {% csrf_token %}
>>>>>>
>>>>>> 
>>>>>>   
>>>>>> ID
>>>>>> Itemname
>>>>>> Quantity
>>>>>>
>>>>>> userquantity
>>>>>> amount
>>>>>>   
>>>>>>
>>>&

Re: Help me Please - Django and python program

2021-06-22 Thread DJANGO DEVELOPER
def insetdata(request):
product_form = your_product_form()
if request.method == 'POST':
product_form = your_product_form(request.POST, request.FILES)
if product_form.is_valid:
product_form.save()
return redirect('put your product's url name value here')
return render(request, 'your template path here',
{'product':product_form})

On Tue, Jun 22, 2021 at 3:59 PM mayank sandikar <
mayanksandikar191...@gmail.com> wrote:

> Thank you sir, the html problem is solved, but I don't know how to insert
> itemname, quantity and rate in the database
>
> On Tue, Jun 22, 2021 at 4:15 PM DJANGO DEVELOPER 
> wrote:
>
>> is your code working now?
>>
>> On Tue, Jun 22, 2021 at 3:32 PM DJANGO DEVELOPER 
>> wrote:
>>
>>> First of all please remove the for loop from your form.
>>> secondly please add{{displayemp.userquantity_field}}
>>>   {{displayemp.amount_field}} 
>>>
>>> On Tue, Jun 22, 2021 at 3:27 PM mayank sandikar <
>>> mayanksandikar191...@gmail.com> wrote:
>>>
>>>> view.py
>>>> def displaydata(request):
>>>>results = editupdaterecord.objects.all()
>>>>
>>>>
>>>>if request.method=='POST':
>>>>  if request.POST.get('userquantity')  :
>>>>  quantity = request.POST.get('userquantity')
>>>>  a = editupdaterecord.objects.all()
>>>>  print(a)
>>>>#  if results in a < quantity:
>>>>  saverecord = editupdaterecord(userquantity = quantity)
>>>>  saverecord.save()
>>>>
>>>>return render(request , 'index.html' ,{"editupdaterecord":results})
>>>>
>>>>
>>>> On Tue, Jun 22, 2021 at 3:55 PM mayank sandikar <
>>>> mayanksandikar191...@gmail.com> wrote:
>>>>
>>>>> my index.html is
>>>>>
>>>>> 
>>>>> 
>>>>>  Edit 
>>>>> 
>>>>> .button {
>>>>>   border: none;
>>>>>   color: black;
>>>>>   padding: 15px 32px;
>>>>>   text-align: center;
>>>>>   text-decoration: none;
>>>>>   display: inline-block;
>>>>>   font-size: 16px;
>>>>>   margin: 4px 2px;
>>>>>   cursor: pointer;
>>>>>
>>>>> }
>>>>>
>>>>> .button2 {background-color: #008CBA;}
>>>>>
>>>>> 
>>>>>
>>>>>
>>>>> 
>>>>> 
>>>>>
>>>>>
>>>>> 
>>>>>  
>>>>> 
>>>>> 
>>>>>   
>>>>> ID
>>>>> Itemname
>>>>> Quantity
>>>>>
>>>>>  rate
>>>>>   amount
>>>>>   
>>>>>
>>>>>   {% for displayemp in editupdaterecord%}
>>>>>   
>>>>>   {{displayemp.id}}
>>>>>   {{displayemp.Itemname}}
>>>>>   {{displayemp.quantity}} 
>>>>>{{displayemp.rate}} 
>>>>>   {{displayemp.basicamount}} 
>>>>>
>>>>>   
>>>>>{% endfor %}
>>>>>
>>>>>
>>>>>   
>>>>>  {% csrf_token %}
>>>>>
>>>>> 
>>>>>   
>>>>> ID
>>>>> Itemname
>>>>> Quantity
>>>>>
>>>>> userquantity
>>>>> amount
>>>>>   
>>>>>
>>>>>   {% for displayemp in editupdaterecord%}
>>>>>   
>>>>>   {{displayemp.id}}
>>>>>   {{displayemp.Itemname}}
>>>>>   {{displayemp.quantity}} 
>>>>>
>>>>>
>>>>>   
>>>>>
>>>>>{% csrf_token %}
>>>>>   >>>> ="{{editupdaterecord.userquantity}}"   >
>>>>>{{displayemp.amount2}} 
>>>>>   
>>>>>{% endfor %}
>>>>>
>>>

Re: Help me Please - Django and python program

2021-06-22 Thread DJANGO DEVELOPER
is your code working now?

On Tue, Jun 22, 2021 at 3:32 PM DJANGO DEVELOPER 
wrote:

> First of all please remove the for loop from your form.
> secondly please add{{displayemp.userquantity_field}}
>   {{displayemp.amount_field}} 
>
> On Tue, Jun 22, 2021 at 3:27 PM mayank sandikar <
> mayanksandikar191...@gmail.com> wrote:
>
>> view.py
>> def displaydata(request):
>>results = editupdaterecord.objects.all()
>>
>>
>>if request.method=='POST':
>>  if request.POST.get('userquantity')  :
>>  quantity = request.POST.get('userquantity')
>>  a = editupdaterecord.objects.all()
>>  print(a)
>>#  if results in a < quantity:
>>  saverecord = editupdaterecord(userquantity = quantity)
>>  saverecord.save()
>>
>>return render(request , 'index.html' ,{"editupdaterecord":results})
>>
>>
>> On Tue, Jun 22, 2021 at 3:55 PM mayank sandikar <
>> mayanksandikar191...@gmail.com> wrote:
>>
>>> my index.html is
>>>
>>> 
>>> 
>>>  Edit 
>>> 
>>> .button {
>>>   border: none;
>>>   color: black;
>>>   padding: 15px 32px;
>>>   text-align: center;
>>>   text-decoration: none;
>>>   display: inline-block;
>>>   font-size: 16px;
>>>   margin: 4px 2px;
>>>   cursor: pointer;
>>>
>>> }
>>>
>>> .button2 {background-color: #008CBA;}
>>>
>>> 
>>>
>>>
>>> 
>>> 
>>>
>>>
>>> 
>>>  
>>> 
>>> 
>>>   
>>> ID
>>> Itemname
>>> Quantity
>>>
>>>  rate
>>>   amount
>>>   
>>>
>>>   {% for displayemp in editupdaterecord%}
>>>   
>>>   {{displayemp.id}}
>>>   {{displayemp.Itemname}}
>>>   {{displayemp.quantity}} 
>>>{{displayemp.rate}} 
>>>   {{displayemp.basicamount}} 
>>>
>>>   
>>>{% endfor %}
>>>
>>>
>>>   
>>>  {% csrf_token %}
>>>
>>> 
>>>   
>>> ID
>>> Itemname
>>> Quantity
>>>
>>> userquantity
>>> amount
>>>   
>>>
>>>   {% for displayemp in editupdaterecord%}
>>>   
>>>   {{displayemp.id}}
>>>   {{displayemp.Itemname}}
>>>   {{displayemp.quantity}} 
>>>
>>>
>>>   
>>>
>>>{% csrf_token %}
>>>   
>>>{{displayemp.amount2}} 
>>>   
>>>{% endfor %}
>>>
>>>
>>>
>>> 
>>>
>>> Add
>>>
>>>
>>> 
>>> 
>>> 
>>>
>>>
>>>
>>>
>>> On Tue, Jun 22, 2021 at 3:49 PM mayank sandikar <
>>> mayanksandikar191...@gmail.com> wrote:
>>>
>>>> Hello sir,
>>>> I'm trying to insert the data in the table. For example in database
>>>> Itemname quantity price user-quantity amount
>>>> pen20  5   00
>>>> book  20 10  00
>>>>
>>>> in my database I'm getting this result
>>>> pen20  5   00
>>>> book  20 10  00
>>>>  20
>>>>
>>>> I want to take the itemname, quantity, and price in the last row as
>>>> well.
>>>> In my html front view (screenshot 50) only the last text box is active
>>>> in the user quantity column.
>>>>
>>>> please help me.
>>>> thank you
>>>>
>>>>
>>>>
>>>> On Tue, Jun 22, 2021 at 2:58 PM DJANGO DEVELOPER <
>>>> abubakarbr...@gmail.com> wrote:
>>>>
>>>>> according to your code, you're trying to update the product record.
>>>>> right?
>>>>> If so, then you're doing thin

Re: Help me Please - Django and python program

2021-06-22 Thread DJANGO DEVELOPER


 Edit 

.button {
  border: none;
  color: black;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;

}

.button2 {background-color: #008CBA;}









 


  
ID
Itemname
Quantity

 rate
  amount
  

  {% for displayemp in editupdaterecord%}
  
  {{displayemp.id}}
  {{displayemp.Itemname}}
  {{displayemp.quantity}} 
   {{displayemp.rate}} 
  {{displayemp.basicamount}} 

  
   {% endfor %}
   

  
 {% csrf_token %}


  
ID
Itemname
Quantity

userquantity
amount
  


  
  {{editupdaterecord.id}}
  {{editupdaterecord.Itemname}}
  {{editupdaterecord.quantity}} 
{{editupdaterecord.yourquantity}} 
 {{editupdaterecord.youramount}} 

  

   {% csrf_token %}
  
   {{displayemp.amount2}} 
  
   {% endfor %}


   


Add






On Tue, Jun 22, 2021 at 3:32 PM DJANGO DEVELOPER 
wrote:

> First of all please remove the for loop from your form.
> secondly please add{{displayemp.userquantity_field}}
>   {{displayemp.amount_field}} 
>
> On Tue, Jun 22, 2021 at 3:27 PM mayank sandikar <
> mayanksandikar191...@gmail.com> wrote:
>
>> view.py
>> def displaydata(request):
>>results = editupdaterecord.objects.all()
>>
>>
>>if request.method=='POST':
>>  if request.POST.get('userquantity')  :
>>  quantity = request.POST.get('userquantity')
>>  a = editupdaterecord.objects.all()
>>  print(a)
>>#  if results in a < quantity:
>>  saverecord = editupdaterecord(userquantity = quantity)
>>  saverecord.save()
>>
>>return render(request , 'index.html' ,{"editupdaterecord":results})
>>
>>
>> On Tue, Jun 22, 2021 at 3:55 PM mayank sandikar <
>> mayanksandikar191...@gmail.com> wrote:
>>
>>> my index.html is
>>>
>>> 
>>> 
>>>  Edit 
>>> 
>>> .button {
>>>   border: none;
>>>   color: black;
>>>   padding: 15px 32px;
>>>   text-align: center;
>>>   text-decoration: none;
>>>   display: inline-block;
>>>   font-size: 16px;
>>>   margin: 4px 2px;
>>>   cursor: pointer;
>>>
>>> }
>>>
>>> .button2 {background-color: #008CBA;}
>>>
>>> 
>>>
>>>
>>> 
>>> 
>>>
>>>
>>> 
>>>  
>>> 
>>> 
>>>   
>>> ID
>>> Itemname
>>> Quantity
>>>
>>>  rate
>>>   amount
>>>   
>>>
>>>   {% for displayemp in editupdaterecord%}
>>>   
>>>   {{displayemp.id}}
>>>   {{displayemp.Itemname}}
>>>   {{displayemp.quantity}} 
>>>{{displayemp.rate}} 
>>>   {{displayemp.basicamount}} 
>>>
>>>   
>>>{% endfor %}
>>>
>>>
>>>   
>>>  {% csrf_token %}
>>>
>>> 
>>>   
>>> ID
>>> Itemname
>>> Quantity
>>>
>>> userquantity
>>> amount
>>>   
>>>
>>>   {% for displayemp in editupdaterecord%}
>>>   
>>>   {{displayemp.id}}
>>>   {{displayemp.Itemname}}
>>>   {{displayemp.quantity}} 
>>>
>>>
>>>   
>>>
>>>{% csrf_token %}
>>>   
>>>{{displayemp.amount2}} 
>>>   
>>>{% endfor %}
>>>
>>>
>>>
>>> 
>>>
>>> Add
>>>
>>>
>>> 
>>> 
>>> 
>>>
>>>
>>>
>>>
>>> On Tue, Jun 22, 2021 at 3:49 PM mayank sandikar <
>>> mayanksandikar191...@gmail.com> wrote:
>>>
>>>> Hello sir,
>>>> I'm trying to insert the data in the table. For example in database
>&

Re: Help me Please - Django and python program

2021-06-22 Thread DJANGO DEVELOPER
First of all please remove the for loop from your form.
secondly please add{{displayemp.userquantity_field}}
  {{displayemp.amount_field}} 

On Tue, Jun 22, 2021 at 3:27 PM mayank sandikar <
mayanksandikar191...@gmail.com> wrote:

> view.py
> def displaydata(request):
>results = editupdaterecord.objects.all()
>
>
>if request.method=='POST':
>  if request.POST.get('userquantity')  :
>  quantity = request.POST.get('userquantity')
>  a = editupdaterecord.objects.all()
>  print(a)
>#  if results in a < quantity:
>  saverecord = editupdaterecord(userquantity = quantity)
>  saverecord.save()
>
>return render(request , 'index.html' ,{"editupdaterecord":results})
>
>
> On Tue, Jun 22, 2021 at 3:55 PM mayank sandikar <
> mayanksandikar191...@gmail.com> wrote:
>
>> my index.html is
>>
>> 
>> 
>>  Edit 
>> 
>> .button {
>>   border: none;
>>   color: black;
>>   padding: 15px 32px;
>>   text-align: center;
>>   text-decoration: none;
>>   display: inline-block;
>>   font-size: 16px;
>>   margin: 4px 2px;
>>   cursor: pointer;
>>
>> }
>>
>> .button2 {background-color: #008CBA;}
>>
>> 
>>
>>
>> 
>> 
>>
>>
>> 
>>  
>> 
>> 
>>   
>> ID
>> Itemname
>> Quantity
>>
>>  rate
>>   amount
>>   
>>
>>   {% for displayemp in editupdaterecord%}
>>   
>>   {{displayemp.id}}
>>   {{displayemp.Itemname}}
>>   {{displayemp.quantity}} 
>>{{displayemp.rate}} 
>>   {{displayemp.basicamount}} 
>>
>>   
>>{% endfor %}
>>
>>
>>   
>>  {% csrf_token %}
>>
>> 
>>   
>> ID
>> Itemname
>> Quantity
>>
>> userquantity
>> amount
>>   
>>
>>   {% for displayemp in editupdaterecord%}
>>   
>>   {{displayemp.id}}
>>   {{displayemp.Itemname}}
>>   {{displayemp.quantity}} 
>>
>>
>>   
>>
>>{% csrf_token %}
>>   
>>{{displayemp.amount2}} 
>>   
>>{% endfor %}
>>
>>
>>
>> 
>>
>> Add
>>
>>
>> 
>> 
>> 
>>
>>
>>
>>
>> On Tue, Jun 22, 2021 at 3:49 PM mayank sandikar <
>> mayanksandikar191...@gmail.com> wrote:
>>
>>> Hello sir,
>>> I'm trying to insert the data in the table. For example in database
>>> Itemname quantity price user-quantity amount
>>> pen20  5   00
>>> book  20 10  00
>>>
>>> in my database I'm getting this result
>>> pen20  5   00
>>> book  20 10  00
>>>  20
>>>
>>> I want to take the itemname, quantity, and price in the last row as well.
>>> In my html front view (screenshot 50) only the last text box is active
>>> in the user quantity column.
>>>
>>> please help me.
>>> thank you
>>>
>>>
>>>
>>> On Tue, Jun 22, 2021 at 2:58 PM DJANGO DEVELOPER <
>>> abubakarbr...@gmail.com> wrote:
>>>
>>>> according to your code, you're trying to update the product record.
>>>> right?
>>>> If so, then you're doing things the right way.
>>>>
>>>> On Tue, Jun 22, 2021 at 9:50 AM mayank sandikar <
>>>> mayanksandikar191...@gmail.com> wrote:
>>>>
>>>>> hello , sir your mobile no. is not on whatsapp. please assist me
>>>>> with  this
>>>>>
>>>>> On Mon, Jun 21, 2021 at 10:09 PM Onyemordi Daniel <
>>>>> onyemordidan...@gmail.com> wrote:
>>>>>
>>>>>> 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 s

Re: Help me Please - Django and python program

2021-06-22 Thread DJANGO DEVELOPER
according to your code, you're trying to update the product record. right?
If so, then you're doing things the right way.

On Tue, Jun 22, 2021 at 9:50 AM mayank sandikar <
mayanksandikar191...@gmail.com> wrote:

> hello , sir your mobile no. is not on whatsapp. please assist me  with
> this
>
> On Mon, Jun 21, 2021 at 10:09 PM Onyemordi Daniel <
> onyemordidan...@gmail.com> wrote:
>
>> 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, <
>> mayanksandikar191...@gmail.com> 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
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAOS5mPxJXuV8vBvtFMYGkiiGqm5%3DZxhyuFBaxF_Q2COhZYWnBw%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/CAKPY9pmTCn0i63Yb3VLfjpuK6aqyvkg4o2TGKv_rzGwOLiwh3A%40mail.gmail.com.


Re: Help me - Django and python

2021-06-22 Thread DJANGO DEVELOPER
your index.html


PASSWORD



{% if login == 'inactive' %}
User Inactive! Contact Admin!
{% elif login == 'invalid' %}
line 32 username or
password Invalid
{% endif%}
{% if tab_error == True %}
Invalid Tab Selected
{% endif %}



changed index.html


PASSWORD



{% if login == 'inactive' %}
User Inactive! Contact Admin!
{% else %}
line 32 username or
password Invalid
{% endif%}
{% if tab_error == True %}
Invalid Tab Selected
{% endif %}


On Tue, Jun 22, 2021 at 2:16 PM DJANGO DEVELOPER 
wrote:

> by seeing your code, it seems that only the 'else' part is working. have
> you provided value='{{dict_key.model_password_field}} in your html input
> element?
>
> On Tue, Jun 22, 2021 at 12:52 PM avdesh sharma 
> wrote:
>
>> Here is my View.py code
>>
>> from django.shortcuts import render
>> from django.http import HttpResponseRedirect
>> from django.urls import reverse
>> from django.contrib.auth import authenticate, logout, login
>> from django.contrib.auth.decorators import login_required
>> from student.models import *
>> from django.views.generic import TemplateView
>> import datetime, random
>> from django.contrib.auth.backends import BaseBackend
>> # Create your views here.
>>
>>
>> def index_view(request):
>> if request.method == 'POST':
>> username = request.POST.get('username')
>> password = request.POST.get('password')
>> tab_selected = request.POST.get('tab_selected')
>>
>> user = authenticate(username=username, password=password)
>> print(user)
>> if user:
>> # if get_user(username):
>> if user.is_active:
>> login(request, user)
>> request.session['username'] = username
>> request.session['tab_selected'] = tab_selected
>> if tab_selected == 'student_tab':
>> return HttpResponseRedirect(reverse('student:stud_home'))
>> elif tab_selected == 'dept_tab':
>> if username[:3] == 'hod':
>> return 
>> HttpResponseRedirect(reverse('student:hod_home'))
>> else:
>> return 
>> HttpResponseRedirect(reverse('student:dep_home'))
>> elif tab_selected == 'office_tab':
>> return HttpResponseRedirect(reverse('student:off_home'))
>> else:
>> user_login = 'inactive'
>> return render(request, 'student/index.html', 
>> context={'login': user_login})
>> else:
>> user_login = 'invalid'
>> return render(request, 'student/index.html', context={'login': 
>> user_login})
>> else:
>> return render(request, 'student/index.html', context={})
>>
>>
>> index.html
>>
>> 
>> PASSWORD
>> > class="form-control" name="password" placeholder="Enter Password">
>> 
>> 
>> {% if login == 'inactive' %}
>> User Inactive! Contact 
>> Admin!
>> {% elif login == 'invalid' %}
>> line 32 username or password 
>> Invalid
>> {% endif%}
>> {% if tab_error == True %}
>> Invalid Tab Selected
>> {% endif %}
>> 
>>
>>
>> On Tue, Jun 22, 2021 at 11:55 AM DJANGO DEVELOPER <
>> abubakarbr...@gmail.com> wrote:
>>
>>> can you please share your login view code?
>>>
>>> On Tue, Jun 22, 2021 at 10:12 AM avdesh sharma <
>>> avdeshsharma...@gmail.com> wrote:
>>>
>>>> Hi All,
>>>>
>>>> I have an issue coming in my django code, even though the user id and
>>>> password is present in sqlite3 db still  the user is giving '*None'*
>>>> value
>>>> user = authenticate(username=username, password=password)
>>>>
>>>> and I am not able to login with user and throwing this error.
>>>>
>>>> [image: image.png]
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Warm Regards,
>>>> Avdesh Kumar Sharma
>>>> 9650031844
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Django users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to django-users+unsubscr...@googlegroups.com.
>>>> To view this discussion o

Re: Help me - Django and python

2021-06-22 Thread DJANGO DEVELOPER
by seeing your code, it seems that only the 'else' part is working. have
you provided value='{{dict_key.model_password_field}} in your html input
element?

On Tue, Jun 22, 2021 at 12:52 PM avdesh sharma 
wrote:

> Here is my View.py code
>
> from django.shortcuts import render
> from django.http import HttpResponseRedirect
> from django.urls import reverse
> from django.contrib.auth import authenticate, logout, login
> from django.contrib.auth.decorators import login_required
> from student.models import *
> from django.views.generic import TemplateView
> import datetime, random
> from django.contrib.auth.backends import BaseBackend
> # Create your views here.
>
>
> def index_view(request):
> if request.method == 'POST':
> username = request.POST.get('username')
> password = request.POST.get('password')
> tab_selected = request.POST.get('tab_selected')
>
> user = authenticate(username=username, password=password)
> print(user)
> if user:
> # if get_user(username):
> if user.is_active:
> login(request, user)
> request.session['username'] = username
> request.session['tab_selected'] = tab_selected
> if tab_selected == 'student_tab':
> return HttpResponseRedirect(reverse('student:stud_home'))
> elif tab_selected == 'dept_tab':
> if username[:3] == 'hod':
> return 
> HttpResponseRedirect(reverse('student:hod_home'))
> else:
> return 
> HttpResponseRedirect(reverse('student:dep_home'))
> elif tab_selected == 'office_tab':
> return HttpResponseRedirect(reverse('student:off_home'))
> else:
> user_login = 'inactive'
> return render(request, 'student/index.html', 
> context={'login': user_login})
> else:
> user_login = 'invalid'
> return render(request, 'student/index.html', context={'login': 
> user_login})
> else:
> return render(request, 'student/index.html', context={})
>
>
> index.html
>
> 
> PASSWORD
>  class="form-control" name="password" placeholder="Enter Password">
> 
> 
> {% if login == 'inactive' %}
> User Inactive! Contact 
> Admin!
> {% elif login == 'invalid' %}
> line 32 username or password 
> Invalid
> {% endif%}
> {% if tab_error == True %}
> Invalid Tab Selected
> {% endif %}
> 
>
>
> On Tue, Jun 22, 2021 at 11:55 AM DJANGO DEVELOPER 
> wrote:
>
>> can you please share your login view code?
>>
>> On Tue, Jun 22, 2021 at 10:12 AM avdesh sharma 
>> wrote:
>>
>>> Hi All,
>>>
>>> I have an issue coming in my django code, even though the user id and
>>> password is present in sqlite3 db still  the user is giving '*None'*
>>> value
>>> user = authenticate(username=username, password=password)
>>>
>>> and I am not able to login with user and throwing this error.
>>>
>>> [image: image.png]
>>>
>>>
>>>
>>>
>>> --
>>> Warm Regards,
>>> Avdesh Kumar Sharma
>>> 9650031844
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAF5Nfo65s-8c75FRkhF0rN7Sh0aUH6eKNBbQ--OMawNPCVX13w%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAF5Nfo65s-8c75FRkhF0rN7Sh0aUH6eKNBbQ--OMawNPCVX13w%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/CAKPY9p%3DSQDqv12b8K52FuG9mp40SM9sLFAQ4meaPM37NJxM4zQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAKPY9p%3DSQDqv12b8K52FuG9mp40SM9sLFAQ4meaPM37NJxM4zQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>
>
> --
> Warm Regards,
> Avdesh Kumar Sharma
> 9650031844
>

Re: Help me - Django and python

2021-06-22 Thread DJANGO DEVELOPER
I think you're not returning anything in your model.

On Tue, Jun 22, 2021 at 11:24 AM DJANGO DEVELOPER 
wrote:

> can you please share your login view code?
>
> On Tue, Jun 22, 2021 at 10:12 AM avdesh sharma 
> wrote:
>
>> Hi All,
>>
>> I have an issue coming in my django code, even though the user id and
>> password is present in sqlite3 db still  the user is giving '*None'*
>> value
>> user = authenticate(username=username, password=password)
>>
>> and I am not able to login with user and throwing this error.
>>
>> [image: image.png]
>>
>>
>>
>>
>> --
>> Warm Regards,
>> Avdesh Kumar Sharma
>> 9650031844
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAF5Nfo65s-8c75FRkhF0rN7Sh0aUH6eKNBbQ--OMawNPCVX13w%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAF5Nfo65s-8c75FRkhF0rN7Sh0aUH6eKNBbQ--OMawNPCVX13w%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/CAKPY9pkhbyHHZ_gJHbBaVMZZshhGL2ML9c2wURxfJ27X%2B%2B4ETQ%40mail.gmail.com.


Re: Help me - Django and python

2021-06-22 Thread DJANGO DEVELOPER
can you please share your login view code?

On Tue, Jun 22, 2021 at 10:12 AM avdesh sharma 
wrote:

> Hi All,
>
> I have an issue coming in my django code, even though the user id and
> password is present in sqlite3 db still  the user is giving '*None'*
> value
> user = authenticate(username=username, password=password)
>
> and I am not able to login with user and throwing this error.
>
> [image: image.png]
>
>
>
>
> --
> Warm Regards,
> Avdesh Kumar Sharma
> 9650031844
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAF5Nfo65s-8c75FRkhF0rN7Sh0aUH6eKNBbQ--OMawNPCVX13w%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/CAKPY9p%3DSQDqv12b8K52FuG9mp40SM9sLFAQ4meaPM37NJxM4zQ%40mail.gmail.com.


Re: please help! not getting the desired output. how to add multiple orders via Django forms using Javascript?

2021-06-19 Thread DJANGO DEVELOPER
please can someone help me?

On Sat, Jun 19, 2021 at 9:31 AM DJANGO DEVELOPER 
wrote:

> for convenience, please follow addorder1 to addorder5 respectively.
>
> On Saturday, June 19, 2021 at 9:29:48 AM UTC+5 DJANGO DEVELOPER wrote:
>
>> Hi guys I need urgent help. your help is appreciated.
>> When I try to add a single order from user side then it works fine but
>> when I try to add multiple orders at the same time then neither it updates
>> a products price nor print all the orders on the invoice. can any one help
>> me? screenshots attached below.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a5126278-cdf7-455c-8718-e9f0692f5ef3n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/a5126278-cdf7-455c-8718-e9f0692f5ef3n%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/CAKPY9pnHpB7CDXe078G2QPZZMsfJ69egDRRxAX4ijvjvNCRQyQ%40mail.gmail.com.


Re: please help! not getting the desired output. how to add multiple orders via Django forms using Javascript?

2021-06-18 Thread DJANGO DEVELOPER
for convenience, please follow addorder1 to addorder5 respectively.

On Saturday, June 19, 2021 at 9:29:48 AM UTC+5 DJANGO DEVELOPER wrote:

> Hi guys I need urgent help. your help is appreciated.
> When I try to add a single order from user side then it works fine but 
> when I try to add multiple orders at the same time then neither it updates 
> a products price nor print all the orders on the invoice. can any one help 
> me? screenshots attached below.
>

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


Re: help me plz: button one click django(disable the submit button )

2021-06-18 Thread DJANGO DEVELOPER
you can apply javascript to perform this action.

On Sat, Jun 19, 2021 at 7:43 AM hanin guesmi  wrote:

> Hi
> i am trying to disable send data when click in the second time in the
> button
> my template.html
>  
>   {% csrf_token %}
>   {% bootstrap_form form %}
>
>  submit >
>  
>
>
> 
>  Garanti
> sans virus. www.avast.com
> 
> <#m_4219546677206560646_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CABqiOL-3gAqMUry0k8P7__naavRT6d-jPvVobiJNvq91dvGbyA%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/CAKPY9p%3DgE4rK2AUow46u7dUwPFiq%2BdUKHXx%3D5bBeuBKt_U86hw%40mail.gmail.com.


Re: Help

2021-06-15 Thread DJANGO DEVELOPER
hi inside believer. +923012876771. Ping me on whats app. I will help you in
your django project.

On Wed, Jun 16, 2021 at 1:56 AM Sebastian Jung 
wrote:

> Good luck to be an expert in Django in only one Montag
>
> Inside Believer  schrieb am Mo., 7. Juni 2021, 18:21:
>
>> Sir I'm internee i know python my company has assigned me bugs to resolve
>> in live project but i have not didn't experience of Django. Anyone who can
>> help me how to find bugs destination and how to resolve. i can pay for this
>> i want to be expert in 1 month because i'm in probations period.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/d2e6328c-6176-49c6-84dc-c6c4b0d4fedbn%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/CAKGT9myBBr4Ux_XJFUDbmYY2%3DL%2Bkhf%3DW-AbU6D5ZZ0q8EgGovg%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/CAKPY9pnuKqgTSNW3mQ-JTC0HRhSibY_qvrzaoGx_AThbb2ZOTQ%40mail.gmail.com.


Re: TypeError: Password must be a string or bytes, got BoundField

2021-06-04 Thread DJANGO DEVELOPER
have you converted your password into hashed? if not then do it by using
set_password.

On Fri, Jun 4, 2021 at 10:29 PM Kasper Laudrup 
wrote:

>
> https://betterprogramming.pub/how-to-ask-questions-about-programming-dcd948fcd2bd
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/cf6e4a2a-62a3-18b2-d9f4-1c9228a59259%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/CAKPY9pne3j9CC3cjouZbjemfXOHJhmrVsYxSVd9EH%3DaemNV%3DcQ%40mail.gmail.com.


Re: use of annotate in django query

2021-06-03 Thread DJANGO DEVELOPER
to display last 30 records you can write your code like this:
Customer_Requests.objects.all()[-30]

On Thu, Jun 3, 2021 at 10:51 AM Eugene TUYIZERE 
wrote:

> Dear Latit,
>
> Thank you very much. Now how can I display 30 last records? Regardless of
> how many records I may have ! Just the last 30 records!
>
> Thank you
>
> On Thu, 3 Jun 2021 at 06:51, Lalit Suthar 
> wrote:
>
>> > in brief, I want to transform this query in django query
>> this will be equivalent to this query in django
>>
>> Customer_Requests.objects.values("arrival_date").annotate(num_req=Count("request_name"))
>>
>>
>> On Thu, 3 Jun 2021 at 02:02, Eugene TUYIZERE 
>> wrote:
>>
>>> in brief, I want to transform this query in django query
>>>
>>> [image: image.png]
>>>
>>> On Wed, 2 Jun 2021 at 21:56, Eugene TUYIZERE 
>>> wrote:
>>>
 Dear Sebatian,

 This is what I get:

 SELECT `crms_customer_requests`.`arrival_date`,
 COUNT(`crms_customer_requests`.`request_name`) AS `count` FROM
 `crms_customer_requests` WHERE `crms_customer_requests`.`arrival_date` >=
 2021-05-03 GROUP BY `crms_customer_requests`.`arrival_date` ORDER BY NULL
 SELECT `crms_customer_requests`.`arrival_date`,
 COUNT(`crms_customer_requests`.`request_name`) AS `count` FROM
 `crms_customer_requests` WHERE `crms_customer_requests`.`arrival_date` >=
 2021-05-04 GROUP BY `crms_customer_requests`.`arrival_date` ORDER BY NULL
 SELECT `crms_customer_requests`.`arrival_date`,
 COUNT(`crms_customer_requests`.`request_name`) AS `count` FROM
 `crms_customer_requests` WHERE `crms_customer_requests`.`arrival_date` >=
 2021-05-05 GROUP BY `crms_customer_requests`.`arrival_date` ORDER BY NULL
 SELECT `crms_customer_requests`.`arrival_date`,
 COUNT(`crms_customer_requests`.`request_name`) AS `count` FROM
 `crms_customer_requests` WHERE `crms_customer_requests`.`arrival_date` >=
 2021-05-06 GROUP BY `crms_customer_requests`.`arrival_date` ORDER BY NULL
 SELECT `crms_customer_requests`.`arrival_date`,
 COUNT(`crms_customer_requests`.`request_name`) AS `count` FROM
 `crms_customer_requests` WHERE `crms_customer_requests`.`arrival_date` >=
 2021-05-07 GROUP BY `crms_customer_requests`.`arrival_date` ORDER BY NULL
 SELECT `crms_customer_requests`.`arrival_date`,
 COUNT(`crms_customer_requests`.`request_name`) AS `count` FROM
 `crms_customer_requests` WHERE `crms_customer_requests`.`arrival_date` >=
 2021-05-08 GROUP BY `crms_customer_requests`.`arrival_date` ORDER BY NULL
 SELECT `crms_customer_requests`.`arrival_date`,
 COUNT(`crms_customer_requests`.`request_name`) AS `count` FROM
 `crms_customer_requests` WHERE `crms_customer_requests`.`arrival_date` >=
 2021-05-09 GROUP BY `crms_customer_requests`.`arrival_date` ORDER BY NULL
 SELECT `crms_customer_requests`.`arrival_date`,
 COUNT(`crms_customer_requests`.`request_name`) AS `count` FROM
 `crms_customer_requests` WHERE `crms_customer_requests`.`arrival_date` >=
 2021-05-10 GROUP BY `crms_customer_requests`.`arrival_date` ORDER BY NULL
 SELECT `crms_customer_requests`.`arrival_date`,
 COUNT(`crms_customer_requests`.`request_name`) AS `count` FROM
 `crms_customer_requests` WHERE `crms_customer_requests`.`arrival_date` >=
 2021-05-11 GROUP BY `crms_customer_requests`.`arrival_date` ORDER BY NULL
 SELECT `crms_customer_requests`.`arrival_date`,
 COUNT(`crms_customer_requests`.`request_name`) AS `count` FROM
 `crms_customer_requests` WHERE `crms_customer_requests`.`arrival_date` >=
 2021-05-12 GROUP BY `crms_customer_requests`.`arrival_date` ORDER BY NULL
 SELECT `crms_customer_requests`.`arrival_date`,
 COUNT(`crms_customer_requests`.`request_name`) AS `count` FROM
 `crms_customer_requests` WHERE `crms_customer_requests`.`arrival_date` >=
 2021-05-13 GROUP BY `crms_customer_requests`.`arrival_date` ORDER BY NULL
 SELECT `crms_customer_requests`.`arrival_date`,
 COUNT(`crms_customer_requests`.`request_name`) AS `count` FROM
 `crms_customer_requests` WHERE `crms_customer_requests`.`arrival_date` >=
 2021-05-14 GROUP BY `crms_customer_requests`.`arrival_date` ORDER BY NULL
 SELECT `crms_customer_requests`.`arrival_date`,
 COUNT(`crms_customer_requests`.`request_name`) AS `count` FROM
 `crms_customer_requests` WHERE `crms_customer_requests`.`arrival_date` >=
 2021-05-15 GROUP BY `crms_customer_requests`.`arrival_date` ORDER BY NULL
 SELECT `crms_customer_requests`.`arrival_date`,
 COUNT(`crms_customer_requests`.`request_name`) AS `count` FROM
 `crms_customer_requests` WHERE `crms_customer_requests`.`arrival_date` >=
 2021-05-16 GROUP BY `crms_customer_requests`.`arrival_date` ORDER BY NULL
 SELECT `crms_customer_requests`.`arrival_date`,
 COUNT(`crms_customer_requests`.`request_name`) AS `count` FROM
 `crms_customer_requests` WHERE `crms_customer_requests`.`arrival_date` >=
 2021-05-17 GROUP BY 

Re: best tutorial or guidance for social login(facebook or google) using django allauth and rest auth

2021-06-02 Thread DJANGO DEVELOPER
it is based on social-django but I am using django-allauth.

On Wed, Jun 2, 2021 at 10:58 AM Omkar Parab  wrote:

> try this. 
>
> https://stackoverflow.com/questions/61868629/page-not-found-error-when-adding-facebook-authentication
>
> On Wed, Jun 2, 2021, 11:12 AM DJANGO DEVELOPER 
> wrote:
>
>> actually I am using django-allauth and it doesn't need to have a form to
>> login via facebook.
>>
>> On Wed, Jun 2, 2021 at 10:37 AM Omkar Parab 
>> wrote:
>>
>>> You need to pass csrf_token using  tag or via JS.
>>>
>>> On Wed, Jun 2, 2021, 10:53 AM DJANGO DEVELOPER 
>>> wrote:
>>>
>>>> it is working now but giving the errors attached in the photo.  when I
>>>> click on send anyway, then it shows error of csrf forbidden. I am getting
>>>> confused again and again.
>>>>
>>>> On Wed, Jun 2, 2021 at 10:18 AM Omkar Parab 
>>>> wrote:
>>>>
>>>>> Yes.
>>>>>
>>>>> On Wed, Jun 2, 2021, 10:12 AM DJANGO DEVELOPER <
>>>>> abubakarbr...@gmail.com> wrote:
>>>>>
>>>>>> do have I to add ngrok url in my facebook app that I created to get
>>>>>> client secret?
>>>>>>
>>>>>> On Wed, Jun 2, 2021 at 9:40 AM DJANGO DEVELOPER <
>>>>>> abubakarbr...@gmail.com> wrote:
>>>>>>
>>>>>>> oh, I had to run the local server first. it is running successfully
>>>>>>> but giving the same error of urls.
>>>>>>>
>>>>>>> On Wed, Jun 2, 2021 at 9:36 AM DJANGO DEVELOPER <
>>>>>>> abubakarbr...@gmail.com> wrote:
>>>>>>>
>>>>>>>> The connection to https://d0f7dea89f18.ngrok.io was successfully
>>>>>>>> tunneled to your ngrok client, but the client failed to establish a
>>>>>>>> connection to the local address localhost:8000.
>>>>>>>> facing this error
>>>>>>>>
>>>>>>>> On Wed, Jun 2, 2021 at 9:30 AM Omkar Parab 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Run "ngrok.exe http 8000" command in ngrok terminal.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wed, Jun 2, 2021, 9:23 AM DJANGO DEVELOPER <
>>>>>>>>> abubakarbr...@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> let suppose I have installed ngrok, then should have I to run
>>>>>>>>>> command of ngrok.exe in project's directory or anywhere?
>>>>>>>>>>
>>>>>>>>>> On Wed, Jun 2, 2021 at 8:39 AM Omkar Parab 
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> Facebook login won't work with these local URLs. Only google
>>>>>>>>>>> login will work. Don't waste your time. Either host it on Heroku or 
>>>>>>>>>>> install
>>>>>>>>>>> ngrok and try again.
>>>>>>>>>>>
>>>>>>>>>>> On Wed, Jun 2, 2021, 7:16 AM DJANGO DEVELOPER <
>>>>>>>>>>> abubakarbr...@gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> and last settings of my developer app
>>>>>>>>>>>>
>>>>>>>>>>>> On Wed, Jun 2, 2021 at 6:44 AM DJANGO DEVELOPER <
>>>>>>>>>>>> abubakarbr...@gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> site url from my app.
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Wed, Jun 2, 2021 at 6:43 AM DJANGO DEVELOPER <
>>>>>>>>>>>>> abubakarbr...@gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> I have 2 sites in my django admin side. one is localhost:8000
>>>>>>>>>>>>>> and other is 127.0.0.1:8000
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Wed, Jun 2, 2021 at 1:05 AM Kasper Laudrup <
>>>>>>>>>>>>>> laud...@

Re: Inlined hierarchy models in django admin site.

2021-06-01 Thread DJANGO DEVELOPER
I think this the only way to lin different models with eachother. and I
would like to hear more about linking the models with each other if there
is anyone who can describe it to both of us.

On Wed, Jun 2, 2021 at 10:38 AM Ayush Bisht 
wrote:

> thanks, .. it works for me.. but is there any other way to do these ??. as
> PatientVaccineStatus already connected to Patient model, and Vaccine
> connected to PatientVaccineStatus model.  Can't we merged all the tables of
> descendants to their parent model in this hierarchy fashion without linking
> each descendants to its.. super parent??
>
>
> On Tuesday, June 1, 2021 at 1:31:43 AM UTC-7 abubak...@gmail.com wrote:
>
>> class Vaccine(models.Model)
>>  vaccine = models.ForeignKey(PatientVaccineStatus,
>> related_name="vaccine_status")
>> patient = models.ForeignKey(Patient, related_name="patient")  # new
>> line
>> apply this line and your patient model will be linked with Vaccine model
>>
>> On Tue, Jun 1, 2021 at 11:06 AM Ayush Bisht  wrote:
>>
>>> class Patient(models.Model):
>>>  patient_id = models.CharField(max_length=60)
>>>
>>>
>>> class PatientVaccineStatus(models.Model):
>>>   patient = models.ForeignKey(Patient,
>>> related_name="patient_vaccine_status")
>>>
>>> class Vaccine(models.Model)
>>>  vaccine = models.ForeignKey(PatientVaccineStatus,
>>> related_name="vaccine_status")
>>>
>>> ..
>>>
>>> Is there any way to merged all the tables in a single table of patient.
>>>
>>> I successfully merge, PatientVaccineStatus table with Patient table, but
>>> Vaccine's table is not merging with the Patient.
>>>
>>> how can this hierarchy be merged in a single table.
>>>
>>> --
>>> You received this message because you are subscribed 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/57aac480-cb53-4fbe-a3bd-8766cd7a5b82n%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/1d1dfc11-b044-4474-9f62-2b25b9c5f9d9n%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/CAKPY9pkC5ZDgXN1mhvZPFaMF885b84OA6x-T6ckAbS8WUb5pkQ%40mail.gmail.com.


Re: Inlined hierarchy models in django admin site.

2021-06-01 Thread DJANGO DEVELOPER
btw have you applied in your models what I told you to do?

On Wed, Jun 2, 2021 at 10:31 AM Ayush Bisht 
wrote:

> yes, its true, but here it works as candidate key. so that we can identify
> the patient based in ICMR id's.
>
> On Tuesday, June 1, 2021 at 1:34:24 AM UTC-7 abubak...@gmail.com wrote:
>
>> class Patient(models.Model):
>>  patient_id = models.CharField(max_length=60) # no need for adding
>> patient id because django automatically creates ids
>> patient_vaccine = models.ForeignKey(PatientVaccine,
>> related_name="patient_vaccine")
>>vaccine = models.ForeignKey(Vaccinet, related_name="vaccinet")
>>
>> On Tue, Jun 1, 2021 at 1:30 PM DJANGO DEVELOPER 
>> wrote:
>>
>>> class Vaccine(models.Model)
>>>  vaccine = models.ForeignKey(PatientVaccineStatus,
>>> related_name="vaccine_status")
>>> patient = models.ForeignKey(Patient, related_name="patient")  # new
>>> line
>>> apply this line and your patient model will be linked with Vaccine model
>>>
>>> On Tue, Jun 1, 2021 at 11:06 AM Ayush Bisht 
>>> wrote:
>>>
>>>> class Patient(models.Model):
>>>>  patient_id = models.CharField(max_length=60)
>>>>
>>>>
>>>> class PatientVaccineStatus(models.Model):
>>>>   patient = models.ForeignKey(Patient,
>>>> related_name="patient_vaccine_status")
>>>>
>>>> class Vaccine(models.Model)
>>>>  vaccine = models.ForeignKey(PatientVaccineStatus,
>>>> related_name="vaccine_status")
>>>>
>>>> ..
>>>>
>>>> Is there any way to merged all the tables in a single table of patient.
>>>>
>>>> I successfully merge, PatientVaccineStatus table with Patient table,
>>>> but Vaccine's table is not merging with the Patient.
>>>>
>>>> how can this hierarchy be merged in a single table.
>>>>
>>>> --
>>>> You received this message because you are subscribed 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/57aac480-cb53-4fbe-a3bd-8766cd7a5b82n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/57aac480-cb53-4fbe-a3bd-8766cd7a5b82n%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/d7ca06cb-c662-4994-b8cd-ff0cbfd61ea8n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/d7ca06cb-c662-4994-b8cd-ff0cbfd61ea8n%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/CAKPY9pnLy_Drk1Tz6FCbQkkHGjWRPW8hfJ1Hjsr7C3-53cu6%2BQ%40mail.gmail.com.


Re: best tutorial or guidance for social login(facebook or google) using django allauth and rest auth

2021-06-01 Thread DJANGO DEVELOPER
yes, I used https. as you can see in the first photo, it is showing that,
it is a secure connection

On Wed, Jun 2, 2021 at 10:29 AM Omkar Parab  wrote:

> Try using HTTPS.
>
> On Wed, Jun 2, 2021, 10:53 AM DJANGO DEVELOPER 
> wrote:
>
>> it is working now but giving the errors attached in the photo.  when I
>> click on send anyway, then it shows error of csrf forbidden. I am getting
>> confused again and again.
>>
>> On Wed, Jun 2, 2021 at 10:18 AM Omkar Parab 
>> wrote:
>>
>>> Yes.
>>>
>>> On Wed, Jun 2, 2021, 10:12 AM DJANGO DEVELOPER 
>>> wrote:
>>>
>>>> do have I to add ngrok url in my facebook app that I created to get
>>>> client secret?
>>>>
>>>> On Wed, Jun 2, 2021 at 9:40 AM DJANGO DEVELOPER <
>>>> abubakarbr...@gmail.com> wrote:
>>>>
>>>>> oh, I had to run the local server first. it is running successfully
>>>>> but giving the same error of urls.
>>>>>
>>>>> On Wed, Jun 2, 2021 at 9:36 AM DJANGO DEVELOPER <
>>>>> abubakarbr...@gmail.com> wrote:
>>>>>
>>>>>> The connection to https://d0f7dea89f18.ngrok.io was successfully
>>>>>> tunneled to your ngrok client, but the client failed to establish a
>>>>>> connection to the local address localhost:8000.
>>>>>> facing this error
>>>>>>
>>>>>> On Wed, Jun 2, 2021 at 9:30 AM Omkar Parab 
>>>>>> wrote:
>>>>>>
>>>>>>> Run "ngrok.exe http 8000" command in ngrok terminal.
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Jun 2, 2021, 9:23 AM DJANGO DEVELOPER <
>>>>>>> abubakarbr...@gmail.com> wrote:
>>>>>>>
>>>>>>>> let suppose I have installed ngrok, then should have I to run
>>>>>>>> command of ngrok.exe in project's directory or anywhere?
>>>>>>>>
>>>>>>>> On Wed, Jun 2, 2021 at 8:39 AM Omkar Parab 
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Facebook login won't work with these local URLs. Only google login
>>>>>>>>> will work. Don't waste your time. Either host it on Heroku or install 
>>>>>>>>> ngrok
>>>>>>>>> and try again.
>>>>>>>>>
>>>>>>>>> On Wed, Jun 2, 2021, 7:16 AM DJANGO DEVELOPER <
>>>>>>>>> abubakarbr...@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> and last settings of my developer app
>>>>>>>>>>
>>>>>>>>>> On Wed, Jun 2, 2021 at 6:44 AM DJANGO DEVELOPER <
>>>>>>>>>> abubakarbr...@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> site url from my app.
>>>>>>>>>>>
>>>>>>>>>>> On Wed, Jun 2, 2021 at 6:43 AM DJANGO DEVELOPER <
>>>>>>>>>>> abubakarbr...@gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> I have 2 sites in my django admin side. one is localhost:8000
>>>>>>>>>>>> and other is 127.0.0.1:8000
>>>>>>>>>>>>
>>>>>>>>>>>> On Wed, Jun 2, 2021 at 1:05 AM Kasper Laudrup <
>>>>>>>>>>>> laud...@stacktrace.dk> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> On 01/06/2021 21.49, DJANGO DEVELOPER wrote:
>>>>>>>>>>>>> > I am using django-allauth library and i am following this
>>>>>>>>>>>>> > tutorial.
>>>>>>>>>>>>> https://medium.com/geekculture/setup-social-authentication-in-django-rest-framework-1afdb675375f
>>>>>>>>>>>>> > <
>>>>>>>>>>>>> https://medium.com/geekculture/setup-social-authentication-in-django-rest-framework-1afdb675375f
>>>>>>>>>>>>> >
>>>>>>>>>>>>> >
>>>>>>>>>>>>>
>>>>>>>>>>>>> You've said so already, but at least now you've posted an
&g

  1   2   >