Anonymous
Jimmies San
Jimmies San
a lot of resources as you can see :D
Anonymous
WTF!😂😂😂😂🙌🙌🙌
I love that🙌🙌, First time am seeing this😂😂
Anonymous
Jimmies San
Anonymous
Yeah😂😂👍
Anonymous
I have been google searching that for over 2months now...
Anonymous
Maybe you should break your project down, cause I got results
Django Bot
>> Links
- jazzband/django-configurations: A helper for organizing Django project sett
- AJAXify Django Forms | Coding For Entrepreneurs
Django Bot
>> Links
- How to get Django and ReactJS to work together? - Stack Overflow
- Create React App and Django
Anonymous
Hi, I have pure python script i mean just a .py file that has no function and class
I need use this script in my django web app, this script take some files for input with -f option.
what's your suggestion to using this script? should I work on it and add some function and class and make it better or can I use it with os library or something like that?
what's your point of view?
Anonymous
The details you gave are insufficient
Anonymous
Pass the script if you can
Anonymous
And then ask specifically what do you want
Rust
If you can explain, how would you like to run it via DJango, would be nice
Do you want it to be as a management command, or some action in the web interface?
inchidi
inchidi
inchidi
Anonymous
uh thats far better than this , and then?
☺️
then i get my files address from my model
def get_file(self, pk):
try:
return UploadFile.objects.filter(user=self.request.user).filter(pk=pk)
except Exception:
return Response(status=status.HTTP_400_BAD_REQUEST)
def get(self, request, pk, format=None):
print(pk)
files = self.get_file(pk)
Anonymous
my model have three files and i need to process and analyse first file with that script i explained
inchidi
inchidi
you should raise something rather than returning 400 response ig
Anonymous
😐 i need to learn english
inchidi
alright, then what you want to do with the file?
inchidi
inchidi
ah, so its generating report file based on input file?
Anonymous
inchidi
when you open that script did you know how to pass file via function call insead passing -f argument?
inchidi
the last one is better choice
Anonymous
my friend suggest that use https://pypi.org/project/celery/ because this script may work about 3 or 4 min for every file
inchidi
and its gonna be more better if you use celery to process it
inchidi
ew same thought
inchidi
inchidi
you're welcome
Anonymous
I even went to github to get examples
Anonymous
Anonymous
inchidi
hmmmmmmm
Anonymous
Lol
Combot
Sinatra has permanently banned inchidi!
Anonymous
Wtf
inchidi
Anonymous
Ahh
Anonymous
Mischievous bot
Anonymous
r0b0t
Hey guys, how do I use request in forms.py
Rust
Hey guys, how do I use request in forms.py
You need some request data in a form? Then you just provide it as an extra argument in the view where you are instantiating this form and then in the __init__ method of the form just use it
r0b0t
request.user to be specific
Rust
request.user to be specific
https://chriskief.com/2012/12/31/django-modelforms-and-request-user/ or like this for example, if you are using CBV
Rust
https://stackoverflow.com/questions/3532316/django-forms-request-user - and this is what I was explaining in first place
syam
suggestions on database for a big project... mongo postgres or something else
syam
then postgres it is
r0b0t
Thanks. Lemme look at the links
syam
thanks
Rust
here is for example, ppl are talking about updating 50 TB PG setup:
https://medium.com/adyen/updating-a-50-terabyte-postgresql-database-f64384b799e7
r0b0t
Rust
and depends on the case also
in some cases mongo is better
for django projects I prefer to stick with pg
syam
thanks @r_0b0t @amureki
syam
minimum server requirements for postgres to be hosted in aws
syam
??
syam
cool thanks
Jimmies San
Jimmies San
it depends from use case.
Jimmies San
its a documental system? a chat? a crm?
Jimmies San
and so on.
Jimmies San
so you choose a rdbms or dbms. then based on feature choose db