Leonardo
yeah i was looking for something like that!
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
I wanna get only the one latest posts from every ids existing in a array from a mysql database, anyone can help me?
You can specify the order in which you want to get your posts and slice them to a certain number
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?
R
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?
Not really sure how google forms integration work as I try to avoid google services as much as possible, but I guess it will happen in the front end side, so unless you do some js call to the server notifying the google form has been submited it will be hard
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
R
Np :)
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
is better if you use ss
Jimmies San
more info, better tool, not deprecated :)
Luis
is better if you use ss
Oooh! Thanks for the tip
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
Mirco
By adding slug field to your Post model and run migrations
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) ๐Ÿ‡ณ๐Ÿ‡ด
( I might do it for free)
Anonymous
( I might do it for free)
Never do anything 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
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?