Leonardo
yeah i was looking for something like that!
Jimmies San
Jimmies San
try it, if problem: just ask again :)
Leonardo
nice thank you @JimmySan !!
Leonardo
i`ll try it
Mirco
Read what pydanny says about it inside 2 Scoops of Django 😀 Leonardo
Anonymous
Good day
Anonymous
I wanna get only the one latest posts from every ids existing in a array from a mysql database, anyone can help me?
r0b0t
Sergei
Good day/night!
Do anybody know how to detect a signal, when a user submits a google form, which was implemented to my django web site?
Sergei
It sends some request to google,
may be this could be caught?
R
Yes, but the request is sent from the front end side, right?
R
If so, you should implement some js to catch when the form is submitted and notify your server via ajax or whatever, and then implement your logic on the server side
Sergei
R
Np :)
Anonymous
Anonymous
Anybody please..
Luis
Do you have an instance of redis database listening on localhost and port 6379?
Luis
If your are using Linux, can test it running this command on Linux terminal:
netstat -lptn | grep 6379
Mirco
No worries , he's already ok
He wrote me in DM
Luis
Ok!
Mirco
As you said, he just forgot to start redis service
Luis
Hehe sh*t happens
Mirco
😂
Jimmies San
Jimmies San
is better if you use ss
Jimmies San
more info, better tool, not deprecated :)
Jimmies San
Anonymous
Sh
Guys please help me, I am new in django. I am learning it from the book "Django by example".
I am doing step by step but when I wrote this codes I have error
from django.contrib import admin
from .models import Post
@admin.register(Post)
class PostAdmin(admin.ModelAdmin):
list_display = ('title', 'slug', 'author', 'publish',
'status')
list_filter = ('status', 'created', 'publish', 'author')
search_fields = ('title', 'body')
prepopulated_fields = {'slug': ('title',)}
raw_id_fields = ('author',)
date_hierarchy = 'publish'
ordering = ('status', 'publish')
Sh
this codes in admin.py file
Sh
django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:
ERRORS:
<class 'blog.admin.PostAdmin'>: (admin.E027) The value of 'prepopulated_fields' refers to 'slug', which is not an attribute of 'blog.Post'.
<class 'blog.admin.PostAdmin'>: (admin.E108) The value of 'list_display[1]' refers to 'slug', which is not a callable, an attribute of 'PostAdmin', or an attribute or method on 'blog.Post'.
this is my error
Mirco
Your Post model seems to not have slug field
Sh
Mirco
By adding slug field to your Post model and run migrations
Sh
Mirco
Anders (izzno / gooood) 🇳🇴
https://pastebin.com/3HeF9CGY
When making a Custom manager the admin site does not find the original manager (.objects) (the admin page only list/show the active ones, as the manager i set up), is this a bug or on purpose ? There should be no reason to have to include the default manager "objects" as i named the manager something else.
Mirco
what do you mean with not find the original manager ?
Anders (izzno / gooood) 🇳🇴
It does not show the "inactive" ones.
Mirco
mmm share your custom manager too pls
Anders (izzno / gooood) 🇳🇴
i just edited the pastebin
Anders (izzno / gooood) 🇳🇴
:)
Mirco
good :)
Mirco
with your ActiveManager , your queryset has only active ones
Anders (izzno / gooood) 🇳🇴
Mirco
have a look at this
Anders (izzno / gooood) 🇳🇴
Yes but what I dont understand is why/how/where it replaces .objects
Anders (izzno / gooood) 🇳🇴
Your saying I will understand that watching this ?
Mirco
yup
Anders (izzno / gooood) 🇳🇴
ahh, thanks. Then i will ;)
Mirco
I think you will understand without other explanation
Anders (izzno / gooood) 🇳🇴
Thats fine, no point waisting time explaining something explained elsewhere ;)
Mirco
ahah yep, but if you still don't understand ask again
Anders (izzno / gooood) 🇳🇴
I will!, I like answers pointing to full answers like this. You learn alot more.
Mirco
absolutely!
Anders (izzno / gooood) 🇳🇴
I am the kind of person who needs to understand what I am doing, if not I never learn... I forget in an instant if I dont understand it.
Anders (izzno / gooood) 🇳🇴
I dont understand how some people can learn syntax / languages without understanding it.
Mirco
yep! if u don't understand what you r doing , you will make bad apps, code etc. imho
Anders (izzno / gooood) 🇳🇴
yes.
amit
Looking for a Django developer who knows (frontend as well) for a freelancing project .
If you have any friend in your network with set of specific skills, please redirect if someone is the right fit.
Anders (izzno / gooood) 🇳🇴
Anders (izzno / gooood) 🇳🇴
( I might do it for free)
Anders (izzno / gooood) 🇳🇴
Anonymous
Other will gain profit from it
Anonymous
Get a portion of it
Anders (izzno / gooood) 🇳🇴
Thats why i asked what.
Anonymous
I wasted few months of mine.
Anonymous
Won't do it again
Anders (izzno / gooood) 🇳🇴
I have a 100% dayjob and a 3 year old doughter so months is out of the question. Currently I am writing our new PIM system. Django turned out to be, well perfect.
R
Never do anything for free
I would specify, nothing for free for a company/person who will get benefeit from it, but contributing to free/open source is always good idea
Anders (izzno / gooood) 🇳🇴
excatly.
Anonymous
That's a different case
R
Rajjix
Anders (izzno / gooood) 🇳🇴
have a look at this
This is great and explains alot, but i still dont get how/where/why .objects which django.admin uses disapears, does not work anymore without especially defining "objects"
Anders (izzno / gooood) 🇳🇴
my code makes a new manager and defines it (without replacing the old .object, manager), right?