Anonymous
http://bfy.tw/IthN
WTF!😂😂😂😂🙌🙌🙌
Jimmies San
a lot of resources as you can see :D
Anonymous
WTF!😂😂😂😂🙌🙌🙌
I love that🙌🙌, First time am seeing this😂😂
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
inchidi
Can you stop advertising yourself
it should be okay, it has a context tho
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
The details you gave are insufficient
What else should I say? What information you need?
Anonymous
Pass the script if you can
Anonymous
And then ask specifically what do you want
Anonymous
Pass the script if you can
😢Unfortunately I can't send script, it's not for me. can you help me some how?
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?
Anonymous
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?
(sorry for my bad English) I have a link on my react.js project that send pk to my wep app i should use script on files in models that get from pk i have no idea about running script on files i can make a function for all code of script and import it i can make class and function for each steps and import is and i can use os library for use it
inchidi
Anonymous
mind to elaborate? you have link on your react js project? something like react router? send pk to web app, did you mean to web service? any example?
yes i have router in react js i send pk with axios to web services that wrote with django rest framework url: `http://127.0.0.1:8000/api/Profile/Analyse/${this.props.match.params.pk}`, and then i catch it in path(r'Profile/Analyse/<int:pk>/', AnalyseApk.as_view(), name='Analyse file'),
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
you should raise something rather than returning 400 response ig
Anonymous
you should raise something rather than returning 400 response ig
it's just sample that i wrote to get bad response i should change all of them i just need to figure out what is best running script on files then develope my code
Anonymous
😐 i need to learn english
inchidi
alright, then what you want to do with the file?
Anonymous
alright, then what you want to do with the file?
i didn't know exacly what will do script with files, but i know it will return a report file when alaysis complete
inchidi
ah, so its generating report file based on input file?
Anonymous
what is this script do? modifying the file or something else?
no it will not modify file just generate new file that is report for that
inchidi
when you open that script did you know how to pass file via function call insead passing -f argument?
Anonymous
when you open that script did you know how to pass file via function call insead passing -f argument?
hmm, i can change code some how to make it function base that pass file to it my question is what is best way to work with this script run with os library change code to function and pass file address to it add class to script and so on
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
Anonymous
and its gonna be more better if you use celery to process it
☺️ hmm so good i need dig to it ( i mean read about it ) thank you very much ❤️
inchidi
and its gonna be more better if you use celery to process it
its really easy, just follow these steps and you will be fine
inchidi
you're welcome
Anonymous
I even went to github to get examples
Anonymous
inchidi
hmmmmmmm
Anonymous
Lol
Combot
Sinatra has permanently banned inchidi!
Anonymous
Wtf
Anonymous
Ahh
Anonymous
Mischievous bot
Anonymous
Hmmm
Your search is over
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
Rust
suggestions on database for a big project... mongo postgres or something else
define big :) Instagram was fine with PG until they were acquired and switched to Facebook internal db
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
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
??
inchidi
minimum server requirements for postgres to be hosted in aws
dont worry about that, even smallest instance should be fine
syam
cool thanks
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