Re: DRF with Rich Text

2019-08-20 Thread Aditya Singh
Hi,
Hope you are good.
Django ships with top of the line CSRF protection first of all, Secondly,
you may specify domain specific headers and strictly restrict the expected
type of data, cookies timeout, response data type from the server to the
client. Also, you may leverage several robust django compatible packages
which relate to security and prevent any requests to the API whiah are
unauthorized. From unauthorized, I feel obliged to mention that you must
make sure that all the endpoints in your api are well defined and that all
the methods being executed on those corresponding endpoints need strong
authentication.
Hope, I could be of some help,
Kind regards,
Aditya

On Wed, Aug 21, 2019, 9:11 AM Yoo  wrote:

> Hi, I'm gonna be using Django Rest Framework for API with a Postgres stack
> and not developing with website. Coding apps in Swift and Androidx Java.
> Users can POST rich text, or text that uses HTML, to the server, and then
> other users can GET that HTML and view it in (ui)TextView.
>
> Based on previous experience, it seemed like Android's TextView wouldn't
> have any trouble with XSS or the like. Not sure about Swift, so can someone
> tell me if I should worry on the iOS side?
>
> Last thing. Because this is just an API, how does DRF protect my server
> against some malicious JSON POST request? A request that isn't sent from
> the designated app or is hand-crafted. If DRF doesn't somehow serialize
> correctly, then there would be some server issues, right? Gah worrying.
>
> TL;DR. Programming mobile with DRF. Should I worry about Rich Text (HTML
> Editing) on client and/or server side?
>
> --
> 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/6c6b92e2-7e49-42f8-abe5-d05b1d0f4619%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/CAEPfumiUNLrfAwEZWu5vkW3HKRk%2BD9NBRLMNANMBU_vjJ7-GcQ%40mail.gmail.com.


DRF with Rich Text

2019-08-20 Thread Yoo
Hi, I'm gonna be using Django Rest Framework for API with a Postgres stack 
and not developing with website. Coding apps in Swift and Androidx Java. 
Users can POST rich text, or text that uses HTML, to the server, and then 
other users can GET that HTML and view it in (ui)TextView.

Based on previous experience, it seemed like Android's TextView wouldn't 
have any trouble with XSS or the like. Not sure about Swift, so can someone 
tell me if I should worry on the iOS side? 

Last thing. Because this is just an API, how does DRF protect my server 
against some malicious JSON POST request? A request that isn't sent from 
the designated app or is hand-crafted. If DRF doesn't somehow serialize 
correctly, then there would be some server issues, right? Gah worrying.

TL;DR. Programming mobile with DRF. Should I worry about Rich Text (HTML 
Editing) on client and/or server side?

-- 
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/6c6b92e2-7e49-42f8-abe5-d05b1d0f4619%40googlegroups.com.


Re: Translator of words and phrases in Django

2019-08-20 Thread Mike Dewhirst

On 21/08/2019 12:05 am, Harold A wrote:


Hello everyone

I am practically new to django and I want to make a word translator 
similar to the google translator, for the translation of my into 
native language into English and Spanish.



So that our native native language is not lost


I would appreciate if you can guide me on how to do it and what tools 
I could use with django to be able to develop the translator or with 
links that have information on the subject.




It is an interesting project. I don't know how Google does it but they 
might tell you if you ask. It is possible also that they might sponsor you.


A concept can be a single word in one language and a complete story in 
another. I might start with a concept record and a self referencing m2m 
through-table perhaps called translate which carries two language name 
fields.


The entire project might only require those two tables. Most if not all 
the meta data would be in the translate through-table. Things like the 
type of concept or explanatory examples in both languages.


You might also permit multiple spellings of the same word if that was 
legitimate in a particular language. That would give the m2m translate 
record the same language at both ends so to speak.


I'm thinking your native language might need to be translated into 
neighboring native languages or dialects which happen to be somewhat 
similar and could therefore link to your original translation into en or es.


Audio and video files could be easily added in a normal fk relationship 
to the translate through-table. You need that because you probably want 
multiple versions of the same video to cater for the multiple video 
formats required by various browsers.


Languages are seriously complex things so if you can simplify the table 
structure I think you make it easier.


Good luck

Mike



Thank you.

--
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/aaa7c780-2a24-4943-94de-bec1b19aee59%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/28c2f4cc-c7d3-7039-2f3f-060c1034797e%40dewhirst.com.au.


Re: Installation of django

2019-08-20 Thread herve bineli
Please, provide the errors you get when trying:

$ pip install --user django

on your shell

On Tue, Aug 20, 2019 at 4:44 PM Amit Samanta 
wrote:

> Hi,
>
> I want to install django in linux server for python 2.7.2.
> i am not able install django
> Please help with the installation step for django in linux.
>
>
> Thanks and Regards
> Amit Samanta
>
> --
> 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/1972eeeb-da5d-4146-94a6-5ba8551a92ea%40googlegroups.com
> 
> .
>


-- 
*BINELI MANGA Hervé Arsène*
Ingénieur Informaticien - ENSPY 2017
binelima...@gmail.com
(+237) 691388922 / 678711903

-- 
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/CAJm63Ok1XR55WVzVG78OjBTrOybVrgykmBX-JzP3MGE6j_wpMA%40mail.gmail.com.


Re: job search

2019-08-20 Thread Shirley Nelson
Try Manhatten Chase. They hire docker developers.

On Tue, Aug 20, 2019, 2:31 PM 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 Kubernetes, AWS or Azure, Front-end development
> (React JS), SQL databases (PostgreSQL) and NoSQL database (MongoDB) AND you
> should have some experience with agile development.
>
>
> I’m talking about the job market in United States.
>
>
>
> On Tuesday, August 20, 2019 at 12:26:15 PM UTC-5, Tessnim Zrayga wrote:
>>
>> Hello,
>> I'm looking for a job as a python developer. Any help? I'm willing to
>> relocate anywhere in the world.
>>
>> Regards.
>>
>> --
>> ZRAYGA Tessnim
>> Python Developer
>> solixy.com
>>
>> Skype: tessnim.zr
>>
> --
> 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/e173ecf2-df9b-49eb-a112-fe1d2046e09f%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/CA%2BN15oZKaFgYsZPuHvXNzn9Z4m5jjvxK5hOhVnXj2DvU8%3Dz3zA%40mail.gmail.com.


Fwd: FW: Byte string error Django cache + celery

2019-08-20 Thread Kai Aeberli
Hi,



When using Django caching backend with celery, I noticed I get an error



“if ord(char) < 33 or ord(char) == 127: TypeError: ord() expected string of
length 1, but int found”



It goes away when I change the yellow highlighted to ‘str(key)’:

-- 
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/CAM4BSWQO5j6xRNMVFLvSdq1KqEzOJbmU%3D6c0wWoLXYdeAexyLg%40mail.gmail.com.


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

2019-08-20 Thread Vishal Parkar
New to Django. Wish to port a web application to Django, which I have already 
developed in PHP & MySQL with the UserSpice framework providing the user 
management. I have modified the registration functionality such that only the 
ones invited using their emails by some already existing users can only 
register. I wish to get the user management functionality readymade and wish to 
be able to modify it as needed.
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/6dbb1187-65c7-4f2a-8413-efc1b84d6268%40googlegroups.com.


Re: job search

2019-08-20 Thread Sam W


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 Kubernetes, AWS or Azure, Front-end development (React 
JS), SQL databases (PostgreSQL) and NoSQL database (MongoDB) AND you should 
have some experience with agile development. 


I’m talking about the job market in United States.

 

On Tuesday, August 20, 2019 at 12:26:15 PM UTC-5, Tessnim Zrayga wrote:
>
> Hello,
> I'm looking for a job as a python developer. Any help? I'm willing to 
> relocate anywhere in the world.
>
> Regards.
>
> -- 
> ZRAYGA Tessnim
> Python Developer
> solixy.com
>
> Skype: tessnim.zr
>

-- 
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/e173ecf2-df9b-49eb-a112-fe1d2046e09f%40googlegroups.com.


Re: Installation of django

2019-08-20 Thread Kasper Laudrup
On August 20, 2019 4:31:32 PM GMT+02:00, Amit Samanta  
wrote:
>Hi,
>
>I want to install django in linux server for python 2.7.2.
>i am not able install django
>Please help with the installation step for django in linux.
>
>
>Thanks and Regards
>Amit Samanta
>
>-- 
>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/1972eeeb-da5d-4146-94a6-5ba8551a92ea%40googlegroups.com.

https://docs.djangoproject.com/en/2.2/faq/install/

-- 
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/C4269602-B8FA-4DFF-87D3-6AA0B6FA0DA9%40stacktrace.dk.


Re: Hello developers

2019-08-20 Thread Kasper Laudrup
On August 20, 2019 11:42:51 AM GMT+02:00, Victor Tumwecj 
 wrote:
>I tried to a shopping cart but it does not add products and total
>amount
>what can I do
>Thank you django community
>
>-- 
>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/CAK%2ByTSUx4hshppLVTHnLQ2-giS7ZW-NxmzUiFzEiFe1UMBKxHg%40mail.gmail.com.

You can share the code if you want anyone to help you.

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/1B0F3F6E-FABD-4BE0-BBC9-FF49A3404E7D%40stacktrace.dk.


job search

2019-08-20 Thread Tessnim Zrayga
Hello,
I'm looking for a job as a python developer. Any help? I'm willing to
relocate anywhere in the world.

Regards.

-- 
ZRAYGA Tessnim
Python Developer
solixy.com

Skype: tessnim.zr

-- 
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/CAHCQKosupno%2BrwQr3dV66a25Le7KfnwSria6Gez9sytZtNDKOA%40mail.gmail.com.


Re: How to refresh part of a Django page with AJAX?

2019-08-20 Thread Gil Obradors
HI

I subscribe all @Joseph said, and add:

For url dispatcher, can you try with very different stamentlist regex? I
think you can't have 2 same regex, or if you want, you may treat this route
inside classview

About AJAX,I can't help no more, I'm newbie with AJAX,

I think that is more interesting return responses as JsonResponse,
Maybe now is complicated to restructure the code, but I think is more
powerful at long time.

Only this suggestion


Thank you  :)






Missatge de Joseph Bacchilega  del dia dl., 19 d’ag.
2019 a les 23:10:

> Do not use alerts to debug your JS code.
>
> Use console.log() and/or debugger while keeping your Chrome/Firefox
> console (opens with F12) open.
>
> In this case, try to see what "data" is set to in the response success
> callback function.
>
> > But then I think it should be set to empty because I don't want to be
> redirected to another url.
>
> $.ajax does not redirect you in any way (that's the point of using $.ajax
> over ). You must specify a URL. Default behavior for empty URL is, I
> think, to query the same URL as the page the user is currently visiting.
>
> Your problem is likely in the URL structure: try to manually visit those
> URLs to see if your views.py log fires, then put that link manually in
> $.ajax and, finally, once you've verified that works, replace the manually
> typed link with the template tag {{ }}.
>
> Il giorno domenica 18 agosto 2019 15:18:47 UTC+2, Xiaoyun Huang ha scritto:
>>
>> I am deploying a website using Django. There is an application called
>> 'forum', supporting a discussion forum on my website.
>>
>> The url of the discussion forum is 'XXX.com/forum/roomY'. I want to
>> refresh a div id = ''chat'', which includes a message list, on this page
>> when users click a refresh button. I want to use AJAX to do that.
>>
>>
>> But I find that I could not call the function
>> updatestatementlist(request) to retrieve the updated message list so it can
>> be passed to the on this page.
>>
>>
>> */forum/views.py def updatestatementlist(request):*
>>
>> log.debug("call statementlist function")
>> statements = Statement.objects.filter(discussion=discussion)return 
>> render(request, 'forum/statementlist.html', {
>> 'statements': statements
>> })
>>
>>
>> I cannot see the log info so I think by clicking the button I fail to
>> call this function.
>>
>>
>> The main html page of the discussion forum is */forum/discussion.html*,
>> which is under the template folder. I extract the html code within the div
>> id = "chat" to a separate html */forum/statementlist.html*as suggested
>> here
>> 
>>  and
>> several other SO posts.
>>
>>
>> */forum/discussion.html*
>>
>>  Refresh 
>> {% include 'forum/statementlist.html' %}
>>
>> */forum/statementlist.html*
>>
>> {% recursetree statements %}{% endrecursetree %}
>>
>> *forum.js*
>>
>> //When users click the refresh button
>> $("#Refresh").on("click", function(event){
>> alert("Refresh clicked")
>> $.ajax({
>> url: '',
>> type: "GET",
>> success: function(data) {
>> alert("success")
>> var html = $(data).filter('#chat').html();
>> $('#chat').html(html);
>> }
>> });});
>>
>>
>> I also tried a few other url in this AJAX request: {% url
>> updatestatementlist %}, {% url 'updatestatementlist' %}. But then I think
>> it should be set to empty because I don't want to be redirected to another
>> url. The discussion forum has a url of 'XXX.com/forum/roomY', by clicking
>> the refresh button on this page I only want to refresh the div and fetch an
>> updated statement list from the server.
>>
>>
>> BTW, I can see the two alerts after I click the button.
>>
>>
>> */forum/urls.py*
>>
>> urlpatterns = [...
>> url(r'^(?P[\w-]{,50})/$', views.discussion_forum, 
>> name='discussion_forum'),
>> url(r'^(?P[\w-]{,50})/$', views.statementlist, name='statementlist'),
>>
>> ]
>>
>>
>> /forum/views.py def discussion_forum() is used to load all the
>> information when the user first arrives at this forum.
>>
>>
>> I guess my problem might be that 1) the AJAX is wrong; 2) the url is
>> wrong so that the updatestatementlist() can not be called.
>>
>>
>> Can anyone help me with that? Thank you so much.
>>
> --
> 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/ac926768-d5af-4ac8-9215-217faedad245%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this 

Re: Facing trouble with djangotoolbox

2019-08-20 Thread Amine Hosni
Have you found any alternative solution please ? I'm stuck right were you 
were...

On Saturday, August 18, 2018 at 3:17:50 PM UTC+2, Sagar wrote:
>
> Hello,
> I am working on project in which I'm using django2 and MongoDB as 
> database. I have used djongo driver to connect django with MongoDB. I don't 
> have any experience with django or MongoDB. This is first time I have use 
> both of these.
> Currently I want to create Embedded documents in MongoDB. To do that I 
> have Installed djangotoolbox. After creating model and writing other code 
> when I run my project It is giving me this error "from 
> django.utils.importlib import import_module ModuleNotFoundError: No module 
> named 'django.utils.importlib'". When I search for this error on google I 
> found this answer 
> https://stackoverflow.com/questions/32761566/django-1-9-importerror-for-import-module.
>  
> This answer is for older versions. 
> Even I tried this answer and then I got this error "from 
> django.db.models.fields.subclassing import Creator ModuleNotFoundError: No 
> module named 'django.db.models.fields.subclassing'".
> Currently I'm stuck in my project. How can I solve this problem? Is there 
> any other alternative way to do this? How to create Embedded documents in 
> MongoDB using this library?
> Here are the versions of frameworks and library I used in my project.
> Django==2.1
> django-rest-framework-mongoengine==3.3.1
> djangorestframework==3.8.2
> djongo==1.2.29
> mongoengine==0.15.3
> pymongo==3.7.1
> djangotoolbox==1.8.0
>
>

-- 
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/a0cc9a31-8700-4ac4-810a-3ba02d7c1501%40googlegroups.com.


Hello developers

2019-08-20 Thread Victor Tumwecj
I tried to a shopping cart but it does not add products and total amount
what can I do
Thank you django community

-- 
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/CAK%2ByTSUx4hshppLVTHnLQ2-giS7ZW-NxmzUiFzEiFe1UMBKxHg%40mail.gmail.com.


Installation of django

2019-08-20 Thread Amit Samanta
Hi,

I want to install django in linux server for python 2.7.2.
i am not able install django
Please help with the installation step for django in linux.


Thanks and Regards
Amit Samanta

-- 
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/1972eeeb-da5d-4146-94a6-5ba8551a92ea%40googlegroups.com.


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

2019-08-20 Thread Jo
I have a Django queryset that I prepare with 

queryset.filter(date__gte=datetime(2011,1,1))


If I then call `str(queryset.query)` I see this in the string:

... WHERE "App_table"."date" >= 2011-1-1

However, this is invalid SQL code as if I run this in Postgresql I get this 
error:

... WHERE "App_table"."date" >= 2011-1-1
ERROR:  operator does not exist: date >= integer
HINT:  No operator matches the given name and argument type(s). You 
might need to add explicit type casts.


Why is this happening and how can I ask Django to output proper SQL code 
that I can work on?


-- 
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/3f7a7f2d-2e3d-4167-8b77-2b1c7da5446d%40googlegroups.com.


Re: Template Does Not Exist

2019-08-20 Thread Naty Mina
*Thank U*


בתאריך יום שלישי, 20 באוגוסט 2019 בשעה 11:07:46 UTC+3, מאת Tosin Ayoola:
>
> D problem is either in ur settings.py file u didn't properly set ur 
> template dir correctly (which u can do as follows in ur settings.py In the 
> template setting section,  set d value of ur  DIR =[os.path.join(BASE_DIR, 
> 'templates'] den create a templates folder either in ur app dir or project 
> dir,  in the templates folder   create another  folder  with the name 
> of your app,  then inside that folder create ur html file)  and make sure 
> in your view u reference the html file as eg return render(request, 
> 'app_name/index.html',  {'value_to_display_in_html_file': 
> value_to_display_in_html_file}), 
> that way 
>
> On Aug 19, 2019 11:47, "Naty Mina" > 
> wrote:
>
>> *,hi guys*
>> finally i could run my project but when i'm trying to open the home page 
>> that built i get error template does not exist 
>> and when i look at the details i see that django.engine looked for the 
>> template when it''s not in.
>> the html file is in the same directory as the views and that's when i 
>> want django to look for it.
>> i need your help to fix that 
>> please
>> i attached files so you can see
>> *THANK YOU*
>>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/b1d04ad5-f3aa-454e-ba3f-8983c9201920%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/c35d975d-9ffa-401d-83ec-4a13ab2ef89d%40googlegroups.com.


Translator of words and phrases in Django

2019-08-20 Thread Harold A
 

Hello everyone

I am practically new to django and I want to make a word translator similar 
to the google translator, for the translation of my into native language 
into English and Spanish.


So that our native native language is not lost


I would appreciate if you can guide me on how to do it and what tools I 
could use with django to be able to develop the translator or with links 
that have information on the subject.


Thank you.

-- 
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/aaa7c780-2a24-4943-94de-bec1b19aee59%40googlegroups.com.


DRF

2019-08-20 Thread Soumen Khatua
Hi Folks,
 after quesry search I want to show exact data in first place then all the
by their length of characters as an example If I''l search for *'the'* then
the sequences will be like:

*the --because matched first*
*they --second record*
*their --third record*
*theirm--fourth record*

I was trying through Django FilterBackend but if the words contain a
anywhere it is filtering that word first.

Guys, Please tell me how i can do that or share me any link.


Thank You

Regards,
Soumen

-- 
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/CAPUw6WaUzwX4S_LMd7W5%3DKXK9Dvc3aHck1tFtYTTsYA11-4k-A%40mail.gmail.com.


Re: Rest framework autocomplete

2019-08-20 Thread Andréas Kühne
If you read the article I sent you he goes through the javascript side and
what you need to do on that side. However the endpoint URL you need to
decide yourself - thats the part restframework helps you with.

Regards,

Andréas


Den tis 20 aug. 2019 kl 11:05 skrev Soumen Khatua :

> Could you tell me how can I configure javascript in my rest api apps.
> Actually I'm new to this area.
>
> Thank you
>
> On Tue, 20 Aug 2019, 13:52 Andréas Kühne, 
> wrote:
>
>> Ok - so what you need to do is configure the endpoint to use the filters
>> and pagination. Then you need to connect to the backend with javascript and
>> populating the results by adding to the dom.
>>
>> Here is something that is more or less what you want to do - however you
>> need the backend code to get this to work:
>>
>> https://blog.teamtreehouse.com/creating-autocomplete-dropdowns-datalist-element
>>
>> Regards,
>>
>> Andréas
>>
>>
>> Den tis 20 aug. 2019 kl 10:15 skrev Soumen Khatua <
>> soumenkhatua...@gmail.com>:
>>
>>> Suppose If I'll type 'A' and database contains some sentences as an
>>> example AABC, ABC, BCA.It should suggest all the names those are contains
>>> A. If I need to javascript then I can configure could you tell me please.
>>>
>>> Thank you for your response.
>>>
>>> On Tue, 20 Aug 2019, 13:33 DANIEL URBANO DE LA RUA, <
>>> dannybombas...@gmail.com> wrote:
>>>
 You will need to load the data first and for the rest use javascript

 On Tue, 20 Aug 2019, 09:56 Andréas Kühne >>> wrote:

> Hi,
>
> This is exactly what you do with filtering and pagination? Could you
> please specify why it doesn't suit your usecase? I need to understand more
> to actually be able to help you :)
>
> Regards,
>
> Andréas
>
>
> Den tis 20 aug. 2019 kl 06:56 skrev Soumen Khatua <
> soumenkhatua...@gmail.com>:
>
>> My query is little bit different suppose I type A in the search box
>> imtjen it should recommend AAA, ABC if they are exist into the database.
>> How I can do that??
>>
>> On Tue, 20 Aug 2019, 09:33 Abu Yusuf, 
>> wrote:
>>
>>> You need to use these both:
>>>
>>> 1.Filter: https://www.django-rest-framework.org/api-guide/filtering/
>>> 2.Pagination:
>>> https://www.django-rest-framework.org/api-guide/pagination/
>>>
>>> On Tue, Aug 20, 2019 at 9:45 AM Soumen Khatua <
>>> soumenkhatua...@gmail.com> wrote:
>>>
 Hi guys,
  I want to implement autocomplete options like if someone type 'a'
 if it is contains in between any data it should provide the suggestion 
 of
 the matched words. Then it will return first 25 matched data, how I 
 can do
 that by using django rest framework. Please help me with source code.

 Thank you in advance

 Regards,
 Soumen

 --
 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/CAPUw6WYDQP5YgDZcHC_e8_c%2BTbs3CNEuxutFtmcvmZF-gqu2xA%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/CACNsr28GTfC8FTyWCzE0JkA4ynoVMpa-T2K%3DOs2uHUOjDxLE_g%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/CAPUw6WbREd%2B8Npdb%2B7%2BpYD1sNVy8yusBdGtnAfa74cWt5%2B7ddA%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 

Re: Rest framework autocomplete

2019-08-20 Thread Soumen Khatua
Could you tell me how can I configure javascript in my rest api apps.
Actually I'm new to this area.

Thank you

On Tue, 20 Aug 2019, 13:52 Andréas Kühne, 
wrote:

> Ok - so what you need to do is configure the endpoint to use the filters
> and pagination. Then you need to connect to the backend with javascript and
> populating the results by adding to the dom.
>
> Here is something that is more or less what you want to do - however you
> need the backend code to get this to work:
>
> https://blog.teamtreehouse.com/creating-autocomplete-dropdowns-datalist-element
>
> Regards,
>
> Andréas
>
>
> Den tis 20 aug. 2019 kl 10:15 skrev Soumen Khatua <
> soumenkhatua...@gmail.com>:
>
>> Suppose If I'll type 'A' and database contains some sentences as an
>> example AABC, ABC, BCA.It should suggest all the names those are contains
>> A. If I need to javascript then I can configure could you tell me please.
>>
>> Thank you for your response.
>>
>> On Tue, 20 Aug 2019, 13:33 DANIEL URBANO DE LA RUA, <
>> dannybombas...@gmail.com> wrote:
>>
>>> You will need to load the data first and for the rest use javascript
>>>
>>> On Tue, 20 Aug 2019, 09:56 Andréas Kühne >> wrote:
>>>
 Hi,

 This is exactly what you do with filtering and pagination? Could you
 please specify why it doesn't suit your usecase? I need to understand more
 to actually be able to help you :)

 Regards,

 Andréas


 Den tis 20 aug. 2019 kl 06:56 skrev Soumen Khatua <
 soumenkhatua...@gmail.com>:

> My query is little bit different suppose I type A in the search box
> imtjen it should recommend AAA, ABC if they are exist into the database.
> How I can do that??
>
> On Tue, 20 Aug 2019, 09:33 Abu Yusuf, 
> wrote:
>
>> You need to use these both:
>>
>> 1.Filter: https://www.django-rest-framework.org/api-guide/filtering/
>> 2.Pagination:
>> https://www.django-rest-framework.org/api-guide/pagination/
>>
>> On Tue, Aug 20, 2019 at 9:45 AM Soumen Khatua <
>> soumenkhatua...@gmail.com> wrote:
>>
>>> Hi guys,
>>>  I want to implement autocomplete options like if someone type 'a'
>>> if it is contains in between any data it should provide the suggestion 
>>> of
>>> the matched words. Then it will return first 25 matched data, how I can 
>>> do
>>> that by using django rest framework. Please help me with source code.
>>>
>>> Thank you in advance
>>>
>>> Regards,
>>> Soumen
>>>
>>> --
>>> 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/CAPUw6WYDQP5YgDZcHC_e8_c%2BTbs3CNEuxutFtmcvmZF-gqu2xA%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/CACNsr28GTfC8FTyWCzE0JkA4ynoVMpa-T2K%3DOs2uHUOjDxLE_g%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/CAPUw6WbREd%2B8Npdb%2B7%2BpYD1sNVy8yusBdGtnAfa74cWt5%2B7ddA%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/CAK4qSCdi4C6SgddGTD2gNHc%2ByVwZZ78DLV%3D_GWy%2BZzB0L1nmsA%40mail.gmail.com
 
 .

>>> --
>>> You received this message 

Re: Rest framework autocomplete

2019-08-20 Thread Andréas Kühne
Ok - so what you need to do is configure the endpoint to use the filters
and pagination. Then you need to connect to the backend with javascript and
populating the results by adding to the dom.

Here is something that is more or less what you want to do - however you
need the backend code to get this to work:
https://blog.teamtreehouse.com/creating-autocomplete-dropdowns-datalist-element

Regards,

Andréas


Den tis 20 aug. 2019 kl 10:15 skrev Soumen Khatua :

> Suppose If I'll type 'A' and database contains some sentences as an
> example AABC, ABC, BCA.It should suggest all the names those are contains
> A. If I need to javascript then I can configure could you tell me please.
>
> Thank you for your response.
>
> On Tue, 20 Aug 2019, 13:33 DANIEL URBANO DE LA RUA, <
> dannybombas...@gmail.com> wrote:
>
>> You will need to load the data first and for the rest use javascript
>>
>> On Tue, 20 Aug 2019, 09:56 Andréas Kühne > wrote:
>>
>>> Hi,
>>>
>>> This is exactly what you do with filtering and pagination? Could you
>>> please specify why it doesn't suit your usecase? I need to understand more
>>> to actually be able to help you :)
>>>
>>> Regards,
>>>
>>> Andréas
>>>
>>>
>>> Den tis 20 aug. 2019 kl 06:56 skrev Soumen Khatua <
>>> soumenkhatua...@gmail.com>:
>>>
 My query is little bit different suppose I type A in the search box
 imtjen it should recommend AAA, ABC if they are exist into the database.
 How I can do that??

 On Tue, 20 Aug 2019, 09:33 Abu Yusuf, 
 wrote:

> You need to use these both:
>
> 1.Filter: https://www.django-rest-framework.org/api-guide/filtering/
> 2.Pagination:
> https://www.django-rest-framework.org/api-guide/pagination/
>
> On Tue, Aug 20, 2019 at 9:45 AM Soumen Khatua <
> soumenkhatua...@gmail.com> wrote:
>
>> Hi guys,
>>  I want to implement autocomplete options like if someone type 'a' if
>> it is contains in between any data it should provide the suggestion of 
>> the
>> matched words. Then it will return first 25 matched data, how I can do 
>> that
>> by using django rest framework. Please help me with source code.
>>
>> Thank you in advance
>>
>> Regards,
>> Soumen
>>
>> --
>> 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/CAPUw6WYDQP5YgDZcHC_e8_c%2BTbs3CNEuxutFtmcvmZF-gqu2xA%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/CACNsr28GTfC8FTyWCzE0JkA4ynoVMpa-T2K%3DOs2uHUOjDxLE_g%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/CAPUw6WbREd%2B8Npdb%2B7%2BpYD1sNVy8yusBdGtnAfa74cWt5%2B7ddA%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/CAK4qSCdi4C6SgddGTD2gNHc%2ByVwZZ78DLV%3D_GWy%2BZzB0L1nmsA%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
>> 

Re: Rest framework autocomplete

2019-08-20 Thread Soumen Khatua
Suppose If I'll type 'A' and database contains some sentences as an example
AABC, ABC, BCA.It should suggest all the names those are contains A. If I
need to javascript then I can configure could you tell me please.

Thank you for your response.

On Tue, 20 Aug 2019, 13:33 DANIEL URBANO DE LA RUA, <
dannybombas...@gmail.com> wrote:

> You will need to load the data first and for the rest use javascript
>
> On Tue, 20 Aug 2019, 09:56 Andréas Kühne  wrote:
>
>> Hi,
>>
>> This is exactly what you do with filtering and pagination? Could you
>> please specify why it doesn't suit your usecase? I need to understand more
>> to actually be able to help you :)
>>
>> Regards,
>>
>> Andréas
>>
>>
>> Den tis 20 aug. 2019 kl 06:56 skrev Soumen Khatua <
>> soumenkhatua...@gmail.com>:
>>
>>> My query is little bit different suppose I type A in the search box
>>> imtjen it should recommend AAA, ABC if they are exist into the database.
>>> How I can do that??
>>>
>>> On Tue, 20 Aug 2019, 09:33 Abu Yusuf, 
>>> wrote:
>>>
 You need to use these both:

 1.Filter: https://www.django-rest-framework.org/api-guide/filtering/
 2.Pagination:
 https://www.django-rest-framework.org/api-guide/pagination/

 On Tue, Aug 20, 2019 at 9:45 AM Soumen Khatua <
 soumenkhatua...@gmail.com> wrote:

> Hi guys,
>  I want to implement autocomplete options like if someone type 'a' if
> it is contains in between any data it should provide the suggestion of the
> matched words. Then it will return first 25 matched data, how I can do 
> that
> by using django rest framework. Please help me with source code.
>
> Thank you in advance
>
> Regards,
> Soumen
>
> --
> 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/CAPUw6WYDQP5YgDZcHC_e8_c%2BTbs3CNEuxutFtmcvmZF-gqu2xA%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/CACNsr28GTfC8FTyWCzE0JkA4ynoVMpa-T2K%3DOs2uHUOjDxLE_g%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/CAPUw6WbREd%2B8Npdb%2B7%2BpYD1sNVy8yusBdGtnAfa74cWt5%2B7ddA%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/CAK4qSCdi4C6SgddGTD2gNHc%2ByVwZZ78DLV%3D_GWy%2BZzB0L1nmsA%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/CAO_yRT31RDrX7n4npVE%2BrJJOzByYqJf1uKaY6Mb1V2PG9EMVqw%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 

Re: Template Does Not Exist

2019-08-20 Thread Tosin Ayoola
D problem is either in ur settings.py file u didn't properly set ur
template dir correctly (which u can do as follows in ur settings.py In the
template setting section,  set d value of ur  DIR =[os.path.join(BASE_DIR,
'templates'] den create a templates folder either in ur app dir or project
dir,  in the templates folder   create another  folder  with the name
of your app,  then inside that folder create ur html file)  and make sure
in your view u reference the html file as eg return render(request,
'app_name/index.html',  {'value_to_display_in_html_file':
value_to_display_in_html_file}),
that way

On Aug 19, 2019 11:47, "Naty Mina"  wrote:

> *,hi guys*
> finally i could run my project but when i'm trying to open the home page
> that built i get error template does not exist
> and when i look at the details i see that django.engine looked for the
> template when it''s not in.
> the html file is in the same directory as the views and that's when i want
> django to look for it.
> i need your help to fix that
> please
> i attached files so you can see
> *THANK YOU*
>
> --
> 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/b1d04ad5-f3aa-454e-ba3f-8983c9201920%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/CAHLKn706xaKMn3g3DgN49kK6kbCQNz7KNe_qCu8_J9B0ryFgfw%40mail.gmail.com.


Re: Rest framework autocomplete

2019-08-20 Thread DANIEL URBANO DE LA RUA
You will need to load the data first and for the rest use javascript

On Tue, 20 Aug 2019, 09:56 Andréas Kühne  Hi,
>
> This is exactly what you do with filtering and pagination? Could you
> please specify why it doesn't suit your usecase? I need to understand more
> to actually be able to help you :)
>
> Regards,
>
> Andréas
>
>
> Den tis 20 aug. 2019 kl 06:56 skrev Soumen Khatua <
> soumenkhatua...@gmail.com>:
>
>> My query is little bit different suppose I type A in the search box
>> imtjen it should recommend AAA, ABC if they are exist into the database.
>> How I can do that??
>>
>> On Tue, 20 Aug 2019, 09:33 Abu Yusuf,  wrote:
>>
>>> You need to use these both:
>>>
>>> 1.Filter: https://www.django-rest-framework.org/api-guide/filtering/
>>> 2.Pagination:
>>> https://www.django-rest-framework.org/api-guide/pagination/
>>>
>>> On Tue, Aug 20, 2019 at 9:45 AM Soumen Khatua 
>>> wrote:
>>>
 Hi guys,
  I want to implement autocomplete options like if someone type 'a' if
 it is contains in between any data it should provide the suggestion of the
 matched words. Then it will return first 25 matched data, how I can do that
 by using django rest framework. Please help me with source code.

 Thank you in advance

 Regards,
 Soumen

 --
 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/CAPUw6WYDQP5YgDZcHC_e8_c%2BTbs3CNEuxutFtmcvmZF-gqu2xA%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/CACNsr28GTfC8FTyWCzE0JkA4ynoVMpa-T2K%3DOs2uHUOjDxLE_g%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/CAPUw6WbREd%2B8Npdb%2B7%2BpYD1sNVy8yusBdGtnAfa74cWt5%2B7ddA%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/CAK4qSCdi4C6SgddGTD2gNHc%2ByVwZZ78DLV%3D_GWy%2BZzB0L1nmsA%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/CAO_yRT31RDrX7n4npVE%2BrJJOzByYqJf1uKaY6Mb1V2PG9EMVqw%40mail.gmail.com.


Re: Rest framework autocomplete

2019-08-20 Thread Andréas Kühne
Hi,

This is exactly what you do with filtering and pagination? Could you please
specify why it doesn't suit your usecase? I need to understand more to
actually be able to help you :)

Regards,

Andréas


Den tis 20 aug. 2019 kl 06:56 skrev Soumen Khatua :

> My query is little bit different suppose I type A in the search box imtjen
> it should recommend AAA, ABC if they are exist into the database. How I can
> do that??
>
> On Tue, 20 Aug 2019, 09:33 Abu Yusuf,  wrote:
>
>> You need to use these both:
>>
>> 1.Filter: https://www.django-rest-framework.org/api-guide/filtering/
>> 2.Pagination: https://www.django-rest-framework.org/api-guide/pagination/
>>
>> On Tue, Aug 20, 2019 at 9:45 AM Soumen Khatua 
>> wrote:
>>
>>> Hi guys,
>>>  I want to implement autocomplete options like if someone type 'a' if it
>>> is contains in between any data it should provide the suggestion of the
>>> matched words. Then it will return first 25 matched data, how I can do that
>>> by using django rest framework. Please help me with source code.
>>>
>>> Thank you in advance
>>>
>>> Regards,
>>> Soumen
>>>
>>> --
>>> 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/CAPUw6WYDQP5YgDZcHC_e8_c%2BTbs3CNEuxutFtmcvmZF-gqu2xA%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/CACNsr28GTfC8FTyWCzE0JkA4ynoVMpa-T2K%3DOs2uHUOjDxLE_g%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/CAPUw6WbREd%2B8Npdb%2B7%2BpYD1sNVy8yusBdGtnAfa74cWt5%2B7ddA%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/CAK4qSCdi4C6SgddGTD2gNHc%2ByVwZZ78DLV%3D_GWy%2BZzB0L1nmsA%40mail.gmail.com.


Django Rest Framework

2019-08-20 Thread Soumen Khatua
Hi Folks,
In my Django model I have one column as *name* and my query is if name is
matched in search filter then it  should appear first then  all the records
by their length size and also by the most number of use.Please tell me How
I can do that.


Thank You

Regards,
Soumen

-- 
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/CAPUw6WZ6%3DOrfp40eru8xs1OvTqp7WZPR4Y47FJqhtKYzJcQHVg%40mail.gmail.com.