skip to Main Content

Ubuntu – Nginx server doesn't load static css files

I'm trying to deploy my django site to ubuntu server nginx by following this tutorial (https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu). Deployment works, but css not working. I figured it's something with collectstatic but not sure. Funny enough css worked properly for 0.0.0.0:8000 port. This…

VIEW QUESTION

Postgresql – Foreignkey Django separator

There is a model: class Categories(models.Model): name = models.CharField(max_length=150, unique=True, verbose_name='Name') slug = models.SlugField(max_length=200, unique=True, blank=True, null=True, verbose_name='URL') class Products(models.Model): name = models.CharField(max_length=150, unique=True, verbose_name='Name') slug = models.SlugField(max_length=200, unique=True, blank=True, null=True, verbose_name='URL') category = models.ForeignKey(to=Categories, on_delete=models.PROTECT, verbose_name='Categoy') I don't understand…

VIEW QUESTION

Mysql – How to make password hashing in django project, i am using custom autentication for login?

I want to make password hashing possible for a django project. views.py for login. def asset_login(request): if request.method == 'POST': username = request.POST.get('user_id') password = request.POST.get('password') try: user = UserTable.objects.get(username=username, password=password) if user: if user.status == 'inactive': messages.error(request, 'Your account…

VIEW QUESTION
Back To Top
Search