🏳️‍🌈Robby [ Private Message = Spam]
Anonymous
Have you read the docs?
I find {{ meta.REQUEST.HTTP_REFFERER }} but i cant use this in reverse
cj
No problem
I have some free time now... I'll do a little and dumb app using that CKeditor
cj
No problem
here is the source code: https://gitlab.com/c0x6a/django-ckeditor edit: live demo was shut down because OP saw it as intended, no longer needed
Eduardo
Hi guys I've created a virtual environment for a project and I'm gonna start a new one, do you recommend to create a new venv?
Yusniel
Hi guys I've created a virtual environment for a project and I'm gonna start a new one, do you recommend to create a new venv?
Yes. Indeed, if you have to use different packages, it's recommended to create a new one.
Yusniel
thanks bro!
👍👍
Shiva
what do you mean?
Geodjango , Leflet
🏳️‍🌈Robby [ Private Message = Spam]
Geodjango , Leflet
If you store the data using something like postgis — it's probably going to be easier to handle geospatial queries more natively with postgis.
🏳️‍🌈Robby [ Private Message = Spam]
Guys anyone worked with map in Django ?
But in either case, stop asking meta questions and just ask your question. Here are the docs, start with those: https://docs.djangoproject.com/en/2.2/ref/contrib/gis/db-api/# https://django-leaflet.readthedocs.io/en/latest/
🏳️‍🌈Robby [ Private Message = Spam]
All the information you need can be found via duckduckgo.com
shruthi
Hey I'm new to django.. Can anyone plz help me how to do a login and registration page in django
pavi
Hey I'm new to django.. Can anyone plz help me how to do a login and registration page in django
You have to finish atleast 7 parts in the tutorial before you go to user registration https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Authentication
Firdaus
Hey I'm new to django.. Can anyone plz help me how to do a login and registration page in django
part 1: https://wsvincent.com/django-user-authentication-tutorial-login-and-logout/ part 2: https://wsvincent.com/django-user-authentication-tutorial-signup/ part 3: https://wsvincent.com/django-user-authentication-tutorial-password-reset/
Macurrent
Yes i was following it but when i assume the green error underlined in my code editor and run migrations, the error comes no module named environ
cj
Yes i was following it but when i assume the green error underlined in my code editor and run migrations, the error comes no module named environ
🤷‍♂️ There's a README file, also saw the project live and running when it was online... better read all the words in the README, don't skip any step 🤷‍♂️
Macurrent
Yes i was following it but when i assume the green error underlined in my code editor and run migrations, the error comes no module named environ
Yesterday i had the same error whe trying to do migrations.. I think its not that i have skipped anything. here is the error..<module> import environ ModuleNotFoundError: No module named 'environ'
cj
Yesterday i had the same error whe trying to do migrations.. I think its not that i have skipped anything. here is the error..<module> import environ ModuleNotFoundError: No module named 'environ'
sorry to break your heart, but... everything is working fine here... clean clone, install, migrate and run https://i.c0x6a.dev/75c5de9a-5e50-4bae-b457-00c3e095fd79.mp4
Macurrent
wait, I'm gonna do a clean clone/install/run
I dont think if there is any problem with your codes. I think its in mine.
cj
I dont think if there is any problem with your codes. I think its in mine.
watch the video I sent, read the README, don't skip things... use a clean virtual environment 🤷‍♂️ there's not black magic
Macurrent
from ckeditor.fields import RichTextField... Yesterday i tried to import that and ckeditor.fields had a problem of unresolved import 'environ'Python(unresolved-import). I have jxt checked it now and the problem is gone. I did not do anything
cj
use a clean, new, shiny, virtual environment
Macurrent
use a clean, new, shiny, virtual environment
How do i do that. my virtual environment is upto date
cj
I tred my best... ... now just wait for @robbyoconnor 😉
Anonymous
I tred my best... ... now just wait for @robbyoconnor 😉
i suppose, you should not tag person randomly.... 😂😂
cj
i suppose, you should not tag person randomly.... 😂😂
that wasn't a random tag, and he's not a random person 🤷‍♂️ it has an intention, you'll see when you see it you should start learning to differentiate things 🙄
cj
😂😂😂
for real... I'm not kidding 🤷‍♂️
Macurrent
Is it a good idea to create virtual environment inside your app?
cj
Is it a good idea to create virtual environment inside your app?
I have all the virtual environments in a separate folder (even in a separate partition) and the projects in another folder... but it's up to you, as long as you know what you're doing
cj
Why do you make them in search a manner.. And by the way, i did not see your virtual environment folder in that project
why do you want to see a virtual environment in the project when I clearly said I have them in another separate folder in another partition?
cj
Ok. And it seems virtual environment is not being shown in git projects
why on Earth would to add the virtual environment folder on git???!!! 😱😱😱😱
cj
cj
Anders (izzno / gooood) 🇳🇴
Can someone please recommend a good watch on SQL theory. The main thing Im confused about is how you would go about adding say a category to a hierchi, after production. Let's say you now have a product "item" which has categorie "phone". Now I want to add a subcategory "smartphone".. ( Phone -> SmartPhone -> Item ) So I would have to add a model "subcategories" and then add that to the "item" model with a default... What do you guys do to prepare for this. Ad 10 "level" models right away and just rename them as you need them?
🏳️‍🌈Robby [ Private Message = Spam]
Anders (izzno / gooood) 🇳🇴
source = args.override | config['SETTINGS']['source'] Can you do something like this in python
Anders (izzno / gooood) 🇳🇴
yes
Anders (izzno / gooood) 🇳🇴
It did not work ;)
🏳️‍🌈Robby [ Private Message = Spam]
yes
https://docs.python.org/3/reference/expressions.html
Anders (izzno / gooood) 🇳🇴
I want to assign args.overrride IF it exists if not config....
Anders (izzno / gooood) 🇳🇴
if this assdasad else Asdasdas
Anders (izzno / gooood) 🇳🇴
its long
🏳️‍🌈Robby [ Private Message = Spam]
foo = "somevalue" if whatever else "other value"
🏳️‍🌈Robby [ Private Message = Spam]
Python ternary equiv.
🏳️‍🌈Robby [ Private Message = Spam]
@izznogooood ☝️
Anders (izzno / gooood) 🇳🇴
aha! :)
Anders (izzno / gooood) 🇳🇴
Thenk you
Anders (izzno / gooood) 🇳🇴
Ternary! Thats the word.
Muflone
variable = value_true if condition else value_false OR variable = condition and value_true or value_false
Anders (izzno / gooood) 🇳🇴
source = args.override if args.override else config['SETTINGS']['source'] <— still a bit redundant ?
🏳️‍🌈Robby [ Private Message = Spam]
Muflone
in the latter form, value_true MUST be a statement which is evaluated as true (not empty lists and so on)
🏳️‍🌈Robby [ Private Message = Spam]
Python is really food about conciseness
Anonymous
How to understand channels anyone?
Mirco
How to understand channels anyone?
Did u read docs about them ?
🏳️‍🌈Robby [ Private Message = Spam]
How to understand channels anyone?
read the docs and ask specific questions
Anders (izzno / gooood) 🇳🇴
https://pastebin.com/62hCJKaU Thanks ;)
Anders (izzno / gooood) 🇳🇴
I use multiple computers and was so tired of keeping track of the env files.. So i reinvented the wheel and now i keep them in a cloud folder ;)
🏳️‍🌈Robby [ Private Message = Spam]
git-crypt is cool :)
Anders (izzno / gooood) 🇳🇴
🏳️‍🌈Robby [ Private Message = Spam]
I use that actually
🏳️‍🌈Robby [ Private Message = Spam]
If PGP gets compromised, then we're fucked anyways
Anders (izzno / gooood) 🇳🇴
true...
Felex
hello,i have successfully configured my centos / nginx server.When i check my ip address in the browser, i get the welcome page for nginx.I can i configure my nginx.conf file so that i can access my project homepage instead of nginx homepage...thank you
Felex
This is the default index.html page that is distributed with nginx on Fedora. It is located in /usr/share/nginx/html. You should now put your content in a location of your choice and edit the root configuration directive in the nginx configuration file /etc/nginx/nginx.conf.
Felex
this is the message i get in my homepage
Felex
server { listen 80; server_name xx.xx.xxx.xx; location = /favicon.ico { access_log off; log_not_found off; } location /static/ { root /home/user/Houses; } location / { proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://127.0.0.1:8000; } } }