inchidi
s/heruko/heroku
Anonymous
Lol
Mounikesh
https://pastebin.com/p60PXyHM
Mounikesh
guys when i use delete in my browsable api
Mounikesh
popped up with an error
Mounikesh
AttributeError at /api/list/ 'NoneType' object has no attribute 'delete'
Django Bot
>> Links - python - How to suppress the deprecation warnings in Django? - Stack Overfl
Django Bot
>> Links - GeoLite2 Free Downloadable Databases « MaxMind Developer Site
Asaduzzaman
I want to learn Postgresql
Asaduzzaman
How can I start ?
Maz
By installing it.
Anonymous
hi every one i trying forward my request to another project in another location and i creat a relation beetween of them(on port:8040 for example)but i cant edite my nginx turly can you help me ??? i will thank you
Anonymous
server { listen 80; server_name www.example.com; location = /favicon.ico { access_log off; log_not_found off; } location /static/ { root /home/majid/intec; } location / { include proxy_params; proxy_pass http://unix:/home/majid/intec/intec.sock; } location /AdultContentDetection/{ include proxy_params; proxy_pass http://127.0.0.1:8040/; } }
Shivam Negi
Can anyone tell me what is nginx and from where i can start that...
Anonymous
Can anyone tell me what is nginx and from where i can start that...
is a service for production your web project and after you install it on your vps and confige it with gunicorn you can see your web app in internet
Anonymous
(and you most add your domain at last )
Anonymous
Can you send your whole nginx file ?
server { listen 80; server_name www.example.com; location = /favicon.ico { access_log off; log_not_found off; } location /static/ { root /home/majid/intec; } location / { include proxy_params; proxy_pass http://unix:/home/majid/intec/intec.sock; }
Shivam Negi
Ok
Anonymous
right file
Anonymous
This is different than what you've sent before.
yes it was run and didnt work turly
Anonymous
😜
Mounikesh
guys is there any way i can get data from another source as json and using django rest framework saving it to my database or models
Mounikesh
use requests
yes requests is for getting data
Mounikesh
how to save it in our database
Mounikesh
through rest api
inchidi
r=request.get(url) r.json() # you will get dict/list
Mounikesh
r=request.get(url) r.json() # you will get dict/list
yes but the real qn is if this json data has a id and username feild then how am i going to add those data with those feilds in my models which is programmed to have those two feilds like adding that json data to my database all the data
Mounikesh
assume my class dj (models.mode)l: id = models.charfeidl username=models.charfield and assume my json response as [{ id : "django " ,username:"python "}] see if this is my json response how can i add that json response to my models or data base as objects so that i can view them in my admin section of dj
inchidi
then you can do r=request.get(url) datas=r.json() for data in datas: Dj.objects.create(**data)
Mounikesh
actually i want to figure out a way to create those objects using create model mixin in django rest api
Abhi
hey guys, I have created a django app on digitalOcean server with nginx,gunicorn and postgres the setup was working fine until I included livereload in my settings.py
Abhi
the setup works on my local machine by simply running runserver command
inchidi
actually i want to figure out a way to create those objects using create model mixin in django rest api
use create model mixin if you want to post data to your server and use request if you want to retrieve data to your server
Abhi
but for django I get the error: ImportError: No module named 'livereload.middleware'
Abhi
and other bunch of stuffs
Abhi
I did!
inchidi
which package it is btw?
Abhi
livereload
inchidi
pip install livereload?
Mounikesh
but for django I get the error: ImportError: No module named 'livereload.middleware'
may be you need to check the settings and recheck everything according to docs
Abhi
when i import livereload in python shell, it is successful (on my server)
inchidi
yep did it
both v2.5.2? if i am you, i will pip freeze both local and server and compare the result
Abhi
both v2.5.2? if i am you, i will pip freeze both local and server and compare the result
My bad! installed livereload instead of django-livereload-server 😅
Django Bot
>> Links - geex-arts/django-jet: Modern responsive template for the Django admin inter
Django Bot
>> Links - radzhome/python-twitter-django-tags: Useful python-twitter template tags fo
N S
How to make a choices field editable in modelformset factory
inchidi
i dont really get what you mean, form input as table {{ form.as_table }}? which table you want to render the input or the output?
inchidi
then pass the queryset as response context, iterate it as table row
Django Bot
>> Links - Adding dynamic dns hostnames to Django INTERNAL_IPS
inchidi
i just remember that you are the one who ask this question at @python yesterday (i can see deleted message tho). just friendly reminder that following tutorial from official docs faster than asking ppl without understanding the concepts
Jimmies San
because it's not a thing like "read here at page 2". it's something about the framework. what you need it depends from various thing: are you using functional or class based views? or we are talking about a form?
Jimmies San
at least: share your code maybe people well understand your issue and can help you better.
Jimmies San
you guess? you don't know what code are you writing? as inchidi tells you: go to study before. ask after. thanks.
Jimmies San
I'm not angry. but it is not respectful to ask for help without knowing what we are talking about. so: study or share your code [using dpaste], and share your errors [with dpaste] and maybe someone help. or try with anonther tutorial :) ps: django is opensource.
inchidi
since you said the output, then actually its not form part but view and template part. this part of the tutorial explain how to do it, the different is they use list as example and what you need is table. what i want to say is its similar with learning multiplication, instead learning 92*2=184 learning the concept that 92*2=92+92 better
r0b0t
Hey guys... I'm getting a form field error 'This field is required' yet I have a value in that input field...its a select box... who knows where the problem might be?
r0b0t
https://gist.github.com/r0b0tt/fce561fa5d4987689169ebdfb6921a58
r0b0t
Thats my template
inchidi
and your model?
r0b0t
https://gist.github.com/r0b0tt/3989f7ea0d20668ddbd5a980680034a8
r0b0t
Thats my class based View
r0b0t
https://gist.github.com/r0b0tt/4f6c84e600ec280bb8bf662cf16d80d3
r0b0t
Theres my model
r0b0t
The selecy box is for the new social worker
inchidi
https://gist.github.com/r0b0tt/fce561fa5d4987689169ebdfb6921a58
you didnt provide prev_social_worker, case, prev_agency there
r0b0t
I've overriden form.is_valid() in the CreateView and added the data there.
ʚɞÇherry Łoveʚɞ
pastebin.
syam
any gitlab alternatives for pyup.io