Re: File Input from User

2021-03-18 Thread pankaj palmate
yes you can do just make one anchor tag and call view asynchronously*(using ajax) *so that particular set of image is shown and then prepare logic for selecting image and submit the form as you do On Fri, Mar 19, 2021 at 12:07 PM Kumar Gaurav wrote: > Hi Everyone, > > I have a social media kind

File Input from User

2021-03-18 Thread Kumar Gaurav
Hi Everyone, I have a social media kind of portal in Django where user can post an image and write something. Earlier for image , I used input type=file so that user can select image from there system . But for my requirement, now I want the user to to have an option to either upload or select

Re: 2 Almost equal Context with non-empty query set: 1 works, 1 returns nothing

2021-03-18 Thread Arisophy
use this https://docs.djangoproject.com/ja/3.1/ref/models/querysets/#date *.filter(booking_time__date=booking_date) * 2021年3月19日(金) 11:58 Arisophy : > Hi Manuel > > Oops! > *.filter(booking_time=booking_date) doesn't work* > > Did you check the query and DB data? > Are booking_time's time of

Re: 2 Almost equal Context with non-empty query set: 1 works, 1 returns nothing

2021-03-18 Thread Arisophy
Hi Manuel Oops! *.filter(booking_time=booking_date) doesn't work* Did you check the query and DB data? Are booking_time's time of DB data just 00:00:00? If another time, you have to use booking_time >= target_date AND booking_time < next_date_of_target Arisophy 2021年3月19日(金) 9:36 Arisophy :

Re: 2 Almost equal Context with non-empty query set: 1 works, 1 returns nothing

2021-03-18 Thread Arisophy
Hi, Manuei I think , At first, you shoukd check the value of "request.user.organization_id" . Next, try to use Q if the value is valid. context['bookings'] = Booking.objects.filters(Q((organization_id=request.user.organization_id) & Q(booking_time=booking_date)) https://docs.djangoproject.com/en

2 Almost equal Context with non-empty query set: 1 works, 1 returns nothing

2021-03-18 Thread Manuel Buri
Hi folks, can you please help me with this. I am trying to get the context working where I filter for the organization_id as well as the booking_time. Both queries are not empty, however, only the context without the booking_time filter works while rending in html. Code: @login_required def ov

Re: System Check Error

2021-03-18 Thread Fiifi Pius
Don't mix your field ordering of list with tuple. It should be in a list [fieldname] On Thu, Mar 18, 2021, 9:51 PM ule...@gmail.com wrote: > in models.py in Class Blog try with > Class Meta: > ordering = ['publish_date'] > > for Class Comment try with > Class Meta: > ordering = [

Re: System Check Error

2021-03-18 Thread ule...@gmail.com
in models.py in Class Blog try with Class Meta: ordering = ['publish_date'] for Class Comment try with Class Meta: ordering = ['comment_date'] Op donderdag 18 maart 2021 om 21:43:19 UTC+1 schreef noyonba...@gmail.com: > >1. I am so thankful for what you did > > > On Fri, Mar

Re: System Check Error

2021-03-18 Thread ule...@gmail.com
Hi, There is a problem with ordering of field Comment in your model .py within App_Blog Please show me your models.py . Op donderdag 18 maart 2021 om 21:20:01 UTC+1 schreef noyonba...@gmail.com: > What's the Problem? How do I solve it, anyone please suggest to me > -- You received this messag

Re: Please help, I can't install django after a fresh installation of python 3.9 on windows 10

2021-03-18 Thread ule...@gmail.com
After installing python, you have to install PIP. To install PIP type in the following: python get-pip.py To install django tye in the following : pip install django Op donderdag 18 maart 2021 om 19:10:45 UTC+1 schreef simmonshas...@gmail.com: > I have installed python 3.9 and selected 'add to

System Check Error

2021-03-18 Thread Noyon Barman
What's the Problem? How do I solve it, anyone please suggest to 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

Re: Please help, I can't install django after a fresh installation of python 3.9 on windows 10

2021-03-18 Thread Walter Randazzo
Try installing miniconda o anaconda first. El jue., 18 mar. 2021 3:10 p. m., Simon Lankwagh < simmonshasbounced...@gmail.com> escribió: > I have installed python 3.9 and selected 'add to path' during > installation, i am now trying to install django 3.1.7 but it generates a > lot of errors i can

Re: Please help, I can't install django after a fresh installation of python 3.9 on windows 10

2021-03-18 Thread Kasper Laudrup
On 18/03/2021 19.04, Simon Lankwagh wrote: > I have installed python 3.9 and selected 'add to path' during > installation, i am now trying to install django 3.1.7 but it generates a > lot of errors i can not understand, please what is the right way to > setup django development on windows 10? > Ju

Re: how to Sent rich Content or Make content rich in blog django based site.

2021-03-18 Thread Kasper Laudrup
On 18/03/2021 18.25, Shailesh Yadav wrote: > Hi, I have created one website by using Django and I am sending Mail > that is showing in normal text form. > for example, as shown below. > Screenshot 2021-03-18 at 10.50.27 PM.png, > I have seen a few Emails from other sites for example Groww where the

Django Tutorial: please help rewrite form on classes?

2021-03-18 Thread Alexey
I can't rewrite the mysite/polls form into classes.help me. I get different errors every time.     {% csrf_token %}     {{ form.as_p }}     # forms.py: from django import forms from .models import Choice class VoteForm(forms.ModelForm):     choices = [(ch.pk, ch.choice_text) for ch in Choi

Please help, I can't install django after a fresh installation of python 3.9 on windows 10

2021-03-18 Thread Simon Lankwagh
I have installed python 3.9 and selected 'add to path' during installation, i am now trying to install django 3.1.7 but it generates a lot of errors i can not understand, please what is the right way to setup django development on windows 10? -- You received this message because you are subscr

Django 3.1 Makemigrations fails with FilePathField but succeeds with CharField

2021-03-18 Thread Olivier
Converting path from Pathlib to str, allowed makemigrations to pass, at the cost of having a single test to rewrite class Firmware(models.Model): filepath = models.FilePathField(path=str(settings.VENDOR_STATIC_ROOT), match=settings.FIRMWARE_REGEX, recursive=True) display_name = models.Ch

Django 3.1 Makemigrations fails with FilePathField but succeeds with CharField

2021-03-18 Thread Olivier
PS: In case the errors comes from the '/var/www/vhosts/foo/vendorstatic' value itself , may I add that VENDOR_STATIC_ROOT is defined in settings.py, with: from pathlib import Path BASE_DIR = Path(__file__).resolve(strict=True).parent.parent VENDOR_STATIC_ROOT = BASE_DIR / 'vendorstatic' and th

Re: Deploy Django project on AWS EC-2

2021-03-18 Thread Dev Joshi
This might help you . https://youtu.be/u0oEIqQV_-E Thanks Dev Joshi On Thu, 18 Mar 2021, 9:08 pm Mr. X Offencer, wrote: > Hey can anybody help me to Deploy Django Project on Aws. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To u

Deploy Django project on AWS EC-2

2021-03-18 Thread Mr. X Offencer
Hey can anybody help me to Deploy Django Project on Aws. -- 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

Django 3.1 Makemigrations fails with FilePathField but succeeds with CharField

2021-03-18 Thread Olivier
Hello, I've got a Django app which has over 200 migration steps. To shorten its test loading time, I'm trying to erase all current migrations and restart from scratch. I deteted and re-created my app Postgres database. I deleted all files (but __init__.py) in migrations directory. I typed "pytho

Re: Django 3.2 release candidate 1 released.

2021-03-18 Thread Chandrashekhar Singh
Hello, I am looking for someone who could help me to integrate okta with djnago. I will pay for their hard work. My website python version is 2.7 and djnago 1.8. Please let me know as soon as possible. Thanks On Thu, Mar 18, 2021, 7:40 PM Carlton Gibson wrote: > Details are available on the D

Django 3.2 release candidate 1 released.

2021-03-18 Thread Carlton Gibson
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2021/mar/18/django-32-rc1/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscri