Adil
i mean of course, ive been learning django for a while, i know how mvs works, how to write view, models, forms and stuff
Adil
mvc*
Adil
Im Just a bit stuck on what to do next, how to continue.I think about writing projects, but cant think of one
None
Adil
What is DRF?
Adil
Django Rest Framework?
Mirco
Adil
As i notice, pure django forms aren't used much, its replaced with Rest, am i right?
Adil
also i suck at front-end 😄
Adil
Hmm, so, should spend a lot of time on learning pure django forms, views, or, should start looking at integration with React and so on?
iwalkalone
Hello,
I have just started with django. Would need some suggestions to solve the following:
I have some python script which iam running on CLI which takes input as a URL and then the same python script generates a text file and saves it in the same directory where i have that python code.
I would like to use this python script as as an app on my django project. So, that when a text file is generated iam planning to get a slack notification from the application regarding the same.
Thanks in advance and any suggestions would be really appreciated.
cj
mvc*
just to start, django is not MVC nor any other MVsomething
Adil
Adil
If not please correct me
cj
cj
cj
If not please correct me
please read 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
Adil
Thank u😄I wish I'd started communicating with people here times before😃
Adil
my appreciations 😇
Neo
Hello all
Guillermo
Hmm, so, should spend a lot of time on learning pure django forms, views, or, should start looking at integration with React and so on?
Imo, classic forms, views and templates still hold a lot of value and are very much worth learning. Not every project needs react, vue, angular, etc
Neo
can anyone is kind enough to give any guidance on how can we use class based modelform views for all fields with or without relation to other models
Adil
Indeed
Adil
What would u advice in front-end? Html, Css, Js, Bootstrap?
Guillermo
Depends on the needs of the system, is it a simple website with a few forms por a very interactive app with lots of state in the frontend por something in between?
Adil
Front like for the simple shop website. Im really bad at it😔
Adil
I understand front end harder than backend 🌚
Sampreeth
Can I know how to implement an API in django
cj
Sampreeth
Countries and states
Sampreeth
No I need a drop down box to show the countries
If the user selects a specific country
The next drop down box must show that country related states
cj
Sampreeth
Sampreeth
cj
tip, the easiest and quickest one you can implement in django is API REST
Sampreeth
Adir
Hi everyone,
I am working on a web server and I want to use an authentication to the website via Twitter. I am using social-django for that, I opened an app on twitter and set my callback url to http://127.0.0.1 (working on localhost) and it doesn't seem to be working. Can somebody please help me to solve this issue?
cj
Adir
cj
cj
try to use a proper OS, it should work
cj
😄
cj
at least, that's how I have it working
Adir
cj
your localhost:
django + nginx + /etc/hosts just say, mysite.com (hacky but works)
twitter callback url:
mysite.com/your_callback_url
works!
Ronald
Morning guys.
I’m trying to figure out the oupdate_or_create function.
So just to like make sure, if I run the following,
obj, created = Person.objects.update_or_create(
first_name='John', last_name='Lennon',
defaults={'first_name': 'Bob'},
)
If first name ‘John’ exists in my db, but suddenly the last name is now “Mercury”, it will only update the last_name field, but if they are both different, it will create a new field?
Ronald
I’m thinking maybe I should use that with primary key
Ronald
to make sure nothing clashes
Ronald
the above is just example from Django docs
Nizzle
Hello.
How can I clear django sessions when user leave or reresh the page ?
Code9
Code9
response.delete_cookie?
Nizzle
request.session['publicKey'] = publicKey
request.session['privateKey'] = privateKey
Nizzle
I am adding public and private keys to session when user import their wallet through website. My question when user leave the page or refresh i need to clear session data
Nizzle
SESSION_EXPIRE_AT_BROWSER_CLOSE
Nizzle
Станислав
Hey guys. who can help me protect the API?
I have api for web client. it uses CORS of course.
What about mobile apps? How should i protect API?
inchidi
satyam
hii
satyam
module 'django.contrib.auth.models' has no attribute 'PersmissionMixin'
satyam
what is this suppose to mean i am using pycharm and its is not showing any error while running server i get the error
Googlom
maybe PermissionsMixin?
satyam
what do i have to solve this error ??
Anonymous
use ssl
does that really help?
inchidi
satyam
Anonymous
Hello how do I connect a Django web app with ESP8266 WiFi module
Dcruz
Hello everyone!
Dcruz
im trying to upload data to the database using POST method but i get MultiValueDictKeyError :S
Mirco
satyam
i am not able to upload image in this group
satyam
ok
Dcruz
def addclient(request):
if request.method == 'POST':
Cliente.name = request.POST['nombrec']
Cliente.lastname = request.POST['client_apellidos']
Cliente.idnum = request.POST['id_carnet']
Cliente.contract = request.POST['contrato_no']
Cliente.enterprise = request.POST['empresa']
Cliente.save()
return HttpResponseRedirect('/')
else:
nombresempresas = Enterprise.objects.all()
return render(request, 'addcliente.html', {'empresas': nombresempresas})
Mirco
It's a way to invite y'all using pastebin or similar for sharing code