George
Yes, thats why i knew there was a way to do it. Knowing apis by memory is stupid.
Anonymous
https://dpaste.de/V17J
Anonymous
cannot valid usercreationform???
Anonymous
done ...😊
Anonymous
Anonymous
Seems like an ugly combination
Сымон Рэўка з-пад Барысава
Guys. How dump db Django every day in 00 00? How do that?)
Mirco
Have a look to celery beat
Anders (izzno / gooood) 🇳🇴
PHP with Django?
Maybe, but its the frontend. Dont care.... :)
R
Maybe, but its the frontend. Dont care.... :)
as far as I know, php is not front end so you'll be adding an extra layer which should not be necessary, but it can be done. Just hope your php developer is not the kind of guy who echoes html 🙈
Anders (izzno / gooood) 🇳🇴
I will supply him with an api and he will present the content.
R
yes, but he will consume from the api from the server side and not from the user browser as he would with javascript
Anders (izzno / gooood) 🇳🇴
Maybe, i have no idea.
Anders (izzno / gooood) 🇳🇴
But its a calculus system with its own functionallity, and he needs my products which i want to catogorize and price, the rest of the functions are in php.
Anders (izzno / gooood) 🇳🇴
And at the moment i would think there will be a max number of users at around 10, with the possibility of 100 later, but if it grows its not a problem to hire a developer for rewriting the front end.
R
I see it would have sense if the php system is already live or also has his own db or consumes from other services, if all the data he uses come from your api I dont see much sense in adding that layer, it could be much simpler to build it on django without even building an api, but technically is possible, so let us know in a future how it goes :)
Anders (izzno / gooood) 🇳🇴
Hehe, its a matter of time i guess. I know python , he knows php. He is in charge of our sales personel calculus, i am the product manager.
Anders (izzno / gooood) 🇳🇴
But yes, i see no downsight writing it all in python, and no problem either except time. I might just do that later. Right noe i dont have time and i dont want to kill his motivation becouse we relly need this. And this will work, and its a fast proof of concept, if it gets further attenntion an aprovol we will need to have that discussion :)
Anders (izzno / gooood) 🇳🇴
I can see he is using html and bootstrap so its a matter of copying the functionality in python, it will be a straight forward conversion if it comes to that.
inchidi
@Inchidi or this dont wotk
btw i just made something similar like your case today, and doing
extra_kwargs = {
'username':{'validators': []} # or this
}
work for me
Prosto
Hello djangers!) Is anybody use this - https://github.com/django-oscar/django-oscar-accounts
Prosto
seems everything working, becouse of no errors, and i got in console oscar-accounts section, but there is nothing in dashboard
Prosto
and how to activate standart django admin in django oscar?
R
Prosto
Jitender
How to link two html pages using djanho
Jitender
Django*
Jitender
I dont want to use <a> tag in html .... i want to use django here
Jitender
Any idea to do that
DevilAstra
DevilAstra
Can someone guide me on how to make API using django
Mirco
DevilAstra
Any link, you can share which might be useful?
Rohan
Rohan
There's a whole message dedicated to django there ;)
Rohan
And official docs are superb
DevilAstra
Thankyou
Mirco
Or by using what Rohan suggests you 👌
Rohan
One of the best docs I've seen really
Anders (izzno / gooood) 🇳🇴
Thankyou
https://medium.com/backticks-tildes/lets-build-an-api-with-django-rest-framework-32fcf40231e5
Rohan
Rohan
Денис
but still pretty disappointed that I'll have to implement my own cms for my usecase...
Денис
not having a single idea how soon
Anonymous
Hi Guys, What is the attribute "localized_fields" in django, i dont understand the documentation.
Rajjix
A general broad explanation would be like following
Lets say in utc time it’s 12:00pm
And you want to display a time field in your form
Current time differs in different geographical locations
So you localize the time field
So that the time refers to the local location of the user or client
There might me be more to but that’s how i understand it
Rajjix
It’s from the english word local, you know local time, local people, meaning area near you, or in django’s case near the user’s geographical area
Karim Norman
Hi everyone, I have my tests running very slow under docker, anyone had the same issue?
inchidi
english only please
Денис
Hello,
I have an issue with ckeditor+django (both latest).
It's about static files. I do pip install django-ckeditor, collectstatic, etc as in readme.md on github.
But then I want to install a plugin to ckeditor, and base instructions for this are: put the plugin files to static/ckeditor/cdeditor/plugins and add the plugin name to the config.
That's done, but now I get 404 on plugin.js of that plugin, so the whole ckeditor doesn't show on page.
The /static/ directory I use is that created by collectstatic, but as I try to add something new there (CSS, for example), that doesn't work.
What data should I show you?
Денис
the story is about django's runserver
Денис
Strange. I fixed that by putting the plugin data to one of the apps static folder (keeping the ckeditor folder structure) and running collectstatic.
What's that all about?
Milan
Денис
but if I have the default
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
do I need STATICFILES_DIRS at all?
Денис
seems like django server can see app's static dir, but doesn't see the one specified by static_root
Milan
Yep
Денис
but I can't add the same folder as STATIC_ROOT to STATICFILES_DIRS
Milan
Денис
it seems to be a simple task to make runserver work with static/ dir created with collectstatic, but I messed my head up
Anonymous
DevilAstra
Is it necessary for a website to be api architecture based?
DevilAstra
Or is it okay to work without api?
Rajjix
It’s okay
inchidi
DevilAstra
Thankyou
Luis
Hi guys! I have a view that makes user autologin. I'm using de csrf_exempt decorator but I get CSRF token missing or incorrect message.
Luis
This is a cross domain request
Rajjix
having a similar issue not receiving the csrf token on my fetch request
fetch(endpoint, { method : "GET",
'Content-Type': 'application/json',
'X-CSRFToken': csrfToken
})
i do receive the token in my header when i load the page from my browser
Luis
Rajjix
well, i know that i can get the data without a cookie for the get request, but i tried to simplify the problem as much as possible for any one willing to help, so in comparison when i do a get request in my browser i receive the cookie in my header, but not in my fetch request
Rajjix
and no i'm not getting a 403, it's a 200 status code