failed to add product when django app is online

Everything in my site working after it is up and running. I am using AWS S3 for static files but for some reason I don’t see in my static files the folder for admin. I also tried to add a category and it is successful but when adding products that has photos and videos i get server error 500. here is the code:

def add_product(request):
	submitted = False

	if request.method=="POST":
		form = ProductForm(request.POST or None, request.FILES or None)
		if form.is_valid():

		return HttpResponseRedirect('/add_product?submitted=True')
		form = ProductForm
		if 'submitted' in request.GET:
			submitted = True

	return render(request, 'add_product.html', {'form':form, 'submitted':submitted})

class ProductForm(ModelForm):
	class Meta:
		model = Product
		fields = ('name','price','category','digital','image','video_name','video_file', 'video_demo')
		labels = {

		'name': '',
		'price':	'',
		'category':	'',
		'digital': 'Digital?',
		'image': 'Upload Image',
		'video_name': '',	
		'video_file': 'Upload Video',
		'video_demo': 'Upload Video Demo',


		widgets = {

		'name': forms.TextInput(attrs={'class':"form-control", "placeholder":"Product Name"}),
		'price':	forms.TextInput(attrs={'class':"form-control", "placeholder":"Product Price"}),
		'category':	forms.Select(attrs={'class':"form-control"}),
		'digital': forms.CheckboxInput(attrs={'class':'form-control'}),
		'image': forms.FileInput(attrs={'class':'form-control'}),
		'video_name': 	forms.TextInput(attrs={'class':"form-control", "placeholder":"Video Title"}),
		'video_file':	forms.FileInput(attrs={'class':'form-control'}),
		'video_demo':	forms.FileInput(attrs={'class':'form-control'}),


{% extends 'cart/main.html' %}
{% load static %}

{% block content %}

	<h1>Add New Product</h1>
	{% if submitted %}
		Your product was added...
	{% else %}

		<form action="" method="POST" enctype="multipart/form-data">
			{% csrf_token %}
			{{ form.as_p }}

			<input type="submit" value="submit" class="btn btn-secondary">


	{% endif %}

{% endblock content %}

is there something wrong with my code? I tried offline it is working locally but online it is error 500

Are you using AWS S3 for static files or for media files, or both?

The two categories of files are different, and are configured and managed differently.

Your description references “static” files, but your code is more representative of “media” files.

Also, what does your model look like?

I am trying to configure static files like how it was locally. I put everything in syatic folder all images videos css and jave files. Is there a well detailed tutorial how to move both static and media files from development to production use AWS S3?

here is the code for the model:

class Product(models.Model):
	name = models.CharField(max_length=500, null=True)
	price = models.FloatField()
	category = models.ForeignKey(Category, on_delete=models.CASCADE, default=True, null=False)
	digital = models.BooleanField(default=True, null=True, blank=False)
	image = models.ImageField(upload_to='images/',null=True, blank=True)
	video_name= models.CharField(max_length=500)
	video_file= models.FileField(upload_to='videos/', null=True, verbose_name="")
	video_demo= models.FileField(upload_to='videos_demo/', null=True, verbose_name="")
	def __str__(self):

	def imageURL(self):
			url = self.image.url
			url = ''
		return url