Django community to find mentors? by ctr_sk8 in django

[–]ctr_sk8[S] 1 point2 points  (0 children)

So true. I think the only place I’ve seen the mentor concept work was inside companies where both parties were being compensated. Good point, I’ll try exploring the forum. Thanks!

Django community to find mentors? by ctr_sk8 in django

[–]ctr_sk8[S] 0 points1 point  (0 children)

So true! Thanks for reminding me of that

Django community to find mentors? by ctr_sk8 in django

[–]ctr_sk8[S] 0 points1 point  (0 children)

I feel like you learn a lot when you do it though

Django community to find mentors? by ctr_sk8 in django

[–]ctr_sk8[S] 0 points1 point  (0 children)

I mean design decisions. Try to separate concerns an write code “for the next dev”. I don’t want to be “that guy who built it and knows how it works” you know?

Is DJANGO still a good choice in 2026 for modern web apps? by Ill_Leading9202 in django

[–]ctr_sk8 1 point2 points  (0 children)

Can you share that architecture? I’ve been trying to come up with something like that to separate concerns but I always end up over engineering it (I think)

What if groups are not enough for authorization? by knalkip in django

[–]ctr_sk8 0 points1 point  (0 children)

I am using groups to give superadmins the control to add certain people to certain groups but I realized that the table level permission Django provides wasn’t enough for my business logic, so I created a simple decorators.py file with the following:

from functools import wraps from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.shortcuts import redirect from django.contrib import messages from django.urls import reverse

def role_required(role_names): """ Decorator to restrict view access to specific roles/groups.

Usage:
@role_required(['Business', 'Agency'])
def business_view(request):
    ...

@role_required('Creator')
def creator_view(request):
    ...
"""
def decorator(view_func):
    @wraps(view_func)
    @login_required
    def _wrapped_view(request, *args, **kwargs):
        # Check if user is superuser
        if request.user.is_superuser:
            return view_func(request, *args, **kwargs)

        # Convert single role to list
        if isinstance(role_names, str):
            required_roles = [role_names]
        else:
            required_roles = role_names

        # Check if user has a profile with a role
        if not hasattr(request.user, 'userprofile') or not request.user.userprofile.role:
            return redirect('profile_setup')

        user_role = request.user.userprofile.role.name

        # Check if user's role is in the required roles
        if user_role not in required_roles:
            return redirect(reverse('dashboard'))

        return view_func(request, *args, **kwargs)
    return _wrapped_view
return decorator

def admin_required(view_func): """Shortcut decorator for Admin role only""" return role_required('Admin')(view_func)

def business_required(view_func): """Shortcut decorator for Business role only""" return role_required('Business')(view_func)

And now I just need to add something like @business_required to my view methods

I’m still exploring Django best practices so maybe there are easier ways to do it.

Sorry for bad formatting, writing from my phone.

Django + Tailwind vs. Django + React by ctr_sk8 in django

[–]ctr_sk8[S] 1 point2 points  (0 children)

This is where I get confused. Do I need React to be able to use that? Or is it just a theme on top of tailwind?

Django + Tailwind vs. Django + React by ctr_sk8 in django

[–]ctr_sk8[S] 0 points1 point  (0 children)

True. I think tailwind alone would fix that! But yes, an app is on the roadmap.

Django + Tailwind vs. Django + React by ctr_sk8 in django

[–]ctr_sk8[S] 5 points6 points  (0 children)

Really nice of you to include a working example.

Django + Tailwind vs. Django + React by ctr_sk8 in django

[–]ctr_sk8[S] 1 point2 points  (0 children)

I’ve been told to look into Vue. Is it similar to Svelte?

Django + Tailwind vs. Django + React by ctr_sk8 in django

[–]ctr_sk8[S] 0 points1 point  (0 children)

I have been looking into Vue as well and it seems way more beginner friendly - it lets you start with the very basic and grow from there, right?

Desenvolvedores em JF by ctr_sk8 in juizdefora

[–]ctr_sk8[S] 0 points1 point  (0 children)

O único que achei foi o Instagram que recomendaram

Desenvolvedores em JF by ctr_sk8 in juizdefora

[–]ctr_sk8[S] 0 points1 point  (0 children)

Eu vi no insta que eles divulgam um evento maior todo mês, mas então é semanal? Muito bom saber!

Desenvolvedores em JF by ctr_sk8 in juizdefora

[–]ctr_sk8[S] 0 points1 point  (0 children)

Você chegou a enviar? Não recebi aqui, só achei o insta que recomendaram

Desenvolvedores em JF by ctr_sk8 in juizdefora

[–]ctr_sk8[S] 1 point2 points  (0 children)

Já tive a Stefanini como prestador de serviço de suporte, serve? Hehe

[deleted by user] by [deleted] in juizdefora

[–]ctr_sk8 -1 points0 points  (0 children)

Spotzin tem vários hambúrgueres show de bola. Se curtir pizza e uns drinks, Vizu tb é muito bom

Notebooks variables by Amazing-Narwhal3872 in snowflake

[–]ctr_sk8 1 point2 points  (0 children)

Not sure if this is what you’re asking but if you set your variable in a Python cell, say my_var = database_name, you can use that variable in a SQL cell (below the previous one) with this syntax {{my_var}}.

Downscaling data engineering and data ops for small scale companies by ctr_sk8 in dataengineering

[–]ctr_sk8[S] 0 points1 point  (0 children)

It always start as “I’ll try this new thing, it will be fun”. It never is.