Anonymous
Abhi
how ?
Abhi
@Sin_atra did you read it ?
Anonymous
Looks like it
Anonymous
Anonymous
https://docs.djangoproject.com/en/1.11/topics/testing/tools/#django.test.SimpleTestCase.modify_settings
Abhi
asking me ?
Anonymous
Yes
Anonymous
Your debug problem is still unsolved right?
Abhi
yeah
Abhi
thanks so much @Sin_atra
Anonymous
While using form how can i add the user online (from sessions) to the object before calling save()?
inchidi
Anonymous
That i kno. But wen im using a form of a specified model after submission (before) i call form.save() can i edit tge form data.. how can i override the form class
Anonymous
Anonymous
But can you tell me why do you want to do that?
inchidi
inchidi
for example, you have BioForm with age and name as fields and your views:
def user_bio(request):
if request.method == 'POST':
form = BioForm(request.POST)
# check age
if form.cleaned_data['age'] <18:
form = BioForm({'name':request.POST.get('name'),'age':18})
...
to make user age data always >17
Abhi
I have two model i.e Node and Device, both are in two different app_folder both of them has a field ip_address
Abhi
i want to list out all the Devices whose ip address is in Node model dattabase too
Abhi
any idea ?
inchidi
Abhi
nope
Abhi
sorry
Abhi
yeah, it is unique
inchidi
then you can use onetomany
Abhi
in Node app ?
inchidi
yeah just set your Devices ip_address as models.ForeignKey(Node)
Abhi
i think i should make OneToOne field
inchidi
then get all devices by ip with Devices.object.filter(node_ip_address="127.168.0.2")
Abhi
yeah
Abhi
that's what i want
inchidi
nice, i see
Django Bot
>> Blogs
- Advanced Django File Handling
Anonymous
lol, someone kicked me?
Django Bot
>> Blogs
- post-DjangoCon US
inchidi
@Shell528 lol
Anonymous
Django Bot
>> Jobs
- Senior Python Engineer
inchidi
https://medium.com/@hakibenita/things-you-must-know-about-django-admin-as-your-app-gets-bigger-6be0b0ee9614
Anonymous
is there any cheat sheet that contain most of django built in functions and validators ?
Anonymous
the official documentaion kinda sucks although it's great generally
Anonymous
WOW found this https://www.mercurytide.co.uk/media/resources/django-cheat-sheet.pdf
Anonymous
i should learn to google from now on
Anonymous
But that's for version 1.5 :(
Anonymous
Welcome
Anonymous
Tushar
I cant fetch data from my database can someone help me with that
Django Bot
>> Jobs
- Remote Open Source Developer
>> Blogs
- Going to Technical Events is Awesome: A DjangoCon Experience
- Going to Technical Events Can be Awesome: A DjangoCon Experience
- How going to technical events can be awesome: A DjangoCon Experience
Anonymous
JZA
Benedikt
Hello, I want to program like a home management center (I don't have a better name for it) for my family. It's not for smart home nor a media center, but more like each family member can add events to a shared calendar or add entrys to a to-do/shopping list or check for the next bus/train connection.
Would django be the right choice to achieve this?
I have sufficient python knowledge but I'm new to django...
Django Bot
>> Jobs
- Full Stack Developer
Anonymous
inchidi
Benedikt
I want to do this as a side project for when I'm home and want to program something.
Benedikt
I think django would be the right choice due to this kind of features tend to be very database - backend heavy
inchidi
Tushar
When I upload a file on my server using admin pannel it gives permission -r----x--t to each folder but I want to change permission to 777 i.e. -rwxrwxrwx is there a way to do this
Charly
Tushar
because with -r----x--t permission i cant see images getting loaded
Abhi
i have installed a django-package in my project
Abhi
in that package there is a model defined that i want to import in my custom app
Abhi
how can i import it ?
inchidi
from appname.models import modelname
inchidi
dont forget to makemigrations and migrate
Abhi
it worked
Abhi
thanks again @DimasInchidi
inchidi
your welcome
Anonymous
guys
Anonymous
whhic is better
Anonymous
DTL or jinja ?
Anonymous
i am loving DTL but the instructor said as i get more advanced i will prefer jinja
Anonymous
is there soemthing jinja can do and DTL can not ?
inchidi
as you get more advanced you will prefer js framework imo
inchidi
whhic is better
and yes i think jinja2 better. maybe django will use jinja2 in future as default templating
Anonymous
Anonymous
Is that sarcasm?