Anonymous
how to compile py in linux so i can avoid piracy,,?
Django Bot
>> Blogs
- Django Tips #20 Working With Multiple Settings Modules
Django Bot
>> Blogs
- Django 1.11+ django.contrib.auth Class Based Views - Part 1
Abhi
what is difference between "OneToOneField(to=Product)" and "models.OneToOneField(Product)"
Abhi
what does to does here ?
inchidi
Abhi
then what is the difference ?
inchidi
inchidi
its like
def sample(name, age=12):
print(name+str(age))
sample('myname')
sample(name='myname')
inchidi
Language:
python3
Source:
def sample(name, age=12):
print(name+str(age))
sample('myname')
sample(name='myname')
Result:
myname12
myname12
Anonymous
Do you agree that dango-registration-redux is a good app option for authentication? is there better options?
Anonymous
Thank you
Django Bot
>> Jobs
- Backend Software Developer (Python / C++)
Django Bot
>> Blogs
- Django Modellere Giriş
Abhi
Anonymous
👍
inchidi
inchidi
what is the main reason redux great?
Lapanit ☃️
https://www.reddit.com/r/forhire/comments/6ldojq/hiring_remote_front_end_django_developer/
Anonymous
Lapanit ☃️
or something?
Lapanit ☃️
is it blurry?
Anonymous
Haven't read the post entirely yet, kust the title
Anonymous
Just*
Abhi
https://www.reddit.com/r/forhire/comments/6ldojq/hiring_remote_front_end_django_developer/
Lapanit ☃️
Lapanit ☃️
I dont understand
inchidi
🤔🤔
inchidi
Django for front-end ?
maybe thats how ppl call someone who can design web and know how to use exclude include
Abhi
https://medium.com/@theparadoxer02/user-groups-with-custom-permissions-in-django-9eaea67b220e
Django Bot
>> Blogs
- Try Django 1.11 has landed.
Django Bot
>> Blogs
- Django Framework ve Güvenlik
- Django AbstractUser ile Genişletme
- Django Code Review
- The Purpose of Business
- The Purpose of Business
Django Bot
>> Blogs
- AJAXify Django Forms
Anonymous
Guys
Anonymous
I have to create a user database
Anonymous
And I'm using User class from Django
Anonymous
But it's missing some fields
Anonymous
Hence I created other model with having one to one relationship
Anonymous
Now I want to use modelform to fill them
Anonymous
How do I do that?
Anonymous
Any body have time to build a site for small photography startUp,,?
Anonymous
Actually i dont, im just joking,, 😋 that was a genetic algorithm,,
Lapanit ☃️
☹️
Anonymous
Lapanit ☃️
Creative is not the same as annoying
Django Bot
>> Blogs
- Ask Vitor #3: Mocking Emails
inchidi
Now I want to use modelform to fill them
if you want to add form to fill them at django admin you can simply create admin inline looks like this
from django.contrib import admin
from django.contrib.auth.models import User
from django.contrib.auth.admin import UserAdmin
from MyProject.my_app.models import UserProfile
class UserProfileInline(admin.StackedInline):
model = UserProfile
verbose_name_plural = 'Users'
# ... etc etc ...
class MyUser(UserAdmin):
inlines = (UserProfileInline,)
admin.site.unregister(User)
admin.site.register(User, MyUser)
inchidi
but if you want to add the form in your template you can add this to your template
<form action="" method="POST" class="form">
{% csrf_token %}
{{ userform.as_p }}
{{ userprofileform.as_p }}
<button type="submit">Submit</button>
</form>
inchidi
and then you will need to create the view
def add_user(request):
# ...
if request.method == "POST":
userform = UserForm(data = request.POST)
userprofileform = UserProfileForm(data = request.POST)
if uform.is_valid() and pform.is_valid():
user = userform.save()
profile = userprofileform.save(commit = False)
profile.user = user
profile.save()
# ...
inchidi
and the the form is most important part, and i think this is the most simple example
class UserForm(forms.ModelForm):
class Meta:
model = User
class UserProfileForm(forms.ModelForm):
class Meta:
model = UserProfile
inchidi
How do I do that?
and the last thing is your url will looks like this since you already create your own view
url(r'^register/$', views.add_user, name='regis_user'),
Group Butler
Lenka, this kind of spam is not allowed in this chat (1/2)
ENOENT
sex spam, interesting
Lapanit ☃️
/ban
Group Butler
ᴅᴀᴠɪᴅ banned Lenka!
ENOENT
because I have no rights
Lapanit ☃️
Outrageous
Lapanit ☃️
Nonsense
ENOENT
heh thanks
Essa
https://knivets.com/blog/what-is-the-point-of-using-nginx-in-front-of-a-django-application/
Misael
Anonymous
hi kids
Anonymous
do any of u use django with pycharm ?
Anonymous
how is it ? i mean the community version
Misael
Yes, i do.
Anonymous
Yes, i do.
Does pycharm run js, html and css files just fine ?
Misael
Yes, no problem.
Anonymous
thank u a lot sir
Misael
👍
Misael
The PyCharm is great. The debug is amazing.
Anonymous
Is there a go group?
Anonymous
An answer would be nice damn 😑
Anonymous
Indonesian has GoLang grub,,
Anonymous
An Indonesian has a go lang group