Having ERROR running Django project !!!
Hello I was creating a Djnago project and when I finish it, it was working perfectly but when I start adding ("name"/"text"/"information") to models from admin page, It stops working I mean after adding I can't open my home page. *If I will try to open it, it auto downloads unknown file*. *I NEED HELP AS SOON AS POSSIBLE* !!! Thank u. -- 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 post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ff450a0d-4e9a-47b6-a132-3e216fbd98ef%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Having ERROR running Django project !!!
I see no logs error and When I run it from chrome this error happens but when I try to use it from Internet e.version~9 it works normally, I can deal with it but also when I deploy to pythonanywhere there is error too. Yes I run it "python manage.py runserver" -- 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 post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9f87ff07-373b-4f8b-9ef5-3aa85710a563%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Having ERROR running Django project !!!
> > It is unknown and When I try to open it, it shows programs to open with > I'm choosing chrome and my site opens without css/static/js I think that is > html file > DEBUG = True Can you tell me what files you need because I have a lot of files.setting.py? / wsgi.py? / urls.py? / template HTMLs? -- 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 post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/464be6ef-d95b-4b69-95f8-043c5d772751%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Having ERROR running Django project !!!
https://github.com/XJoma/mk-center1 django version 1.11.5 now you have my project. So fix my problem plz !!! It is my first time uploading so I don't know how to not show my password -- 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 post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b7fe9ec3-a369-4051-89ca-fa76a818f522%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Having ERROR running Django project !!!
Can you 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 post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/46a977ea-0582-44c0-bb9a-5de39b0654c1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Having ERROR running Django project !!!
Thank you! On Thursday, March 29, 2018 at 8:07:07 PM UTC+6, Jani Tiainen wrote: > > Yes. I managed to "fix" your code., > > https://github.com/XJoma/mk-center1/blob/master/home/views.py#L47 > > Firstm never, ever pass locals() anywhere it's best way to introduce a lot > of bugs. Also you have quite a good record of from foo import * which is as > bad as well. > > But your problem is that fourth parameter to render() is actually > content_type. Now you're passing total garbage for content_type which > causes browser to think that incoming data is something it can't handle and > downloads it. > > There is no parameter that would fit anything what could take another dict > besides context which you're already passing in. > > > On Thu, Mar 29, 2018 at 3:03 PM, Jamaldin Pro > wrote: > >> Can you 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...@googlegroups.com . >> To post to this group, send email to django...@googlegroups.com >> . >> Visit this group at https://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/46a977ea-0582-44c0-bb9a-5de39b0654c1%40googlegroups.com >> >> <https://groups.google.com/d/msgid/django-users/46a977ea-0582-44c0-bb9a-5de39b0654c1%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Jani Tiainen > > - Well planned is half done, and a half done has been sufficient before... > -- 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 post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/48c845ee-88ec-47dd-b67b-fafb6b8f2387%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Filtering Queryset by Foreign Key Properties
> > class ProductType(models.Model): > class Meta: > verbose_name_plural = 'тип' > verbose_name = 'типы' > > image = models.ImageField(upload_to='products_type_images/') > name = models.CharField(max_length=20, blank=True, null=True, > default=None) > is_active = models.BooleanField(default=True) > > def __str__(self): > return "%s" % self.name > > > class Product(models.Model): > class Meta: > verbose_name_plural = 'запчасть' > verbose_name = 'запчасти' > > name = models.CharField(max_length=20) > price = models.DecimalField(max_digits=10, decimal_places=2, default=0) > short_description = models.TextField(blank=True, null=True, default=None, > max_length=100) > description = models.TextField(blank=True, null=True, default=None) > is_active = models.BooleanField(default=True) > type = models.ForeignKey(ProductType, blank=True, null=True, default=None) > > def __str__(self): > return "(%s, %s)" % (self.id, self.name) > > > class ProductImage(models.Model): > class Meta: > verbose_name_plural = 'фотография_запчасти' > verbose_name = 'фотографии_запчасти' > > product = models.ForeignKey(Product, blank=True, null=True, default=None) > image = models.ImageField(upload_to='products_images/') > is_main = models.BooleanField(default=False) > is_active = models.BooleanField(default=True) > created = models.DateTimeField(default=timezone.now) > > def category(request, category_name): # products_images_list = get_object_or_404(Product, id=category_name) query = request.GET.get("q") if query: products_images_list = ProductImage.objects.filter( product__type__name__contains=query) But in my template this is not working I want to filter my product's types. Can you help my? Django 1.11 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 post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b501d828-0876-4bff-9eca-b667e11898fe%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Filtering Queryset by Foreign Key Properties
> > class ProductType(models.Model): > > image = models.ImageField(upload_to='products_type_images/') > name = models.CharField(max_length=20, blank=True, null=True, > default=None) > is_active = models.BooleanField(default=True) > > def __str__(self): > return "%s" % self.name > > > class Product(models.Model): > > name = models.CharField(max_length=20) > price = models.DecimalField(max_digits=10, decimal_places=2, default=0) > short_description = models.TextField(blank=True, null=True, default=None, > max_length=100) > description = models.TextField(blank=True, null=True, default=None) > is_active = models.BooleanField(default=True) > type = models.ForeignKey(ProductType, blank=True, null=True, default=None) > > def __str__(self): > return "(%s, %s)" % (self.id, self.name) > > > class ProductImage(models.Model): > > product = models.ForeignKey(Product, blank=True, null=True, default=None) > image = models.ImageField(upload_to='products_images/') > is_main = models.BooleanField(default=False) > is_active = models.BooleanField(default=True) > created = models.DateTimeField(default=timezone.now) > > def category(request): query = request.GET.get("q") if query: products_images_list = ProductImage.objects.filter( product__type__name__contains=query) But in my template this is not working I want to filter my product's types. Can you help my? Django 1.11 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 post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/751007f9-f6e5-4a41-88d0-e08f80995865%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Filtering Queryset by Foreign Key Properties
Can anyone help me? -- 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 post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6fa171f0-1f2e-42b9-a13a-743050448fa4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Infinite scrolling, Ajax, Phone or PC?
Hello. How can I make Infinite scrolling html? example: https://www.megacom.kg/hype/ru.html#instruction How can I go from first url to another without reloading the website? How can I know if the user is entering my website from phone or pc? If user is entering from phone it should show the Whatsapp button and If user is entering from PC it should hide it. " I can't find any place to ask this thing, and this place might be the wrong place. SORRY if it is like that. If you can answer even one of this answer it plz " 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 post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/16c617ca-c229-4056-b0de-8e5f1424dc00%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.