onepiece2401
u/onepiece2401
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.
onepiece2401 commented
Themeforest have a lot "web app to have a "professional" or "client-ready" look.". It also not expensive.
onepiece2401 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
onepiece2401 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
---> 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
onepiece2401 commented
Go to railway. Free 5usd per month. 1 web app should be less than that
onepiece2401 replied to Gae58
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)
onepiece2401 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.
onepiece2401 commented
Using netcup. So far so good. Recommended.
onepiece2401 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 ')
onepiece2401 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.
onepiece2401 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
onepiece2401 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.
onepiece2401 replied to thekwoka
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.
onepiece2401 commented
Hi, can you show the whole code how you implement this?.
Tell me how to do my idea
[removed]
Sorry, this post has been removed by the moderators of r/raspberry_pi.
How do I get started?
[removed]
Sorry, this post has been removed by the moderators of r/raspberry_pi.
onepiece2401 commented
Awesome, thanks for your effort! I Really want to try django + NiceGui in the future.
onepiece2401 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.
onepiece2401 commented
129138335
Can i get invite please. Thanks