Paolo
Anonymous
hi, should I use python/Django or MEAN stack or what? to create a website that contains a dictionary and the grammar of a certain language and many things which is related to that language
Martín
hello, I have used Django some years ago
I want to come back to web development and I want some guidance for good practices, specifically, for a project layout or recommended folder structure
Some years ago I liked the "Two scoops of Django" perspective (got the 1.8 book), I don't know if you guys can give me advice about this or some resource/link to read on the subject
Maksim
Maksim
Martín
that a web?
Maksim
Martín
I have the book from a bundle
Martín
I'm going to take a look
more advice is welcome if anybody has more material or something different to offer
Денис
Martín
Where are those, @tor_gash ?
Martín
You mean the @pythonres link?
Martín
sorry
Денис
Nevermind. Sorry for being rude, just read carefully
cj
Batman
Martín
Batman
Martín
Денис
Anonymous
can I upload a book?
Batman
Anonymous
django for beginners
Anonymous
hahah okay. better dal. soeone wire me $20 and I will send over my copy
Anonymous
*deal
Madiyor
Anonymous
Hello
Need a help in django
I'll create h django admin
I am Create multiple dependent drop down and after filter a data and show a table .. I am complete UI part
But problem is apper in View .Py and models.py file
Maz
Anonymous
Yes
Maz
I mean could you rephrase your question in English?
Anonymous
Yes in english
Денис
Anonymous
creates django admin, UI is fine but there is a problem wiith either the views or models file or both... ?
Maz
Anonymous
🤦♂
Actually I am new in django , I am create a multiple dependent drop down but I am not knowledge to work in django back end work , like view.py and model.py .
Maksim
Anonymous
Денис
Can I somehow get the list of all available context variables for my templates? Those auto-generated by Django, so that I didn't have to reinvent?
Nitesh
https://dpaste.de/RsHP
Nitesh
<QuerySet [<Connections: nitesh follows vishnu>]>
vishnu
You are not following vishnu
Nitesh
Output should be: You are following vishnu
Genjiru S Uchiwa
Hello I'm a Django junior developer and I would like to know if anyone would accept that I help them on a project. I would like to gain experience
Meow
Hi guys
Meow
I just create post differentiate between laravel and django can help me check if i miss something?
Meow
any comment very appreciated
Meow
thanks
cj
thanks
Django's architecture is not MVT, it's Django architecture AS IS, you should know —and clarify it why— according to this FAQ from the official documentation, so you will help people know it's not MVT but Django
cj
cj
about the performance it's debatable 🤷🏻♂️
Anders (izzno / gooood) 🇳🇴
@pyflare : Look at the difference ;)
https://imgur.com/a/cdl7ccl
Mirco
cj
Madiyor
I can't add html file to my django project, please help me
Madiyor
Anonymous
Anders (izzno / gooood) 🇳🇴
Is there a way I can use the admin search function? It's perfect in the model admin and the best thing would be to transfer this to userspace...
Mirco
Anders (izzno / gooood) 🇳🇴
I need to hack it or hack into it ?
Anders (izzno / gooood) 🇳🇴
Better choice of words: Do I need to edit the Django package or just tap in to it ;)
Mirco
Check if it's into a package or reusable
Anders (izzno / gooood) 🇳🇴
Yeah.
Anders (izzno / gooood) 🇳🇴
Anders (izzno / gooood) 🇳🇴
I would officially like to use django full time....
Anders (izzno / gooood) 🇳🇴
But sound like a cool weekend project... just add search_fields = () or something to a model view...
.
Anders (izzno / gooood) 🇳🇴
Felipe
Felipe
def cart_to_pdf(cart, items):
context = {
'cart': cart,
'date_of_order': cart.created_at.date(),
'items': items
}
html_string = render_to_string('cart_pdf.html', context)
response = HttpResponse(content_type='application/pdf')
invoice_id = str(cart.id).zfill(5)
filename = f'C-{cart_id}.pdf'
response['Content-Disposition'] = filename
pdf_file = HTML(string=html_string).write_pdf()
return filename, pdf_file
Felipe
This function create the pdf and return to the function that send by email, I added this lines to save the file to aws and record the link on the cart model
Felipe
file = ContentFile(pdf_file)
file.name = filename
invoice.pdf_file = file
invoice.save()
Akash
How should I store raw text for regex matches.
My model:
class TextChange(models.Model):
old_word = CharField(max_length=20)
new_word = CharField(max_length=20)
I want to allow users to do some text changes so they set:
a literal string ‘123’ or raw string r’\d+’
So I can simply do:
new_text = re.sub(old_word, new_word, data)