Mirco
Anders (izzno / gooood) 🇳🇴
Then I reccomend you to use a couple of hours ;)
Mirco
Anders (izzno / gooood) 🇳🇴
Depends on what your working on but for small / personal / apps i was blown away.... So much abstraction...
Anders (izzno / gooood) 🇳🇴
Combigning this with Django Admin and you have all you need.
deepak
please can anyone tell me how to store user signup data in django database which is coming from react front-end with axios
deepak
means my front-end developed in react and backend in django...
so i want to store user data comming from react signup form in django dqtabase...
and react send data using axios
Mirco
cj
Sebuhi
Juber
I need best tutorial for django
Juber
Please help me
Аброр
Juber
Any other tutorial
foxkeith
Check pinned message.
godmode
I gotta a question, pretty basic as well... but i can't understand how to do to incorporate a site this url map.... what do you do if you somethis like:
godmode
" " Empy url to the app blog
godmode
"dashboard/" to the app dashboard
Rohan
You make views and bind them to urls?
Rohan
As far as django is concerned.
godmode
cuz always i try something like this and i indicate that i want the blog to keep their own urls ... cuz yeash!!! i bind some classes-based views to the urls
Ghorz
Rohan
godmode
so how do you indicate that you want the empty to use the urls in the app blog and the "dashboard/" to the dashboard
godmode
and i think that's bc something theorical is out of me... but i can make a paste bin...
godmode
i'll make an example what i mean,,, hold on!
007
Any django cornjob tutorial ?
Anonymous
Cron*
007
Cron*
Yes , do you have any good tutorial about django cron or celery
Anonymous
Their docs? No?
007
Ok
godmode
Share the repo so we can see
https://pastebin.com/caUDSLH9 there is not report is just an example, i got a blog that i'm developing but the dashboard is not integrate... this is the blog https://github.com/Godm0de/Django_Blog
Sami
AttributeError at /admin/login/
'User' object has no attribute 'is_staff'
Request Method: POST
Request URL: http://127.0.0.1:8000/admin/login/?next=/admin/
Django Version: 2.2.4
Exception Type: AttributeError
Exception Value:
'User' object has no attribute 'is_staff'
Exception Location: C:\Users\Sumo\Desktop\Project\SaflixStoreWebsite\lib\site-packages\django\contrib\admin\forms.py in confirm_login_allowed, line 21
Python Executable: C:\Users\Sumo\Desktop\Project\SaflixStoreWebsite\Scripts\python.exe
Python Version: 3.7.4
Sami
HOW can i slove this thing
Sami
my code
dhelbegor
dhelbegor
Your field name is not is_staff is only staff
Sami
what about acive and admin
dhelbegor
Try to follow the convention User model, is_staff, is_actice, is_admin
dhelbegor
Just modify this fields run the makemigrations and migrate and try again
dhelbegor
is_active*
dhelbegor
Here is a good full example
dhelbegor
https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html
Artificial
That should be self.is_staff
cj
Sami wanted to post this long code: https://hastebin.com/evicavohir
Anonymous
Hi guys, how can I prepopulate model column in django admin using foreign key(any column of foreign key model) of that model, I have found that in official docs, they say prepopulated_fields doesnt work with foreign key, any other do you know any other aproaches?
Anonymous
Scrim
Scrim
something like this ?
Anonymous
felix
Hello,
tell me please:
I have a project on django, which has a model with the following content: name, phone, content, created_on.
a view in which I select from the database: command.objects.all ()
and an html document in which I display the data: {{object.content}}.
The problem is that the data in the DB is entered and displayed without a newline.
how could i edit the display of each content object to look with newline?
Barry
If I understand you well, you just need to iterate through the various values
felix
yep
Maksim
{{object.name}} <br> {{object.content}}
Maksim
Learn html
felix
no, : if object.content = "somestring1 somestring2 - somestring3", i need the result: 'somestring1 somestring 2 \n-somestring3'
felix
I need to somehow infiltrate an '\ n' in front of the "-" character
felix
can somehow | join: "\ n"
felix
i dont know
felix
can i use this: {{object.content|replace("-","\n -")}} ?
felix
"Could not parse the remainder: '("-","\n -")' from 'object.content.replace("-","\n -")'"
felix
yep
felix
3.7
Alok
Any good examples of iterating through django context
felix
("-",["\n","-"]) also dosnt work
felix
<td>{{object.content.replace("-","\n -")}}</td>
given sintax error
felix
same problem
felix
aaaaaaa
felix
:D
felix
thanks
Anonymous
Who can help?
Whats better? Functions or Classes to use in the views
felix
https://www.webforefront.com/django/usebuiltinjinjafilters.html here says: {{"oooh Django!"|replace("o", "",2) }} outputs oh Django!.
Maksim
Prashant
Can you please tell me that how do i install Kivy in pycharm??
Prashant
Can anyone *
Anonymous
Anonymous
Then import in pucharm
Anonymous
Py*