Re: Hello, everybody! I've tried using FormMixin with DetailView and I get error 405 on post method. Can anybody help me? Thanks a lot.

2019-08-22 Thread Catalina Popescu
Morning, James The browser just throws HTTP ERROR 405. In CMD: Method Not Allowed (POST): books/book/10/ Method Not Allowed: books/book/10/ "POST /book/book/10/ HTTP/1.1" 405.0 On Friday, August 23, 2019 at 12:28:27 AM UTC+3, James Schneider wrote: > Post the full error message and/or traceba

Re: Django sql raw query to queryset

2019-08-22 Thread Suraj Thapa FC
Invalid field name error On Fri, 23 Aug, 2019, 11:58 AM Sipum, wrote: > You can use Queryset like - > > course_review_report.objects.select_related('courses') > > On Fri, 23 Aug, 2019, 11:07 AM Suraj Thapa FC, > wrote: > >> SELECT * >> FROM course_review_report LEFT JOIN courses ON course_revie

Re: Django sql raw query to queryset

2019-08-22 Thread Sipum
You can use Queryset like - course_review_report.objects.select_related('courses') On Fri, 23 Aug, 2019, 11:07 AM Suraj Thapa FC, wrote: > SELECT * > FROM course_review_report LEFT JOIN courses ON course_review_report.cid = > courses.cid > > > Can anyone pls write the querryset for the above sq

Django sql raw query to queryset

2019-08-22 Thread Suraj Thapa FC
SELECT * FROM course_review_report LEFT JOIN courses ON course_review_report.cid = courses.cid Can anyone pls write the querryset for the above sql query -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop r

Re: Django is not working

2019-08-22 Thread Mike Dewhirst
Looking at the error below, I would recommend the following: 1. Upgrade pip 2. pip uninstall django 3. Reinstall the previous working version of Django and prove it is working 4. Restart the machine 5. Re-install Django 1.11.22 The traceback says it cannot find the contrib module which possib

Re: Django is not working

2019-08-22 Thread 'Akash Sinha' via Django users
You are using python 2.7 with Django , I will suggest you should use python 3.6 or above. Sent from Yahoo Mail on Android On Fri, Aug 23, 2019 at 3:14 AM, Tom Gertin wrote: Hello, I have successfully install Django 1.11.22. However, I believe something is wrong because I cannot get the c

Re: Django is not working

2019-08-22 Thread Gerardo Palazuelos Guerrero
hi Tom, Not sure what exactly configuration you have, but text you sent says you have python 2.7 and somehow a virtual environment (venv) is mentioned in the stacktrace. I don't use python 2.7, so my following suggestions considers a recent version. May i suggest you to check djangogirls for prope

Re:

2019-08-22 Thread Perceval Maturure
Tutorial on how to simply hook the app to the page On Thu, 22 Aug 2019 at 23:49, Perceval Maturure wrote: > Hi All > My app is not displaying records from the database after hooking a page to > an apphook. I can select the app from admin on the page but when I preview > the page is empty, > Can

[no subject]

2019-08-22 Thread Perceval Maturure
Hi All My app is not displaying records from the database after hooking a page to an apphook. I can select the app from admin on the page but when I preview the page is empty, Can anyone share some simplified tutorial for Django version 2.1 and Djangocms 3.6 Regards Perceval -- Sent from Gmail Mob

Django is not working

2019-08-22 Thread Tom Gertin
Hello, I have successfully install Django 1.11.22. However, I believe something is wrong because I cannot get the command that lists its version to work, in addition the manage.py help command also produces the same error. Here is the error. $ pip install Django==1.11.22 DEPRECATION: Python 2.7

Re: Hello, everybody! I've tried using FormMixin with DetailView and I get error 405 on post method. Can anybody help me? Thanks a lot.

2019-08-22 Thread James Schneider
Post the full error message and/or traceback reported by the server when the error occurs. -James On Thu, Aug 22, 2019, 12:31 PM Catalina Popescu < catalina.t.pope...@gmail.com> wrote: > views.py > > class BookDisplay(DetailView): > model = Book > template_name = 'books/book_detail.html'

Re: form.is_valid() is always return false please help

2019-08-22 Thread Thomas Lockhart
Post your form code please. - Tom > On Aug 22, 2019, at 12:56 PM, Shubham Chauhan > wrote: > > form.is_valid() is always return false please help > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and

form.is_valid() is always return false please help

2019-08-22 Thread Shubham Chauhan
form.is_valid() is always return false 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 discu

Hello, everybody! I've tried using FormMixin with DetailView and I get error 405 on post method. Can anybody help me? Thanks a lot.

2019-08-22 Thread Catalina Popescu
views.py class BookDisplay(DetailView): model = Book template_name = 'books/book_detail.html' def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) context['form'] = WishBookForm() return context class WishBook(SingleObjectMixi

Re: Reverse for 'modification' with no arguments not found issue

2019-08-22 Thread James Schneider
> > lire.html > ... >type="button">Editer larequête > ... > > urls.py > path('edit/', views.view_modif, name='modification'), > error : > NoReverseMatch at /edit/1 > > Reverse for 'modification' with no arguments not found. 1 pattern(s) tried: > ['edit/(?P[0-9]+)$'] > > Request Method: GET > R

Re: How can I host my application in web hosting?

2019-08-22 Thread Wasim Rana
Thank you so much for your response. *Wasim Rana* CEO and Director *SiteFor99* www.sitefor99.com Cell: +880 173 406 4296 Ring Road, Shyamoli, Dhaka - 1207 On Thu, Aug 22, 2019 at 5:55 PM Abu Yusuf wrote: > Is it a django application? Not every hosting provider provide django > deployments. > Y

Reverse for 'modification' with no arguments not found issue

2019-08-22 Thread Ali IMRANE
Hello everyone, I know I may ask this question for another time for some of you but after an hour of research, I'm still stuck with this issue of "No Reverse Match". Here is my problem : - First, I using forms to put information in my DB (tickets) ; - I want to be able to edit those infor

Re: Chat bot sholud use API

2019-08-22 Thread Ezequias Rocha
I wouldn't do that. You will have too much effort to suppress this endeavour. Use Google Dialogflow and be happy. On Thursday, August 22, 2019 at 10:57:07 AM UTC-3, UNIQ technologies wrote: > > Hi, > > > > I want to create a chatbot for my own website without any third party > Applicantions and

Re: Is there any ready to use Django script for user management like the UserCake or User Spice framework in PHP?

2019-08-22 Thread Vishal Parkar
Thank you very much, Derek! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit

Chat bot sholud use API

2019-08-22 Thread UNIQ technologies
Hi, I want to create a chatbot for my own website without any third party Applicantions and should intract with my API'S and I have to use the Options in chatbot like it should suggestions for response -- You received this message because you are subscribed to the Google Groups "Django users"

Re: UI for python windows applications

2019-08-22 Thread Ezequias Rocha
disconsider. On Thursday, August 22, 2019 at 10:36:11 AM UTC-3, Ezequias Rocha wrote: > > VSCode > > On Wednesday, August 21, 2019 at 2:46:57 PM UTC-3, ARAVIND BALAKRISHNAN > wrote: >> >> Can anyone suggest me any modern UIs for python application in windows >> other than electron >> > -- You

Re: UI for python windows applications

2019-08-22 Thread Ezequias Rocha
VSCode On Wednesday, August 21, 2019 at 2:46:57 PM UTC-3, ARAVIND BALAKRISHNAN wrote: > > Can anyone suggest me any modern UIs for python application in windows > other than electron > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubs

Re: UI for python windows applications

2019-08-22 Thread Mario R. Osorio
You might want to take a look into Kivy (https://kivy.org/ ) HTH On Wednesday, August 21, 2019 at 1:46:57 PM UTC-4, ARAVIND BALAKRISHNAN wrote: > > Can anyone suggest me any modern UIs for python application in windows > other than electron > -- You received this me

Custom action with security

2019-08-22 Thread Ezequias Rocha
Hi everyone I am using a custom action in admin, it is simple but not secure. I would like some custom actions would work only for some users and i think it could be done with a different url and a differente authorization role (in Admin). Could you give me some advice to make this issue work

Using Rest API i want to Put ImageField ie. ImageFile in Hadoop (HDFS)

2019-08-22 Thread Saurabh Dubey
So, I want to connect Django with Hadoop File system. That is if I send the images from postman using POST Request in Django. that data will directly stored into HDFS (Hadoop Distribution file system). send me some idea or solution for connection. and storage files in hadoop using Django Rest API.

Re: Rest framework

2019-08-22 Thread Soumen Khatua
Hi Ahmed, Here is my code: *Views.py* *class DatasetListAPIView(ListAPIView):serializer_class = DatasetlSerializerdef get_queryset(self):qs = Dataset.objects.all()word = self.request.query_params.get('word') if word is not None:qs = qs.filter(nam

Django db query

2019-08-22 Thread Suraj Thapa FC
class courses(models.Model): level = ( ('beginner', 'Beginner Level'), ('intermediate', 'Intermediate Level'), ('expert', 'Expert Level'), ('all level', 'All Level'), ) type = ( ('live', 'LIVE'), ('on demand', 'On Demand'), )

Re: Rest framework

2019-08-22 Thread Ahmed Shahwan
you'll just create an endpoint that receives a query parameter with the string to search for, and you'll search using YOURMODEL.objects.get(field=query_params.get("search_str")) the frontend will be responsible for making the requests to search while typing so, in your views.py you'll do someth

Re: How can I host my application in web hosting?

2019-08-22 Thread Abu Yusuf
Is it a django application? Not every hosting provider provide django deployments. You can use amazon aws and digital ocean. You can do also in heroku and pythonanywhere, they are totally free. On Thu, Aug 22, 2019 at 5:47 PM Wasim Rana wrote: > Hello, I am building a web application locally in

Re: Looking for Django registration API

2019-08-22 Thread Rahul Sharma
Try django-rest-auth . This is what I have used over the years. Easy to understand and implement. Hope it helps you. On Thursday, August 22, 2019 at 12:15:12 AM UTC+5:30, Sandip Nath wrote: > > Are there any ready to use user authent

Re: Looking for Django registration API

2019-08-22 Thread Rahul Sharma
Try django-rest-auth . This is what I have used over the years. Easy to understand and implement. Hope it helps you. On Thu, Aug 22, 2019 at 1:06 PM Suraj Thapa FC wrote: > Search djoser > > On Thu, 22 Aug, 2019, 12:15 AM Sandi

Re: job search

2019-08-22 Thread wd
On Wed, Aug 21, 2019 at 2:32 AM Sam W wrote: > I'm sorry. But knowing Python alone is not enough. > > > I know Python and Django really well, still can't find a job for more than six > months. > > > You need to know Solid Python programming, python framework (Django (DRF) > & Flask), Docker and

How can I host my application in web hosting?

2019-08-22 Thread Wasim Rana
Hello, I am building a web application locally in my computer. It's almost done and I want to host it in Siteground hosting. How can I do that? Please help. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group

Re: Django's str(queryset.query) returns invalid SQL if I compare datetimes

2019-08-22 Thread wd
QuerySet.query is not a plain string, it's an Query object, you can check the source code def __str__(self): > """ > Return the query as a string of SQL with the parameter values > substituted in (use sql_with_params() to see the unsubstituted string). > > Parameter values won't ne

Re: Installation of django

2019-08-22 Thread Virendra Tripathi
Did you check the versions/ Django2.0 and above supports only Python3. Virendra Tripathi Santa Clara, CA 415-910-4955 trip...@gmail.com On Tue, Aug 20, 2019 at 9:14 PM Amit Samanta wrote: > Hi, > > I want to install django in linux server for python 2.7.2. > i am not able install django > Pl

Re: Installation of django

2019-08-22 Thread Abu Yusuf
It's just an example to let him know. You can use any version of python3 here. I did use this because it defaults on ubuntu 16.04 and for me it's a better combination with python3.5 and django2.0 I did make a lot of applications with these. That's it. Cheers! On Thu, Aug 22, 2019 at 4:37 PM o1big

Re: Installation of django

2019-08-22 Thread אורי
I recommend Python 3.6 or 3.5. Some things are deprecated with Python 3.7. For example Django 1.11 runs DeprecationWarnings with Python 3.7. אורי u...@speedy.net On Thu, Aug 22, 2019 at 1:37 PM o1bigtenor wrote: > On Thu, Aug 22, 2019 at 3:35 AM Abu Yusuf > wrote: > > > > First of all: don't u

Re: Weird Database behavior (Can't access object from a view after directly saving it from inside another view)

2019-08-22 Thread Ahmed Shahwan
I solved the problem. It's related to the atomic requests. I had "ATOMIC_REQUESTS": True in the database settings and XPAY's service responded so fast while the first atomic-request hadn't finished yet, so it prevented the other callback-url from accessing the same instance. Thank you very muc

Re: Installation of django

2019-08-22 Thread o1bigtenor
On Thu, Aug 22, 2019 at 3:35 AM Abu Yusuf wrote: > > First of all: don't use python2. It will be dead after 4 months. > create a virtual environment: virtualenv -p /usr/bin/python3.5 venv > then activate it: source venv/bin/activate Greetings Curious as to why you wouldn't install python 3.7 at

Increase Count Value

2019-08-22 Thread Soumen Khatua
Hi Folks, I want to increase count value of a record after ftech the record each time in django rest framework. *This is my model.py* *class Dataset(models.Model):name = models.CharField(max_length = 100) number = models.IntegerField()hits = models.IntegerField(default = 0)* *api/vi

Re: Is there any ready to use Django script for user management like the UserCake or User Spice framework in PHP?

2019-08-22 Thread Derek
You may want to work through a tutorial on user registration. Once you see the general approach, you'll be better able to see where you need to add your custom business logic (e.g. "check for an existing user"). https://pythonprogramming.net/user-registration-django-tutorial/ On Tuesday, 20 Au

Re: Django's str(queryset.query) returns invalid SQL if I compare datetimes

2019-08-22 Thread Cornelis Poppema
What makes sense to me is the query builder (ORM) in Django "escapes"/quotes the values at the very last moment: whenever the query is to be executed in a database. Different databases can have different escape characters. When you print queryset.query it simply isn't at a stage where the escap

Django scrapy Multiple Image Saving

2019-08-22 Thread 'Shreejith Unnikrishnan Nair' via Django users
Hi I am trying to integrate scrapy with django for the purpose of scraping blogs. The image in numbers varies across each blog.How i could save it dynamically in database and display exacty in same way as source site through django view. Please let me know if you have any suggestions -- Thanks &

Re: Installation of django

2019-08-22 Thread Abu Yusuf
First of all: don't use python2. It will be dead after 4 months. create a virtual environment: virtualenv -p /usr/bin/python3.5 venv then activate it: source venv/bin/activate Then run pip install django. That's it. On Wed, Aug 21, 2019 at 2:38 AM herve bineli wrote: > Please, provide the errors

Re: Django Template url mapping

2019-08-22 Thread Abu Yusuf
Your template name should be: template_name = "index.html" That's all. On Thu, Aug 22, 2019 at 12:55 PM RONAK JAIN wrote: > Hi > > I am new in Django I am doing struggle with add Django templates using by > inheritance. > > > so when I am trying within *Example:: index.html add inside the > b

Rest framework

2019-08-22 Thread Soumen Khatua
Hi Folks, I want to give some sequence of suggestion after type of any character(of course if that character match any sequnce of string in database record) in search query parameter, How I can do that by using Django Rest framework. Plase help me guys. Thank You Regards, Soumen -- You receiv

Re: Looking for Django registration API

2019-08-22 Thread Suraj Thapa FC
Search djoser On Thu, 22 Aug, 2019, 12:15 AM Sandip Nath, wrote: > Are there any ready to use user authentication API for Django where user > can register not only with username, password and email but also with date > of birth, profile-url, picture etc? > > -- > You received this message becaus