Re: Django Sitemap on heroku error h13

2020-09-13 Thread dum dum
Update for this case: I fixed the h13 error by limiting records that I pulled from database. I still don't understand yet why heroku gave me that error, maybe because the server spec is not good enough for my data that has lot rows to pulled. I'm using heroku hobby-basic. Firefox: I open domain/si

Re: I am getting this error while I mention all syntax properly.plz help me out.

2020-09-13 Thread amr
Change (href="{% url 'your_app_name:post_detail' post.id %}") == post.id not post.pk and change (post=Post.objects.get(Post, pk=pk)) ==> TO (post=Post.objects.get(pk=pk) ... And it will work with you On Saturday, September 12, 2020 at 6:37:41 PM UTC+2 coolguy wrote: > Please provide

Re: A beginner question

2020-09-13 Thread Emmanuel Oppong Ntiamoah
https://www.youtube.com/playlist?list=PL6gx4Cwl9DGBlmzzFcLgDhKTTfNLfX1IK Sent from my iPhone > On 13 Sep 2020, at 12:17 PM, negin hajilou wrote: > > Hi, I'm a beginner, just now I installed Django, how can I use it?? > -- > You received this message because you are subscribed to the Google Gr

Re: AttributeError: object has no attribute 'user' while trying to access instance.user.id

2020-09-13 Thread coolguy
not sure about the purpose of showing that example in Django documentation while its comments are clear that "object will not have been saved to the database yet, so if it uses the default AutoField, *it might not yet have a value for its primary key field*." so that's the reason for having Non

Re: Help:What is the problem in this code?

2020-09-13 Thread Kasper Laudrup
Hi Hassan, There's nothing wrong with this code. It's just that it's only valid in Python 3, so you're probably using a Python 2 interpreter. Without really knowing what you're trying to do, I'd suggest you start out by following the "getting started" documentation carefully instead of getti

Re: AttributeError: object has no attribute 'user' while trying to access instance.user.id

2020-09-13 Thread coolguy
May the purpose of showing that example in Django documentation is something else. If you read the comments there , there is a potential issue that the instance that they suggest to use mostly would have not been persisted in the database if AutoField has been used. so there will be 'no' id as

Re: Using FormMixin with DetailView

2020-09-13 Thread latu...@gmail.com
Hello Abdu, I haven't used FormViews in years, there have been major Django versions released since this was posted, some of the advice here may no longer be relevant. Sorry I can't help more. On Monday, 7 September 2020 at 23:02:45 UTC+1 Abdu-H wrote: > > Hello, i realise this is a very old po

Re: Help:What is the problem in this code?

2020-09-13 Thread RANGA BHARATH JINKA
Hi, Create a virtual environment and install django in a virtual environment. All the best On Sun, Sep 13, 2020 at 9:11 PM Hassan Shuvo wrote: > [image: manage.PNG][image: code.PNG] > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group.

Help:What is the problem in this code?

2020-09-13 Thread Hassan Shuvo
[image: manage.PNG][image: code.PNG] -- 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 we

Re: HELP With Scraping and Storing Data to DB from a Search Engine!!

2020-09-13 Thread Thomas Lockhart
Use Python and Beautiful Soup for scraping in an external program. Then send the results to your Django app using the Django Rest Framework JSON API. If you need your scraping program to get candidate sites from your app, then use the DRF API to get those. hth - Tom > On Sep 13, 2020, at 1:39

How do I make a pre-selectable city and country pairs which will be stored in a model?

2020-09-13 Thread Mislav Jurić
Hey guys, I want to make a drop-down list of all city an country pairs (such as New York, USA) where the user, upon registration, will be able to select the (city, country) pairs from all over Europe and then I want to store that in one of my models. *How do I accomplish this (both front-end and

Re: A beginner question

2020-09-13 Thread Kasper Laudrup
Hi Negin, On 13/09/2020 13.22, negin hajilou wrote: Hi, I'm a beginner, just now I installed Django, how can I use it?? Most serious software projects have a section on their homepage called "documentation". Django is no exception: https://docs.djangoproject.com/en/3.1/intro/ Kind regards

Re: HELP With Scraping and Storing Data to DB from a Search Engine!!

2020-09-13 Thread Kasper Laudrup
Hi Raheel, On 13/09/2020 10.39, Raheel Asghar wrote: I am working on a project where i require to search for data related to shopping, save it to my DB and show it to my users. But I cant find a way to do so. PLEASE HELP That is extremely vague to put it mildly. You'll have a much better c

A beginner question

2020-09-13 Thread negin hajilou
Hi, I'm a beginner, just now I installed Django, how can I use it?? -- 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

HELP With Scraping and Storing Data to DB from a Search Engine!!

2020-09-13 Thread Raheel Asghar
I am working on a project where i require to search for data related to shopping, save it to my DB and show it to my users. But I cant find a way to do so. PLEASE HELP -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this gr

Re: AttributeError: object has no attribute 'user' while trying to access instance.user.id

2020-09-13 Thread Mislav Jurić
Hey coolguy, thanks for responding. After I changed that line as you suggested that error is solved, *but when I add the user through the admin interface, I get None as the ID* (the folder that gets created in the */media/users* is titled *None*). I'm not sure if this is expected behavior. I h

Re: Installation errors

2020-09-13 Thread Odeyale Kehinde
Thanks Kasper Thanks Danish On Saturday, September 12, 2020 at 5:29:16 PM UTC+1 mailto...@gmail.com wrote: > *trying using virtual env* > *>pipenv install* > *>pipenv shell* > *>pipenv install django* > > On Sat, Sep 12, 2020 at 8:07 PM Odeyale Kehinde wrote: > >> I want to install Django on my