cj
MVT :)
https://docs.djangoproject.com/en/2.1/faq/general/#django-appears-to-be-a-mvc-framework-but-you-call-the-controller-the-view-and-the-view-the-template-how-come-you-don-t-use-the-standard-names
George
Hi, i got a duplicate key error when saving to a database with existent objetcs.
1st I wrote three rows manually with my db admin
2nd i saved a new object and it tried to save in the first row
3rd i repeated but each time it tried to save with id++ till there was an empty space
Mirco
Jimmies San
George
Nope
Jimmies San
share code :)
George
Each time i did an insert django tried to save on a primary key 1, 2, etc
George
I cant share the code but its nothing special
George
But primary keys 1,2,3 where already used so till the fourth insertion it didnt work
George
Mind a model with a single name field, a view that pics the form and saves my name field.
Jimmies San
George
Postgresql
Jimmies San
how you generate pk?
George
Automatically i guess
Eka
https://docs.djangoproject.com/en/2.1/faq/general/#django-appears-to-be-a-mvc-framework-but-you-call-the-controller-the-view-and-the-view-the-template-how-come-you-don-t-use-the-standard-names
George
But i inserted manually some values
George
The pk is generated by django
George
Should it check what is the last pk used?
Jimmies San
should. yes.
Jimmies San
but we don t know your env and your code.... check log debug . of db too
George
Hum ok
George
My env ok
SEPIDE
Hello guys
I searched this question on google but i dont give an answer
I wanna make a virtualenv
But it write : zsh : command not found virtualenv
SEPIDE
I deleted and inatalled virtualenv again🤔but...
Vaibhav
https://pastebin.com/5bVKtyTV
Vaibhav
hello..i am ing the above error
Vaibhav
Getting*
Rohan
SEPIDE
Rohan
Yeah
https://gist.github.com/Geoyi/d9fab4f609e9f75941946be45000632b
SEPIDE
Rohan
pip3 list
r0b0t
Try this:
virtualenv -p python3 envname
SEPIDE
Always it shows an error that zsh : command not found virtualenv
Rohan
Rohan
Focus on the 3 at the end of pip3
SEPIDE
Rohan
python3 -m venv myenv
SEPIDE
Anonymous
Hi i know it is out of topic, anyone looking for freelancer for Django projects pm me.(full stack).
Akash
inchidi
i'll allow it since no on-topic convo going on
Jimmies San
Jimmies San
or use pipenv
Jimmies San
Anonymous
are there any body help me ?
i can't run spark on my pc :(
Jimmies San
Anonymous
Jimmies San
use dpaste or similar tool to share code/errors, thanks
Jimmies San
read the second line
Jimmies San
As the error suggests, add the SPARK_LOCAL_IP in the /etc/dse/spark/spark-env.sh file
SPARK_LOCAL_IP="<IP address>"
Jimmies San
you need java, scala and hadoop btw
Anonymous
Jimmies San
all of them ? 😐
so you're trying to use spark without read any documentation about that?
have fun :)
Jimmies San
no docs no party
Anonymous
no docs no party
no realy this is my frist try to start and run spark for learning
Anonymous
i read docs but in it have no info for fix this error ?
Jimmies San
read docs "how to install apache spark from scratch" and maybe you will read what you need: java, scala etc etc
Anonymous
Anonymous
Anonymous
Anonymous
it was topic off anyway you help me :)
Vaibhav
I want to make a program like whatsapp and instagram stories which will appear for 24 hr only?
Vaibhav
Can anyone help me in this?
Anonymous
Hello guys, writing here only because I haven't found enough info on the question in docs
Anonymous
I have multiple users, which have one to many relationships with other models, which in their turn have it too. And I have to set permissions so that only owners of these' model instances can view and change them
Mirco
Anonymous
Mirco
Anonymous
Yw 😀
Okay, I read and think I understood
Anonymous
I have to generate custom permission class for each instance of auth.models.User, I guess
Anonymous
I just don't know how yet...
Anonymous
in initialization of each User instance, I guess