Re: Search results in template

2017-12-26 Thread Malik Rumi
That appears to be it. I got content and all that on the simple template this time. I put values_list in there because that's the way it was done on the postgres full text search tutorial I was using. I assumed it was needed for rank, I never thought about it limiting me otherwise. If I seem a lit

Re: Search results in template

2017-12-26 Thread James Schneider
*And the result:* !DOCTYPE This is the first page - ('2017-10-09 Incentive, a further review', 0.151982) - ('2017-11-14 Pulling The Trigger', 0.151982) - ('2017-10-05 A Failure of Incentive?', 0.121585) - ('2017-10-20 spider refactor', 0.121585) And now for something

Re: Search results in template

2017-12-26 Thread Malik Rumi
*Your first suggested loop:* This is the first page {% for obj in QuerySet %} {{obj}} {% empty %} No results {% endfor %} *The result:* !DOCTYPE This is the first page - ('2017-10-09 Incentive, a further review', 0.151982) - ('2017-11-14 Pulling The Trigger', 0.151982) -

Re: Search results in template

2017-12-26 Thread Malik Rumi
Here is the Entry model: class Entry(models.Model): title = models.CharField(max_length=100, blank=False, null=False) slug = models.SlugField(max_length=100) content = models.TextField() posted_date = models.DateTimeField(auto_now=True) chron_date = models.DateField(auto_now=Fa

Re: Using Select2 autocomplete with Django project does not work while fetching the data

2017-12-26 Thread Sajid Samsad
Could you kindly suggest me some autocomplete library which I can use for my Django Project? My deadline is coming fast and furiously and I have already spent too much time on this autocomplete library `Select2`. -- You received this message because you are subscribed to the Google Groups "Dj

Re: Search results in template

2017-12-26 Thread James Schneider
The template context says I have a queryset I see it there. Can you post up the model for Entry? And so does the selection Yes. It appears that you will have 4 results in your queryset. I put print statements in the view: ## Quit the server with CONTROL-C. This is the value of q

Re: Using Select2 autocomplete with Django project does not work while fetching the data

2017-12-26 Thread Jason
looks like something you should go to the select2 github issue tracker for, since this is not a django issue. In the meantime, try using the unminified version of select2, would be a more relevant stack trace for you to look through the errors without the transformed names. -- You received

Re: Search results in template

2017-12-26 Thread Malik Rumi
PyCharm had my project running in a separate process. Don't worry about that. I don't think it's a huge issue I have the right view The template context says I have a queryset The explanation seems right. And so does the selection I put print statements in the view: ## Quit the se

Re: How to parse json and display it in CBV.

2017-12-26 Thread tango ward
Thanks for the idea Andréas. You're always helping me. On Wed, Dec 27, 2017 at 2:29 AM, Andréas Kühne wrote: > All you need is to send the image (the url to the image) that should be > shown to the template, and then display it on the template. It shouldn't be > too hard as long as you understan

Re: How to parse json and display it in CBV.

2017-12-26 Thread Andréas Kühne
All you need is to send the image (the url to the image) that should be shown to the template, and then display it on the template. It shouldn't be too hard as long as you understand how to send context data to the template. See here : https://docs.djangoproject.com/en/2.0/topics/class-based-views

Re: How to parse json and display it in CBV.

2017-12-26 Thread tango ward
Hi Andréas, Thanks for the help. Also, I am not sure if the correct term is parse but I also want to display the images of heroes of DOTA 2 from OpenDOTA API. I saw a video on youtube on how to do it however its in Swift. Not sure if I can do it using CBV in django. On Wed, Dec 27, 2017 at 1:56

Re: How to parse json and display it in CBV.

2017-12-26 Thread Andréas Kühne
Hi, If you want to parse json in django - or in python for that matter - all you have to do is to use the json module. import json object = json.loads(insert_string_here) insert_string_here is the string that you want to parse - and object is the parsed json. Look here for more information: ht

Re: Using Select2 autocomplete with Django project does not work while fetching the data

2017-12-26 Thread Sajid Samsad
> > I actually didn't understand your question. > > > I have posted the codes above. > > > Could you kindly take a look if it's anything with the code?your question. > > I actually didn't understand your question. I have posted the codes above. Could you kindly take a look if it's to anyt

How to parse json and display it in CBV.

2017-12-26 Thread tango ward
Hi, I need suggestions on this. I want to use the OpenDOTA API for my pet project. As a beginner, I don't know where to start working on this. I have found the OpenDOTA API https://api.opendota.com/api/heroes which I am planning to use but I am confuse as to how to parse the json into my CBVs. I

Re: Using Select2 autocomplete with Django project does not work while fetching the data

2017-12-26 Thread Jason
As you can see at https://select2.org/data-sources/ajax#jquery-ajax-options, ajax parameters are passed to a jquery method. So do you have a

RE: How to store multiple object reference in one field?

2017-12-26 Thread Matthew Pava
Use a many-to-many field instead. https://docs.djangoproject.com/en/2.0/topics/db/models/#many-to-many-relationships From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Hasanul Islam Sent: Tuesday, December 26, 2017 9:52 AM To: Django users Subject: How to sto

How to store multiple object reference in one field?

2017-12-26 Thread Hasanul Islam
Suppose, I have a model class Project(models.Model): name = models.CharField(max_length=50) Another model, class Manager(models.Model) name = models.CharField(max_length = 50) projects = ArrayF

Re: Using Select2 autocomplete with Django project does not work while fetching the data

2017-12-26 Thread Sajid Samsad
> > Well when I write something in the search options, I got this error: > > But I didn't write the js. It is from select2. And if the request is not hit then what shoul

Re: Using Select2 autocomplete with Django project does not work while fetching the data

2017-12-26 Thread Jason
That;s not quite what I mean See above, there's a XHR (ajax) request going to reddit and you can see the headers of the reque

[ANN] BlogEngine 0.8.2 release

2017-12-26 Thread Etienne Robillard
Hi all, I'm excited to announce the public release of BlogEngine2, a ZODB powered blogging microframework on top of Django. :P BlogEngine2 is a full-featured API to develop a functional blog site in Python and django-hotsauce. Download: https://www.isotopesoftware.ca/pub/blogengine2/blogen