Ronald
with
Ronald
class Meta: managed=False
Ronald
should I make migrations? (I’m just shit scared it drop my existing database or something)
inchidi
have you read the docs at Using Djongo with an existing MongoDB database part?
inchidi
you have 3 choices, pick one
Ronald
you have 3 choices, pick one
Thanks! Installing Mongodb locally now
Ronald
think it’s the safest
Arjun
Anyone have knowledge on how to remove unused css in Django ?
inchidi
Anyone have knowledge on how to remove unused css in Django ?
actually thats why you do collectstatic tho
Arjun
Not that actually, Like say from bootstrap.css we use only 10-20% of the classes in our code. While rendering I want to remove the unused css from these files
Arjun
then i think what you need is webpack or something similar
Let me check.. there are some npm packages I found. But not directly pluggable to django
Nedd
I have a problem(sorry for irritating everyone again) that i have ab index page that's loading separate blogs. What I want is when I click each blog, it takes me to a separate blog. Basically the content of each blog is unique but a link to it should be shown on the index page
Potato
I have to cache a HTML page using memcache.Is there any sample code? because I am not able to implement the caching. Any resources?
Mohamed
If you want to cache an html did you consider using pwa (progessive Web app) not only it cache html page it makes it accessible offline
Mohamed
https://medium.com/beginners-guide-to-mobile-web-development/convert-django-website-to-a-progressive-web-app-3536bc4f2862
Mohamed
https://medium.com/beginners-guide-to-mobile-web-development/convert-django-website-to-a-progressive-web-app-part-2-2-23c1518a279c
Mohamed
https://github.com/kirankumbhar/DjangoPWA
Mohamed
*an
Yes, your question is little confusing
Wang
hello everyone good evening
Wang
how to customer context in generic class view
Wang
it's easy if in function view
Wang
/
Wang
i customer active in function view, but i don't know how to do it in generic class view
Wang
who eles is here
Anonymous
could you be more specific. What do you want? and what you are getting right now?
Anonymous
Also, rather than sharing pics, share code in gist or pastebin
Anonymous
post_list is itself function view
Wang
yup
Anonymous
do we have a generic view for this purpose? I think we don't.
Wang
IndexView functional as postlist
Joel
Hi guys, have some django with vuejs tutorial?
Anonymous
Hi guys, have some django with vuejs tutorial?
https://medium.com/quick-code/crud-app-using-vue-js-and-django-516edf4e4217
Wang
but it doesn't have active var in context
Wang
i want difine active var in class view but i don't know how to do
Mohamed
how to customer context in generic class view
You can do that by override get_context_data() Method
Wang
do u have a example
Mohamed
Then say context["active"] ="active"
Mohamed
If the class get big use mixin
Wang
If the class get big use mixin
i will learn it thanx bro
Mohamed
Here an offline doc of ccbv.co.uk this will help you in class base view
Anonymous
some guide for testing in django?
cj
some guide for testing in django?
https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Testing https://docs.djangoproject.com/en/2.1/topics/testing/
Anonymous
thanks
cj
they were the 2 first result in a google search
cj
🤷🏻‍♂️
Anonymous
though i have gone through them, but still will again visit them ☺️
Anonymous
how to be good with testing in django ? That's a better question I guess
cj
how to be good with testing in django ? That's a better question I guess
writing code, reading, writing more, reading more, loop
Anonymous
Maz
writing code, reading, writing more, reading more, loop
Also learn about unit tests, Selenium and other testing topics.
Maz
Google about testing in Python and Django. Trust me, it's deep.
Anonymous
hmm. I agree 🙏
Nedd
Yes, your question is little confusing
Okay so imagine an index page of a blogging website that posts multiple blogs. You can see multiple blogs and it's your choice which one to click on. Now what I want is when the users click on it, it should take them to the blog with the same title as the blog that the user clicked on. That means that in the backend, the object that the user sees should be linked to the object in the database. My problem is this.... I have gotten the users to see the blog, how do I link those blogs to the database objects
cj
if you really mean a blog, are you using multi-site feature?
Nedd
a blog or a post in the blog? 🤔
Basically a post I would say. O just used the term "Blog" for perspective. The way I understand it is that the user can see the object, but there are multiple objects in the sight of the user. Each of the objects that the user can see, should be linked to the actual object in the database
Nedd
My problem is how do I link multiple objects on a single page
Nedd
I'm sorry if I am being problematic
cj
My problem is how do I link multiple objects on a single page
do you want to list the posts of the blog in the index page? is that?
cj
use a ListView 🤷🏻‍♂️ should work
Nedd
use a ListView 🤷🏻‍♂️ should work
Okay, I'll search the docs. Sorry again if I was hard to understand. I'll work on my explanation skills
cj
https://docs.djangoproject.com/en/2.1/ref/class-based-views/generic-display/#django.views.generic.list.ListView
cj
that's exactly what you want, if I'm not wrong
Nedd
Yessssss omg that's ITTTTT. I searched a lot for it. Thank you so mucb
Nedd
Much*
Anonymous
Hi devs, I need a dashboard boilerplate in vuejs or other frontend technology, with django already integrated and with some basic crudes, does anyone have any links there to help?
cj
Hi devs, I need a dashboard boilerplate in vuejs or other frontend technology, with django already integrated and with some basic crudes, does anyone have any links there to help?
Let me 🦆 DuckDuckGo that for you: 🔎 dashboard boilerplate with django already integrated and with some basic cruds
Anonymous
Name is not blank
I've downloaded a virtual environment.