Mouleswaran
Can Java servlet projects converted to Django or flask
inchidi
inchidi
Mouleswaran
How I can start with changing the Java servlet project into Django project; what basics I need to work upon
inchidi
inchidi
i mean what do you know about django?
Mouleswaran
I have gone through first few django tutorial chapters
Mouleswaran
And setting up sample project
Anonymous
Why do you want to convert?
inchidi
but am not sure you are confused or just procrastinating tho
inchidi
Django Bot
>> Links
- Material Design for Django
- Sasha's pony checkup
- Django Tip: get_FIELD_display() - Dustin DavisDustin Davis
- How to Render Django Form Manually
- danirus/django-sample-app: A django sample app, with setup, unittests, docs
- PauLoX – Full-Text Search in Django with PostgreSQL
- Django Powering A Single Page App
Someone
I have a doubt .. i am developing a rest api for a registration form .. I have a field for resume file.. i can able to add file to correct path from admin.. however am getting some ever when i do from api itself .. am getting 404 error.. not sure what i did wrong .. any help would be great
Anonymous
How can we know without your code
Someone
https://pastebin.com/VRHRViLm
Someone
inchidi
https://pastebin.com/VRHRViLm
not solving your issue, but change your view to:
class SolutionUpload(generics.CreateAPIView):
serializer_class = SolutionUploadSerializer
permission_classes = (permissions.AllowAny,)
clearer imo
Someone
inchidi
you will get different error (if error) for sure, but not 404 for every create failure
Someone
Now am getting connectionerror
Someone
Errno 111
inchidi
can you open the link via browser?
Someone
Sorry my mistake .. due to some error server was not running now i crted it..
Someone
Am noob... if questions were basic really sorry..
inchidi
how is your code looks like now? just the views.py enough
Someone
Yet to change as per ur suggestion
Someone
Do u want me to change now?
inchidi
give it a shot
inchidi
both given from rest_framework import generics, permissions btw
Someone
Ya done .. now also am able to upload from admin
Someone
But from api error
Someone
Am including file only still its showing not a file...
inchidi
Anonymous
That's not readable
Anonymous
Better copy that log and share it via hastebin
Someone
https://hastebin.com/zuzehuvedo.py
Someone
Someone
https://hastebin.com/raw/zuzehuvedo
Someone
inchidi
any reason to not using drf?
Someone
Am using rest framework only
Anonymous
There is no template api.html
Someone
Thanks .. I just dint add it in installed apps.. now am getting template
inchidi
can you upload a file from there?
Someone
From html form yes..
inchidi
then your api works, but something wrong when you are using your tools (http) .
i will suggest you curl or if you prefer gui try postman
Someone
Okies ... thanks😊
Someone
Thanks a lot @inchidi @Sin_atra
Django Bot
>> Links
- Awesome Django
- Django / List.community
- Django 2.0 Tutorial for Beginners
- PauLoX – Full-Text Search in Django with PostgreSQL
- Best choice for a CMS package? - django
- django-elasticsearch-dsl 0.4.4 : Python Package Index
- Users, Groups and Permissions - Python Django Tutorials
- How can I get data from Django into R? - Stack Overflow
- Which framework should I learn: Django or Node.js? Why?
- Considering switching from Node.js/Express to Django and have some question
Django Bot
>> Links
- My essential django package list — /var/
Django Bot
>> Links
- Django ModelForm and Conditionally Disabled (Readonly) Fields – Ramblings o
- python - Set attribute of all fields in Django ModelForm in init method - S
Audacious Tux
why username field appears? i have USERNAME_FIELD set to email
Audacious Tux
if i copy the exact META class i get email as expected
Audacious Tux
bug or what? am i missing something? 😐
Django Bot
>> Blogs
- Hola, PyCon Colombia!
- QuickTip: Django and AngularJS Conflicting Interpolation Symbols
- Adding JWT Authentication to Python and Django REST Framework Using Auth0
>> Links
- SQLAlchemy and Django · BetterWorks Engineering Blog
Vulnz
;)
inchidi
bug or what? am i missing something? 😐
try open your django shell ( python manage.py shell )
import UserCreationForm and create your class (ModUserCreationForm) again there (inside your shell)
then do UserCreationForm.Meta.fields then ModUserCreationForm.Meta.field
if the result different, then its probably a bug, but if its same then maybe you have double ModUserCreationForm class
Django Bot
>> Links
- Prerequisites and Assumptions
- Twitter
inchidi
dont import your ModUserCreationForm, make a new one there
Audacious Tux
umm... ok ... wait
Audacious Tux
inchidi
no, i mean the
ModUserCreationForm(UserCreationForm):
pass
there
inchidi
so the possibilities are you are calling wrong ModUserCreationForm class or you define USERNAME_FIELD in wrong place
inchidi
there you are
inchidi
put USERNAME_FIELD = .... in your settings.py
Audacious Tux
shouldn't it be in user model? 😮
Audacious Tux
is it new in django 2.0?
Audacious Tux
i mean i never saw doing this in any tutorial... neither in django core user model 😐
inchidi
and you set it too late, the way to override USERNAME_FIELD value before called is set it in settings.py