These are chat archives for django/django

30th
May 2017
MBijman
@MBijman
May 30 2017 08:45
@yoosuf it was a long and hard path (ruby, php) but know your hardships are over :)
Vivek Mohan
@vmwsree
May 30 2017 10:48
where can i learn best practices
some github repos i can refer to see best practices
Anish Shrestha
@annshress
May 30 2017 10:49
you can look at the django code itself.
Vivek Mohan
@vmwsree
May 30 2017 10:50
best practices for django project
anyother suggetions
more which has a core web app structure
i am already going through two scoops of django
MBijman
@MBijman
May 30 2017 11:46
@vmwsree read the book two scopes of django
:]
@elcolie
May 30 2017 13:00
@transaction.atomic
def save_sale_records(file: object):
    import pdb; pdb.set_trace()
    with open(file) as csvfile:
        reader = csv.DictReader(csvfile)
        for row in reader:
            print(row)

It gives me error

-> with open(file) as csvfile:
(Pdb) n
TypeError: expected str, bytes or os.PathLike object, not TemporaryUploadedFile

Form submit file and I can save to to storage perfectly fine. Therefore I would like to add one more function to read the content of file before response to client.
How can I open my uploaded file?

Oleg Chepil
@West0ne
May 30 2017 18:17
Hi, folks! what are good resources for learning django in 2017? sites/books. thx!
Cristian Samaniego
@chrisRubiano
May 30 2017 18:20
How to tango with django its a really good tutorial, Two scoops of django for best practices, and django girls is nice to start with something easy
wbeyda
@wbeyda
May 30 2017 18:21
The documentation is really the best.
Oleg Chepil
@West0ne
May 30 2017 18:25
@chrisRubiano thx Cristian! django boys will secret study django girls)
Umut
@umutuluer
May 30 2017 18:29
@wbeyda absolutely you are right :)
wbeyda
@wbeyda
May 30 2017 18:30
pfft. I've fixed broken things on Django girls for them. They ain't all that.
Cristian Samaniego
@chrisRubiano
May 30 2017 18:31
it is still a nice place to start if you dont know much of web development
I started learning django with that haha