onepiece2401 u/onepiece2401 avatar

onepiece2401

u/onepiece2401



commented

Just throw some idea,
In the bash -c, can you try source environement before the run the py manage.py crontab add. And probably can you try also do the pip list to ensure the django-crontab is there.


Currently using zeptomail with django. Seems good as of now




You dont have to be an ass though. If he asking generic question just give generic answer... 


commented

Themeforest have a lot "web app to have a "professional" or "client-ready" look.". It also not expensive.



commented

I think you ask chatgpt first what does login_required do and give you an example code so that you can understand. Then try follow it. If encounter problem again then ask in here again. Show your code next time so others can help


commented

What is the different between bugsink and glitchtip?


Nope. I'm on Hobby Plan: Usage-based subscription.
If I'm not mistaken, you got two type of hobby subscription. The 5usd recurring and usage based subscription the one im in. I might be wrong. You can confirm in their discord.
But the only time I purchase credit last time is like 10usd only and if my usage is less than 5usd. They will not reduce my credit for that month. I still got my credit although not fully 10usd since sometimes I deploy app from their template. I have been with them like 1 year and half and that 10usd still not fully spend


https://railway.com/pricing

---> Includes $5 of usage monthly

If your usage is less than that, they will not charge you. it charge pay per usage. Let say the total for the month is 5.3usd. You only pay 0.3usd

I have hosted 1 django app which include the web app itself + postgres + redis. Total is less than 5usd so I have been using practically for free


commented

Go to railway. Free 5usd per month. 1 web app should be less than that


replied to

The filtering part I did is something like this

The filtering is outside the datatable section and on different div. I use datatable to display the table only.
You use model form to display the filtering, when user click Filter. It will send POST request, then check if the form is valid. If valid, get the value from the form to search on the model and display the result. I use session so that the search is not reset when user go to another page or refresh the page. I simplify the code below for the example. As you can see on GET, I will take the session and make it as initial for the form

if request.method == 'POST':

        form = InvoiceFilterForm(request.POST)

        if form.is_valid():
            get_invoice = Invoice.objects.filter(is_deleted=False)

            if form["year"].value() != "":
                request.session['get_year_session'] = form["year"].value()
                get_invoice = get_invoice.filter(year=form.cleaned_data['year'])
            else:
                if 'get_year_session' in request.session:
                    del request.session['get_year_session']

            if form["student"].value() != "":
                request.session['get_student_session'] = form["student"].value()
                get_invoice = get_invoice.filter(student=form.cleaned_data['student'])
            else:
                if 'get_student_session' in request.session:
                    del request.session['get_student_session']

else:
        data = {}
        get_invoice = Invoice.objects.filter(is_deleted=False)

        if "get_year_session" in request.session:
            get_invoice = get_invoice.filter(year=request.session['get_year_session'])
            data["year"] = request.session['get_year_session']

        if "get_student_session" in request.session:
            get_invoice = get_invoice.filter(student=request.session['get_student_session'])
            data["student"] = request.session['get_student_session']

form = InvoiceFilterForm(data)

commented

For table I just use datatable. But on filtering part, I created my own filtering using django form + use of django session. So when user refresh or click the table items and go to another page. The filtering will not reset when user come back to the page. https://imgur.com/a/3dmLXvQ . Datatable got their own filtering which is called searchpanes and I still playing around with that. You probably can also check on that. There is also iommi but i never try that, but it looks interesting.


commented

Using netcup. So far so good. Recommended.


commented

Can you share security agency that assess your website?


Ohh my bad. In that case, i think you can use session to save the active_profile inside the session. I mean something like this in your views.

save the session:

request.session['active_profile '] = profile.id

get the session:

current_profile = request.session.get('active_profile ')


commented

If i was in your shoes. I do something like this. In your User model, add FK to Profile model.
Have 1 field in Profile model something like active_profile = models.BooleanField(default:False). Make sure in your views to handle only 1 profile able to be selected. if active_profile in profile_A is True. Other profile must be False. Every time user created the profile model, the views will auto save it in the User model under the profile FK field.


commented

I think the easiest should be using PostgreSQL and django all auth. Railway got PostgreSQL template. You can deploy that and connect to your app. I think adding supabase makes your stack harder since you have to configure that manually



commented

We develop our product we django and happy with it. When we got features from customer, we can just focus to develop the features to improve our product. I think this is another reason why startup like MVP framework. You can focus on shipping your features instead of improving the framework of your development. You can get by 90% of your usecase with django.


replied to

Well sad to be you. it great for our usecase. We able to make fully featured management system with django and happy with our choice. In less than a year we able develop and on tracks to deploy to our third customer next week. I'll say django is good for 90% usecase as long you are not develop the next FB or Netflix.


commented

Hi, can you show the whole code how you implement this?.





commented

Awesome, thanks for your effort! I Really want to try django + NiceGui in the future.


Django all auth. Just install the package you got fully working auth and good to go. It also include base layout and everything so you can start customizing if needed. 


I have try this for my project. GeneratedField will auto update/calculate every time you update the field you specify in expression. Kinda neat.


commented

Nahh netcup aint scammer. I got root server with them. The downside with them is that they have contract period. So make sure to know which contract you choose before click the button. But even hetzner cant compete with their root server prices.


commented

129138335

Can i get invite please. Thanks