Re: getting error when i changed database sqllite3 to mysql

2019-10-07 Thread Desh Deepak
You can't use above version of django 2.0 with pymysql. On Mon, 7 Oct 2019, 03:24 'Dick in Texas' via Django users, < django-users@googlegroups.com> wrote: > I have tried to use a new, empty database, but that did not work. Still > got the question if I have installed MySQLclient. > > Tried

QuerySet not iterable

2019-10-07 Thread Abhijeet Viswa
Hey guys, I need a help with a quirky bug while iterating over a QuerySet: > TypeError: argument of type 'QuerySet' is not iterable The following is the block of code that produces the error: (the save method overrides the default save method in a Model called *Transaction*) def save(self,

Re: My first django website

2019-10-07 Thread Ehab Al-Qabbani
Really I didn't need to upload multiple files, But you can google it, may in first link you find the idea. Warmest Regards, Ehab From: django-users@googlegroups.com on behalf of Ajeet Kumar Gupt Sent: Monday, October 7, 2019 8:03 PM To:

Re: Why would check_password(..) return True but authenticate(.., ..) never return user?

2019-10-07 Thread Christian Seberino
OK I fixed. All my server code was correct but I was creating User objects incorrectly. You can create User objects in such a way that they are NOT utilized correctly by the authentication system! I was not using the User.objects.create_user method. Once I did that, it worked. Chris -- You

Re: My first django website

2019-10-07 Thread Ajeet Kumar Gupt
Do you have the file upload option . How to upload the multiple files at a time. On Sun, 6 Oct, 2019, 4:15 AM Ehab Al-Qabbani, wrote: > https://my-private-blog.herokuapp.com/ > > Please try it > > > > Warmest Regards, > Ehab > > -- > You received this message because you are subscribed to the

Re: My first django website

2019-10-07 Thread Ehab Al-Qabbani
I can't, this is not my own only. Warmest Regards, Ehab From: django-users@googlegroups.com on behalf of Sudharsana Muralidharan Sent: Monday, October 7, 2019 5:06 PM To: Django users Subject: Re: My first django website looking very nice.Please give me that

Re: My first django website

2019-10-07 Thread Ehab Al-Qabbani
Fixed please try now. Warmest Regards, Ehab From: django-users@googlegroups.com on behalf of Muhammad Mahir Sent: Monday, October 7, 2019 5:06 PM To: django-users@googlegroups.com Subject: Re: My first django website maybe its because my username is admin1

Re: My first django website

2019-10-07 Thread Sudharsana Muralidharan
can you send that code to me On Sunday, October 6, 2019 at 5:45:35 AM UTC+5:30, Ehab Al-Qabbani wrote: > > https://my-private-blog.herokuapp.com/ > > Please try it > > > > Warmest Regards, > Ehab > -- You received this message because you are subscribed to the Google Groups "Django users"

[Django] Trying to open a form on button click getting Error:Failed lookup for key [%s] in %r during template rendering

2019-10-07 Thread Dilipkumar Noone
Dear Django User Group, I am django beginner. Please clarify the below doubt. *Implement Scenerio:* 1.I am developing one django app which needs a form on button click on html page. 2.on successful submission should display the object created in the list on the same web page. Below is the

Re: getting error when i changed database sqllite3 to mysql

2019-10-07 Thread Tosin Ayoola
Hello in your settings.py files, you still have, sqlite3 as your db engine instead of MySQL so probably try changing that then see if it's works On Oct 5, 2019 22:35, "Gulsher Khan" wrote: > I trying to change default database(sqllite) which is given by the Django. > I want to use mysql

Re: [Django] Any generalised or optimized way of handling multiple class based generic listviews in django ?

2019-10-07 Thread Dilipkumar Noone
Dear Pradep Sukhwani, The Below QuerySetUnion functionality will work if you have multiple querysets from one model as per my understanding. How to proceed if i have different number of querysets from multiple models. [ say 5 models in my django project ,each has one queryset and context

Re: My first django website

2019-10-07 Thread Muhammad Mahir
maybe its because my username is admin1 On Mon, Oct 7, 2019 at 8:26 PM Muhammad Mahir wrote: > ok so great work and the flow. > > Have you noticed if I want to delete my post, it does not delete it but > rahter redirecting me to django admin login page. > > On Mon, Oct 7, 2019 at 3:15 PM Ehab

Re: My first django website

2019-10-07 Thread Sudharsana Muralidharan
looking very nice.Please give me that code to me... On Sunday, October 6, 2019 at 5:45:35 AM UTC+5:30, Ehab Al-Qabbani wrote: > > https://my-private-blog.herokuapp.com/ > > Please try it > > > > Warmest Regards, > Ehab > -- You received this message because you are subscribed to the Google

Re: My first django website

2019-10-07 Thread Muhammad Mahir
ok so great work and the flow. Have you noticed if I want to delete my post, it does not delete it but rahter redirecting me to django admin login page. On Mon, Oct 7, 2019 at 3:15 PM Ehab Al-Qabbani wrote: > Hi, > you can change your default avatar as in the attached screenshot. > > On Sun,

Re: Why would check_password(..) return True but authenticate(.., ..) never return user?

2019-10-07 Thread Christian Seberino
Thanks. I tried doing authenticate(request = request, username = username, password = password) and it still fails. Also, they mention the request parameter in Django docs but then the example does not have it See

Re: My first django website

2019-10-07 Thread Ehab Al-Qabbani
Please read about how to deploy your django project on heroku. Warmest Regards, Ehab From: django-users@googlegroups.com on behalf of johnsi rani Sent: Monday, October 7, 2019 4:29 PM To: django-users@googlegroups.com Subject: Re: My first django website

Re: My first django website

2019-10-07 Thread johnsi rani
after create website how can upload django websites.please say detaila On Sun, Oct 6, 2019 at 5:45 AM Ehab Al-Qabbani wrote: > https://my-private-blog.herokuapp.com/ > > Please try it > > > > Warmest Regards, > Ehab > > -- > You received this message because you are subscribed to the Google

Re: My first django website

2019-10-07 Thread Ehab Al-Qabbani
Hi, you can change your default avatar as in the attached screenshot. On Sun, Oct 6, 2019 at 7:25 PM Ehab Al-Qabbani wrote: > Thank you. > Good luck. > > > Warmest Regards, > Ehab > -- > *From:* django-users@googlegroups.com on behalf of Ivan Kasvan < >

Re: Protecting the files...

2019-10-07 Thread Pradeep Sukhwani
Hi Suraj, Here there is a detailed example of restricting access to media and static files based on per user. -- Thanks Pradeep Sukhwani On Monday, October 7, 2019 at 4:12:36 PM UTC+5:30, Suraj Thapa FC

Re: ListView from 2 model

2019-10-07 Thread Pradeep Sukhwani
Hi Yann, You can try queryset union functionality: class MultiFilterPlacesListView(ListAPIView): """Custom queryset api view. Does not implement pagination""" pagination_class = None # Import custom pagination if you need the pagination. queryset = Places.objects.all()

Re: I want to know about how to implement elastic search in the python django

2019-10-07 Thread Pradeep Sukhwani
Hi Sachin, I would suggest you use Django-Haystack (documentation ) with elastic-search. Its documentation is pretty strong and straight forward. You can follow the elastic-search tutorial from here

Re: Protecting the files...

2019-10-07 Thread Kasper Laudrup
Hi Suraj, On 07/10/2019 12.41, Suraj Thapa FC wrote: How do I protect the media and static files... From unauthorised access. If you use Nginx, have a look here: https://wellfire.co/learn/nginx-django-x-accel-redirects/ Something similar can most likely be done with other web servers (eg.

Protecting the files...

2019-10-07 Thread Suraj Thapa FC
How do I protect the media and static files... From unauthorised access. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: for loop template

2019-10-07 Thread Pradeep Sukhwani
Hi Luca, As far as I'm able to understand you need to print the elements in the lista array corresponding to the current forloop.counter0, if this is the case then you can do: {% load index %} {{ lista|index:forloop.counter0 }} // this will print the element in the lista array corresponding

Re: Why would check_password(..) return True but authenticate(.., ..) never return user?

2019-10-07 Thread Pradeep Sukhwani
Hi Christian, authentication() functions takes request parameter if the request is None it will simply break the for loop. Check the source code of authenticate. -- Thanks Pradeep Sukhwani On Monday,

Re: [Django] Any generalised or optimized way of handling multiple class based generic listviews in django ?

2019-10-07 Thread Pradeep Sukhwani
Hi Dilip, A few days back I stuck at the same issue, then I tried with the queryset union functionality: class MultiFilterPlacesListView(ListAPIView): """Custom queryset api view. Does not implement pagination""" pagination_class = None # Import custom pagination if you need the