Skip to main content onepiece2401 (u/onepiece2401) - Reddit
onepiece2401 u/onepiece2401 avatar

onepiece2401

u/onepiece2401

New
Open sort options
Change post view

My experience with Gemini 2.5 Pro and why I switched to OpenAI’s o1 / o3 models

replied to

You can check here, if your api have billing enable or tier 1. I think it is consider as paid services and your data will not be used as part of training the model.

https://ai.google.dev/gemini-api/docs/billing#paid-api-ai-studio

https://ai.google.dev/gemini-api/terms#paid-services


Crontab function regression

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.








@login_required in django

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



Where would you host a web app expecting only about ~100 visitors per month?

replied to

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


Where would you host a web app expecting only about ~100 visitors per month?

replied to

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



Table

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)

Table

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.


Netcup feedback...

commented

Using netcup. So far so good. Recommended.



How do you guys handle this case, multiple profiles for one user

replied to

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 ')


How do you guys handle this case, multiple profiles for one user

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.


Using of Supabase's database for storing my authentication related data.

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


[deleted by user]

replied to

Yeah according to you but not us. But you do you buddy.


[deleted by user]

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.


[deleted by user]

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.



Netcup or Hetzner?

[removed]



django-nice v0.1.0

commented

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




A reliable and affordable alternative to DigitalOcean, Linode and Hetzner?

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.


[MEGATHREAD] Ask For Invites to the Playtest Here! + Join The Community Discord!

commented

129138335

Can i get invite please. Thanks