Anonymous
Anonymous
Felix
certified = models.ForeignKey('Company',
related_name='%(class)s_owner',
on_delete=models.CASCADE, default=None
)
authority = models.ForeignKey('Company',
related_name='%(class)s_authority',
on_delete=models.CASCADE, default=None
)
Felix
Why do i get an error when i’m double referencing?
Felix
...
raven
it shouldn't if you have different related name specified
Felix
Felix
found one related name with the same string
raven
have you tried hard coded those name?
raven
like
certified = models.ForeignKey('Company',
related_name='Class_owner',
on_delete=models.CASCADE, default=None
)
authority = models.ForeignKey('Company',
related_name='Class_authority',
on_delete=models.CASCADE, default=None
)
Anonymous
Anonymous
Anonymous
https://pastebin.com/Ysz4MiG1
Anonymous
Anonymous
yes
Anonymous
Anonymous
Anonymous
simply given fieldName but thats not happening.I think i need to implement for loop.
Anonymous
in your template.
{% for data in datas %}
<p>{{data.name}}</p>
<p>{{data.age}}</p>
<p>{{data.gender}}</p>
<p>{{data.merital_status}}</p>
<p>{{data.Number_of_dependents}}</p>
<p>{{data.capiral_income}}</p>
.
.
.
.
.
<p>{{data.Property_type}}</p>
{% endfor %}
Anonymous
Anonymous
Anonymous
on writing logic,when i iterate over model,it is showing model objects are not iterable
Anonymous
Anonymous
Anonymous
it works bro,but I want to make it in dynamic instead of static
Anonymous
Ansab
My crone job is not running.... Anybody here to help me..... Pls😒😒😒
Anonymous
You can try that, First you have to store some datas into database and then go to template or refresh that its will retrieve data
ashish
Ansab
Ansab
Ok.... I did it
Adarsh
Hey how can I run my local Host on my friend's laptop?
Muflone
Hey how can I run my local Host on my friend's laptop?
1. In your development PC create a virtualenv
2. Add every 3rd party required python package to requirements.txt
3. Move the application inside the virtualenv
4. Activate the virtualenv
5. Install requirements.txt using pip -r
6. Test your application
These steps are that you should always do while developing in Python
Adarsh
To add data
Muflone
Then you don't need to install it in your friend laptop, just let your friend to connect to your IP address
Adarsh
Thanks
坂田銀時
Ssh is better than allowing direct access
Muflone
How can it be better?
Anonymous
Hello people?
So jumping right to my point
Alot of people told me that
$ virtualenv venv1 --system-site-packages
is reckless to include packages in my virtual environment
Muflone
Anonymous
when i create a venv with that command all the packages are accessible inside the environment but how can i download only selected packages offline from the archive?
i have not internet connection, i only use mobile data!
Anonymous
@il_muflone is it possible 👆👆👆
Muflone
Anonymous
Muflone
all your installed python packages
Anonymous
Anonymous
Muflone
what you want to obtain from your virtualenv?
a complete environment or a sane environment where you get only what you explicitly installed?
choose one
Anonymous
Muflone
then you have to install them explicitly (and don't use --system-site-packages)
Prasanthari
Use anaconda it's really useful for these
Muflone
Anonymous
Anonymous
Anonymous
Anonymous
Muflone
but you'll get what your distribution offers, only
Muflone
what os are you using?
Anonymous
Muflone
ahah
Anonymous
Muflone
ok, first you must know where your system packages live.
see into /usr/lib/pythonX.Y/site-packages
Muflone
or something similar
Anonymous
Anonymous
there are python3, python3.6, python3.7, and python 3.8 in that path
Muflone
it depends on what you use, execute python and look by yourself
Anonymous
3.6
Muflone
then find your django package from there