Hadi
i meant directly inside html file
Behnam
Should we add statics and temples to .gitignore??
Rafael
no , I believe that you want to send to git your templates and static files that your template depend on that right?
Rafael
you can add media/ to gitignore
Rafael
for sure, since is not project related
Огни
how can I make it so that the "user" model has data about reading some records of the "article"class
Огни
ManyToManyField, JSONfield or any other ways?
Joy
Hey, I am just a beginner with backend development. I am having problems in generating the form and using the CSS files that I had created. I have been searching all through google and YouTube but, its not helping. If anyone has time can you look into my code and tell me where it all went wrong?
Огни
Said the abstract functionality that is needed
Alex
generate statistics
Maybe like that - create a model Event that tracks data related to a user and an article. In such way it may, but not necessarily should, be implemented as m2m through for one these models.
Alex
But I'm not a DBA, so there may be a better solution.
Rohan
Any such log mechanism will require a user identifier and an activity identifier
Rohan
Depending on scale you can device a logging system
Rohan
Can go for a table with user_id, activity_type, other_info along with time stamps for starters
Rohan
It depends on what all you wanna save and what you want to do with those stats.
Alex
Yes. And make the relation polymorphic. For example with django's content type framework https://docs.djangoproject.com/en/3.2/ref/contrib/contenttypes/#generic-relations
Alex
Yes
Rohan
But for a fairly small project, this would be okay
Rohan
LinkedIn wanted to have such a thing to log every event generated by user and they ended up making kafka.
Rohan
Cuz they had petabytes of events generated everyday
Alex
Lol, I didn't know.
Kishor
how to do push notifications in django
Arslan
google it
Doragonsureiyā
Maybe anyone is here, yes, but they are not obliged to read everyone's message here neither to reply to everyone's message, if someone wants to reply to your message, they will do that, just don't try to draw attention to your message writing "anyone?" every 5 minutes, that will lead you to be warned for SPAM/Flood, just be patient or use Google/DuckDuckGo to research about your question instead of wasting time here waiting for people to do your work. Have a nice day 😊
Azizbek Xushnazarov
>>> employee = Employee.objects.get(id=pk) >>> address = Address('street', 'state', 'city', 'zip_code') >>> employee.address = address >>> employee.save() class Address: """employee address""" def __init__(self, _street, _city, _state, _zip_code): self.street = _street self.city = _city self.state = _state self.zip_code = _zip_code How can I create custom modelField that saves Address? mention: cant find on google I know I can create Address model and use it with Foreignkey, this is just an example.
Azizbek Xushnazarov
my custom class I meant
dull
how to send information about the operation of a function to the frontend from Django before it has finished its execution? Like progress bar with information of function status
Anonymous
how to send information about the operation of a function to the frontend from Django before it has finished its execution? Like progress bar with information of function status
U have two ways Ajax : using long polling http Websockets : live data will be send to front end There r package for websockets called django channels which easy and come with alot of tools google about it
Anonymous
what about pagination ?
Wt do u mean ? Do u ask about pagination?
Anonymous
If u wanna use pagination Django can handle it for u there r topic in django documention about how to add to ur app
dull
Wt do u mean ? Do u ask about pagination?
I ask about this method. Is it good for my task or websockets better ?
Anonymous
I ask about this method. Is it good for my task or websockets better ?
No there r differences between them pagination has totally different job it use when u have a long list let say list of products n u don't want all products be in same page so u divided in multiple pages useing pagination and each page has numbers of products on it Websockets use for transfer data
Kueppo
HI there, I'm trying to create a form I got this error, hoping you guys can fix it whatever.forms.m_register object at 0x7fe85120ebe0, well it doesn't look like an error but Aye!! 🤷‍♂️
Kueppo
below it is the submit button, so I don't see my inputs at all.
Anonymous
Wt is best alternative to django admin page? It mustn't build from scratch just build on it like themes but with extra function
Sanji
How can I integrate Salesforce in django?
Anonymous
have you ever come across this?
I can't remember if i had
Anonymous
If error happened when rendering page issue could be in form model If after submitting it could be in the view
Faraday
How do i implement authentication?
Kueppo
If error happened when rendering page issue could be in form model If after submitting it could be in the view
yep, thanks. I solved the issue, just forgot the parameter forms.Form in the form model, thanks again :)
Anonymous
Whats benefits to learn django rest framework
Alex
You probably doing it wrong. ES is a NoSQL storage. Meaning that it works with independent schemes/docs. If you need smt like "joins" or "relations spaning" it means that you missed up your scheme. For example - you have blog project where users can publish comments to an article. So if you want to find all comments left by a user with nick alkalit, you should index it like that: Comment - id - text - username - user_id
Anonymous
Hi guys. I hope you all are having a good time. I'm new to Django and I'm starting my first project here. It's a simple website where there are 2 types of users. First type are the ones that can write some posts about Radiology, and the second type usual users who can just read posts and add some comments. So I've designed my E-R diagram so far, now I'm going to write the models and classes for my database. I have no specific question, just guidance :). Is anyone here kind enough to help me get started on this?
Kirill
hello i need make that user have own post but i dont know how to do this
Parth
Hii guys I have a problem user have to enter multiple website link in textfield then how to separate that link.
D
Hello comrades !!! Now I am working on one Django / DRF project, and I have a task. There is a broadcast on the page, and under the broadcast there is a form for collecting questions. During the broadcast, people can ask questions and they should appear in the Google Sheets, which is accessible to the admin. Can you give advice, how you can implement this?
Eugene
What do you want exactly? Can you explain ?
Eugene
If you want to create post with its author,you should create form and put instance= (user)
Kirill
If you want to create post with its author,you should create form and put instance= (user)
i need I need the article to be linked to the user by id and output this data to the template But the connection must be made in the views.py file
Eugene
And in your database create relationship )
Kirill
And in your database create relationship )
how i can do it without database create relationship ?
Eugene
Through cookies
Eugene
For example
Eugene
how i can do it without database create relationship ?
But I don't know why you want to do it without relationship 😅 Are you nuts ?
Eugene
So, through cookies I think )
Eugene
Is there while in django template language?
Eugene
So sad
игорь/igor
i did fixtures and relationships break it
You should adjust your fixtures not to break relationships in models.
Jo
Hi How we can resolve Interface error, "Connection already closed" with postgres
Poppu
Just want to display firebase users via model and want to use with other models any ideas about that Also want to some other features like send notification with out rest framework
Anonymous
Hi guys Am New to django rest framework. I didn't know how to deb the code Can any one help on this, how I do it? Can any one give suggestions, how to debug the code
Anonymous
Can send any links for do debug rest api