Re: http://localhost:8000/admin/ is not working

2020-06-15 Thread cosmos multi
This add in url? El mar., 16 jun. 2020, 1:47 a. m., Ifeanyi Chielo escribió: > Please can anyone help me resolve this issue. the > http://localhost:8000/admin/ is not working and returns an error below > > TypeError at /admin/Cannot mix str and non-str argumentsRequest Method: > GETRequest URL:

http://localhost:8000/admin/ is not working

2020-06-15 Thread Ifeanyi Chielo
Please can anyone help me resolve this issue. the http://localhost:8000/admin/ is not working and returns an error below TypeError at /admin/Cannot mix str and non-str argumentsRequest Method: GETRequest URL: http://localhost:8000/admin/Django Version: 2.1.5Exception Type: TypeErrorException Valu

Trying to filter data based on start and end date

2020-06-15 Thread Benedict Uwazie
I am using django filter package to filter data based on start, end date and class of dues fields defined in my models. The problem is If I select only class_of_fields data is filtered but when I select start and end_date along with class_of_

Re: How to add a user ratings feature in djnago application?

2020-06-15 Thread learn code
Hi, Thank you!! On Mon, Jun 15, 2020, 6:27 PM Kelvin Sajere wrote: > > > On Tue, Jun 16, 2020 at 02:22 learn code wrote: > >> Hi, >> >> Thank you for your reply,sorry ,still I didn't understand how to add >> ratings. >> >> On Sat, Jun 13, 2020, 2:29 PM Gs_1001 wrote: >> >>> Hey, >>> >>> A rat

Re: Capture Content Id

2020-06-15 Thread Kelvin Sajere
On Tue, Jun 16, 2020 at 02:33 Kelvin Sajere wrote: > > > On Tue, Jun 16, 2020 at 02:00 Soumen Khatua > wrote: > >> Thank you for your response. >> >> On Tue 16 Jun, 2020, 6:29 AM Soumen Khatua, >> wrote: >> >>> Yeah but in this way the time complexity will be very high, just think >>> if I'll h

Re: Capture Content Id

2020-06-15 Thread Kelvin Sajere
On Tue, Jun 16, 2020 at 02:00 Soumen Khatua wrote: > Thank you for your response. > > On Tue 16 Jun, 2020, 6:29 AM Soumen Khatua, > wrote: > >> Yeah but in this way the time complexity will be very high, just think if >> I'll have more than 1 million post than it will check all the field if it >

Re: How to add a user ratings feature in djnago application?

2020-06-15 Thread Kelvin Sajere
On Tue, Jun 16, 2020 at 02:22 learn code wrote: > Hi, > > Thank you for your reply,sorry ,still I didn't understand how to add > ratings. > > On Sat, Jun 13, 2020, 2:29 PM Gs_1001 wrote: > >> Hey, >> >> A rating feature for a peer reviewed books website would look somewhat >> like: >> - A books

Re: How to add a user ratings feature in djnago application?

2020-06-15 Thread learn code
Hi, Thank you for your reply,sorry ,still I didn't understand how to add ratings. On Sat, Jun 13, 2020, 2:29 PM Gs_1001 wrote: > Hey, > > A rating feature for a peer reviewed books website would look somewhat > like: > - A books model having "no_of_reviews" and "rating" field > > Every time a u

Re: Capture Content Id

2020-06-15 Thread Soumen Khatua
Thank you for your response. On Tue 16 Jun, 2020, 6:29 AM Soumen Khatua, wrote: > Yeah but in this way the time complexity will be very high, just think if > I'll have more than 1 million post than it will check all the field if it > is available or not. > However my query is different I want to

Re: Capture Content Id

2020-06-15 Thread Soumen Khatua
Yeah but in this way the time complexity will be very high, just think if I'll have more than 1 million post than it will check all the field if it is available or not. However my query is different I want to fetch the data based on ID only but I want to make url as slug name, so it means the func

Django and Djongo Issue

2020-06-15 Thread George Hadjigeorgiou
Hi everyone, I have been trying to use Djongo as my database engine to connect my Django application with a MongoDB database. However, I am facing a lot of issues during a procedure that from tutorials and the djongo documentation seems straightforward. The first issue that I managed to resolv

Re: Capture Content Id

2020-06-15 Thread Kelvin Sajere
On Mon, Jun 15, 2020 at 08:54 Soumen Khatua wrote: > Could you give me an example?? > > On Mon, Jun 15, 2020 at 1:21 PM Kayode Oladipo > wrote: > >> There's an id field built into every Django model (aka, the primary key >> (pk)) >> >> Just do, ModelInstance.id and that should do the trick. >> >

Re: Capture Content Id

2020-06-15 Thread Kelvin Sajere
I think I kinda understand what you want to achieve here. You want to use a slug field, but you are wondering what happens when two posts have the same slug name. Here is what I do. On your model. class Post(models.Model): title = models.CharField(max_length=50) slug = models.CharField(max

Re: Need help

2020-06-15 Thread Kelvin Sajere
On Sun, Jun 14, 2020 at 19:38 Deborah wrote: > good evening > the tags that I use in the html file, appear on browsers when I launch the > server, what to do ??? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this g

Re: Need your help!!

2020-06-15 Thread Kelvin Sajere
One of the main advantages of using a web framework or any framework for that matter is that it takes away most of the stress of having to figure out how to secure your application. Django is maintained and developed by some of the best developers in the industry, so they already took care of most

Re: Need your help!!

2020-06-15 Thread kuldeep singh
create secure Superuser On Monday, 15 June 2020 09:59:56 UTC-7, meera gangani wrote: > > Hello , > > How to apply security in django application and how to > secure django applications > > Thanks in advance > -Meera Gangani > -- You received this message because you are subs

Re: Django Saving a form with Imagefield on shared host

2020-06-15 Thread Kelvin Sajere
Did you specify a folder to use for media when you deployed your app? If so, then make sure it's where you are supposed to have your media folder. If it's a single hosting, then it should be in the public_html folder, but on multiple hosting, it should be in the domain-specific folder. I never real

Re: Capture Content Id

2020-06-15 Thread Kelvin Sajere
I forgot that you need to import this from django.utils.text import slugify On Mon, Jun 15, 2020 at 6:35 PM Kelvin Sajere wrote: > I think I kinda understand what you want to achieve here. You want to use > a slug field, but you are wondering what happens when two posts have the > same slug nam

Django and Djongo

2020-06-15 Thread George Hadjigeorgiou
Hi everyone, I have been trying to use Djongo as my database engine to connect my Django application with a MongoDB database. However, I am facing a lot of issues during a procedure that from tutorials and the djongo documentation seems straightforward. The first issue that I managed to resolv

Re: urls 1.11 use task how to use 3.0.6 version

2020-06-15 Thread Kelvin Sajere
You can now easily write your URL patterns like this. from django.urls import path urlpatterns = [ path("", someview, name="somename") ] On Mon, Jun 15, 2020 at 5:52 PM Kayode Oladipo wrote: > Use the path( ) method. > > from django.urls import path > > path('',...) > > On Mon, Jun 15, 20

Re: Updating the concept of Django

2020-06-15 Thread Kelvin Sajere
On Mon, Jun 15, 2020 at 14:21 temitope iyanoye wrote: > Hi everyone, I’m a newbie and I understand the basic syntax of python to > some extents, I have a thing for web development so I chose to learn Django > for backend dev but for like a week the whole thing looks strange to me, I > following Y

Re: Need your help!!

2020-06-15 Thread Chetan Ganji
https://docs.djangoproject.com/en/3.0/topics/security/ On Mon, Jun 15, 2020, 10:59 PM Vishesh Mangla wrote: > What kind of security? > > > > Sent from Mail for > Windows 10 > > > > *From: *meera gangani > *Sent: *15 June 2020 22:28 > *To: *django

RE: Need your help!!

2020-06-15 Thread Vishesh Mangla
What kind of security? Sent from Mail for Windows 10 From: meera ganganiSent: 15 June 2020 22:28To: django-users@googlegroups.comSubject: Need your help!! Hello ,                  How to apply security in django application and  how to secure django applications Thanks in advance -Meera Gangani-- Y

Need your help!!

2020-06-15 Thread meera gangani
Hello , How to apply security in django application and how to secure django applications Thanks in advance -Meera Gangani -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emai

Re: urls 1.11 use task how to use 3.0.6 version

2020-06-15 Thread Kayode Oladipo
Use the path( ) method. from django.urls import path path('',...) On Mon, Jun 15, 2020, 2:21 PM Adya Mit wrote: > (?P\d+)/$ django > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emai

Re: Updating the concept of Django

2020-06-15 Thread Dan Davis
Since Django is written in Python, you should know enough Python to understand it do really good code. If you are well versed in other computer languages, I recommend the book Fluent Python. It is not for newbies to programming however. I find the Django Tutorial from the project itself, https

Path parameters and security scanners best practice

2020-06-15 Thread Dan Davis
I have an odd question. When I have a path parameter that is validated to be alphanumeric, and a security scanner sends a non-alphanumeric value, Django properly validates and then returns 404. However, this gives the security scanner the mistaken impression that there is some some sort of s

Re: I need to know how to optimize this?

2020-06-15 Thread Himanshu Pharawal
After reading 1. Annotation 2. In field lookup 3. Aggregate function 4. Subquery this is the best i come across. #views.py sub = Subquery(user[0].intrests.annotate(key=Lower('keyword')).values('key' )) sponsored_books = models.SponsoredBook.objects.annotate(tit=Lower( 'keywords__title')).filter(ti

urls 1.11 use task how to use 3.0.6 version

2020-06-15 Thread Adya Mit
(?P\d+)/$ 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://gr

cant be able to setup GDAL in django prject

2020-06-15 Thread Puneet Makhija
As i am Stuck in this Error from 2 days. But cant get the Solution why this was Happening I am getting an Error: self._handle = _dlopen(self._name, mode) indusli | OSError: /usr/local/lib/libgdal.so: cannot open shared object file: No such file or directory And below is my django se

Updating the concept of Django

2020-06-15 Thread temitope iyanoye
Hi everyone, I’m a newbie and I understand the basic syntax of python to some extents, I have a thing for web development so I chose to learn Django for backend dev but for like a week the whole thing looks strange to me, I following YouTube tutorials but am not getting it yet, so please I need

Re: Need help

2020-06-15 Thread Kumar Shantanu
My best guess you are trying to open the HTML file from your storage and not trying to access it by putting the server on Try using ::: py manage.py runserver to run the server and then try to access your page using your browser cheers :) On Mon, Jun 15, 2020 at 9:39 AM RANGA BHARATH J

Online documentation issues

2020-06-15 Thread Marcin
Hi. It seems that "Search" does not work anymore on the https://docs.djangoproject.com/en/3.0/. Please try https://docs.djangoproject.com/en/3.0/search/?q=signals or something else. Also there is a huge (1/3 of the screen) info about info against racism, which is generally good (the statement

Django 3.1 beta 1 released

2020-06-15 Thread Mariusz Felisiak
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2020/jun/15/django-31-beta-1-released/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, s

Django 3.1 beta 1 released

2020-06-15 Thread Mariusz Felisiak
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2020/jun/15/django-31-beta-1-released/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, se

Django 3.1 beta 1 released

2020-06-15 Thread Mariusz Felisiak
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2020/jun/15/django-31-beta-1-released/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, se

Re: Capture Content Id

2020-06-15 Thread Soumen Khatua
Could you give me an example?? On Mon, Jun 15, 2020 at 1:21 PM Kayode Oladipo wrote: > There's an id field built into every Django model (aka, the primary key > (pk)) > > Just do, ModelInstance.id and that should do the trick. > > Cheers. > > On Mon, Jun 15, 2020, 8:03 AM Soumen Khatua > wrote:

Re: Capture Content Id

2020-06-15 Thread Kayode Oladipo
There's an id field built into every Django model (aka, the primary key (pk)) Just do, ModelInstance.id and that should do the trick. Cheers. On Mon, Jun 15, 2020, 8:03 AM Soumen Khatua wrote: > Hi Folks, > > I have one Blog post project here user can see the blog and by clicking on > the blog

Capture Content Id

2020-06-15 Thread Soumen Khatua
Hi Folks, I have one Blog post project here user can see the blog and by clicking on the blog title they can see the details of the blog, so here Slug will be working here as a URL,but in the details view, How I can fetch that particular content details without having the ID because slug/title is