Submitting form not Working for Django Project showing `This field is required.`

2020-11-02 Thread ahmed.he...@gmail.com
Hi,

I have a very basic and beginner's question, I have created a new 
`CreateView` for my project where you can submit an image with a title but 
it is not working although an image is attached. I am not getting any error 
the only thing I am receiving is `This field is required.` next to the 
`design`

Here is my models:
```
class Post(models.Model):
title = models.TextField(max_length=100)
design = models.ImageField(
blank=False, null=True, upload_to='new designs')
date_posted = models.DateTimeField(default=timezone.now)

def __str__(self):
return self.title
```
Here is the views.py:
```
class PostCreateView(CreateView):
model = Post
fields = ['title', 'design']
success_url = 'post/post_list'
```
Here is the template:
```
{% extends "post/base.html" %} 
{% load crispy_forms_tags %} 
{% block content %}

  
{% csrf_token %}

  Post
  {{ form|crispy }}


  Submit

  

{% endblock content %}
```

-- 
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/5a65187b-709d-4c54-a554-3cdec987d281n%40googlegroups.com.


Submitting form not Working for Django Project showing `This field is required.`

2020-11-02 Thread ahmed.he...@gmail.com
Hi,

I have a very basic and beginner's question, I have created a new 
`CreateView` for my project where you can submit an image with a title but 
it is not working although an image is attached. I am not getting any error 
the only thing I am receiving is `This field is required.` next to the 
`design`

Here is my models:
```
class Post(models.Model):
title = models.TextField(max_length=100)
design = models.ImageField(
blank=False, null=True, upload_to='new designs')
date_posted = models.DateTimeField(default=timezone.now)

def __str__(self):
return self.title
```
Here is the views.py:
```
class PostCreateView(CreateView):
model = Post
fields = ['title', 'design']
success_url = 'post/post_list'
```
Here is the template:
```
{% extends "post/base.html" %} 
{% load crispy_forms_tags %} 
{% block content %}

  
{% csrf_token %}

  Post
  {{ form|crispy }}


  Submit

  

{% endblock content %}
```

-- 
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/8f18c719-0888-435b-bd89-8170e055ef11n%40googlegroups.com.


Re: How to connect django and React js but getting Error

2020-11-02 Thread Ravi G
Hi,

How to move source code to production if code consists of images
If anyone has any document related to  production . please share me

On Tue, Oct 27, 2020 at 6:57 PM Алмаз Есеньязов 
wrote:

> You need to write
> BASE_DIR / 'build'
> not
> '/build/'
>
> пн, 26 окт. 2020 г., 15:55 Vineeth :
>
>> I am using django 3.1 version how to connect django and react  i am
>> trying to connect but
>> getting Error like TemplateDoesNotExist at /index.html  i attached my
>> folder structure and error image
>>
>> --
>> 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/09f5e196-12b7-44f0-a7fd-52dd8ce035cdn%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/CAMjq-Bz_BLEaC%2BGWoQE9fk4KySy2aGf8jXBCsrQvE%3DXy3XXXtQ%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/CAAr-_%2BX3_ftm1JFCoxREmj7FcpdV825mHAkhACz3cxFcNFNLXg%40mail.gmail.com.


Re: Django bugfix releases issued: 3.1.3, 3.0.11, and 2.2.17

2020-11-02 Thread Adithya Gowli
Thanks for the update, man


On Mon, Nov 2, 2020 at 1:48 PM Carlton Gibson 
wrote:

> Details are available on the Django project weblog:
>
> https://www.djangoproject.com/weblog/2020/nov/02/bugfix-releases/
>
> --
> 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/7C8A64EC-2A27-436C-82D9-0064CCC3634A%40gmail.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/CADPiQZSHtv%3DusSj7-XBKxN24MDK-N8x5872dQ8jZpGLRNoxGVg%40mail.gmail.com.


Django bugfix releases issued: 3.1.3, 3.0.11, and 2.2.17

2020-11-02 Thread Carlton Gibson
Details are available on the Django project weblog:

https://www.djangoproject.com/weblog/2020/nov/02/bugfix-releases/ 


-- 
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/7C8A64EC-2A27-436C-82D9-0064CCC3634A%40gmail.com.