Adonis
how are you doing registration ? with a third party plugin or not ?
Adonis
ok great
Mahdi
Yup! Ask if u have troubles
I give u the stackover flow link
Mirco
I give u the stackover flow link
Try to explain your issue before linking to stack
Adonis
it seem like he want an approach !!
Mahdi
https://stackoverflow.com/a/52497025/9341824
Adonis
@HellPirate is it right ?
Mirco
Exactly
So u need different type of user ?
Leonardo
Seen it and np, hope you fixed it
yeah they fixed... well, like i was saying, i exposed to all because i don't know how to do it with another way...
Leonardo
that's just a test
Leonardo
i prefer expose to all instead configure a wrong ip
Mirco
Exactly
https://simpleisbetterthancomplex.com/tutorial/2018/01/18/how-to-implement-multiple-user-types-with-django.html have a look at this approach
Mahdi
Why ? Which problem ?
How to do it, i mean the form?
Mahdi
Why ? Which problem ?
Creat two model forms and instantiate each one in view?
Mirco
why two model forms ?
Mirco
You need ImageField inside your User model
George
hi, i need someone to crawl this mess a bit https://pastebin.com/H3sp5A7S I got a magic form that doesn't work properly :D
Mirco
@MahdiDoDo https://docs.djangoproject.com/en/2.1/ref/models/fields/#imagefield Have you read this one ?
Mahdi
You need ImageField inside your User model
How🤔🤔 I meant add a one to one field.
Mahdi
If I ask more clearly I wanta extend user model and add a profile model then register a user specified with that model.
Mirco
If I ask more clearly I wanta extend user model and add a profile model then register a user specified with that model.
https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html this one can help you with extending user model imho https://docs.djangoproject.com/en/2.1/topics/auth/customizing/#extending-the-existing-user-model
Anonymous
If I ask more clearly I wanta extend user model and add a profile model then register a user specified with that model.
You can create a profile model and registration view function u can call both user and profile model to register
Anonymous
And more over while creating a profile model u had to create a one to one field link to user model and profile model for further use
Anonymous
Ok
Mirco
I'll share u my code hope u help me
Share here with pastebin so everyone can help you and learn from your issues If u agree with me 😀
Mirco
https://pastebin.com/
Mirco
👌👌👌
Anonymous
Dear people, please give advise have 2 models: class Users(models.Model): telegram_id = models.IntegerField() class Shop(models.Model): owner = models.ForeignKey(Users, on_delete=models.SET_NULL) name = models.CharField(max_length=100) How to get telegram_id from class Users in django-admin? from .models import Shop @admin.register(Shop) class ShopAdmin(admin.ModelAdmin): list_display = ['name'] fields = ('name', telegram_id)
Anonymous
Hi
Anonymous
Please how can i avoid the JsonArray and have a json code whithout itireation issues
Anonymous
?
Anonymous
user = serializers.serialize('json', [user]) return JsonResponse(user, safe= False)
Anonymous
Is there any reference for all the django inbuilt decorators like @staticmethod , @loginrequired etc any reference please
Anonymous
???
Anonymous
+1
??
Firdaus
Is there any reference for all the django inbuilt decorators like @staticmethod , @loginrequired etc any reference please
i think @staticmethod is Python built-in decorator. Not unique/exclusive to Django. I don't think there is a list of all Django decorators. Best way I can think of is to: go to Django API Reference page (https://docs.djangoproject.com/en/2.1/ref/) and then go to specific component. For example Views go to https://docs.djangoproject.com/en/2.1/topics/http/decorators/
Sharif
Hi, I need a licensed server for PyCharm 2018.2, please send me!
Sharif
wow ok
ʚɞÇherry Łoveʚɞ
wow ok
i dont think this is good place to sharing key crack.
darksied
darksied
Using cracked software it's piracy and piracy is crime.
Sharif
thanks
Firdaus
Hi, I need a licensed server for PyCharm 2018.2, please send me!
There is a difference between Free/Open Source Software vs pirated software :-)
Sharif
I learning python now, so i do not know how activation
Bakhrom
Sharif are you student?
Akash
Hi, I need a licensed server for PyCharm 2018.2, please send me!
Use your edu email address to claim a 1 year free copy. Or simply use community version it’s sufficient for learning.
Adonis
Huh did you check the docs ?
aan
Visual studio code is free
Mirco
Atom too 😀
aan
I use visual studio code for python and javascript
Anonymous
atom and pycharm
aan
Atom have python plugin?
Adonis
PyCharm Community
aan
Maybe i should try use atom
Mirco
Maybe i should try use atom
and it's plenty of cool packages e.g. run inline code as you do when playing with python console
inchidi
imho for web dev especially django app, pycharm community not a good option since it doesnt support django and css. vscode best option for free editor for django i think
inchidi
even though pycharm pro give best support and features for django app dev
Bakhrom
even though pycharm pro give best support and features for django app dev
yep. I tried many alternatives but not found tool better than pycharm pro for django.
Bakhrom
Just get edu license from jetbrains.
Sharif
aaa ok, but it needs 7-8 days