🏳️🌈Robby [ Private Message = Spam]
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
Eduardo
🏳️🌈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/
Shiva
🏳️🌈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
Macurrent
cj
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
cj
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
Macurrent
cj
use a clean, new, shiny, virtual environment
cj
cj
I tred my best...
... now just wait for @robbyoconnor 😉
Anonymous
Macurrent
Is it a good idea to create virtual environment inside your app?
Macurrent
Macurrent
cj
cj
Manish
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
🏳️🌈Robby [ Private Message = Spam]
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
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
Mirco
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;
}
}
}