Anonymous
Then Django
Yashwant
Ohh in shell, ok!
Yashwant
And this is a 4 member project, of which I'm working alone.
Anonymous
Davo
Yashwant
Anonymous
Yashwant
Anonymous
What are your teacher expecting from you.
Davo
Yeah!
So are you supposed to do it in web2py or was that just recommended?
Yashwant
That's why I'm kinda relying on you guys to help me out.
Yashwant
Davo
Ohhh
inchidi
at least you are not wrong in choosing django for your one week project
inchidi
Recommended.
did you know another recommended things? move on to python3 :3
Yashwant
Yashwant
Hey umm @DimasInchidi can I PM you?
Yashwant
Ok!
inchidi
Yashwant
Fuck!
Yashwant
Ok
Anonymous
first of all. Stop using python2
Yashwant
I'm in the middle of a project man, I'd love to do that but not right now. 😓
Yashwant
And also, if anyone can contribute I'd be more than greatful
https://github.com/Y45HW4N7/profile-management/tree/wip
Anonymous
the hierarchy of you project is pretty fucked up
Anonymous
you shouldn't have used django at first
Yashwant
Not knowing web development/frameworks, that was the best option I had.
Anonymous
you should have used flask
Anonymous
Btw what's your project about?
inchidi
just change birthdate="1987-12-17"
Yashwant
Btw what's your project about?
It's a Personal Profile Management System. It allows the user to add/edit/view their data, which is protected by a username & a password.
inchidi
Anonymous
it's only a small project
Anonymous
no production
Yashwant
inchidi
with user and login function, with django you can do this with less than 10 lines of code tho
Yashwant
Yashwant
inchidi
but you are not change anything yet there
inchidi
inchidi
lol yes
Yashwant
😅
Yashwant
👌🏼
inchidi
because you are using python2. use __unicode__ instead __str__
inchidi
move on to python3. its not take much time, just install python3
Yashwant
inchidi
inchidi
ah okay i think the return must be return str(self.age) + '-' + str(self.location)
inchidi
but am not sure, i never use py2
Yashwant
Yes!
Yashwant
@DimasInchidi a question. Should I just use the Django interface for the user (not the admin) to enter their details in and for the user to login/edit/view? Instead of creating a HTML page using urlpatterns?
And also wouldn't that make it easier?
inchidi
inchidi
Yashwant
Ohh ok
inchidi
but django provide login logout register views which is python function
Yashwant
So best way is to create a template using the urlpatterns & go in that direction?
inchidi
you can use those function and make it pretty with your template
Yashwant
inchidi
inchidi
i can give you example about that but later
Yashwant
Ok sure! Whenever you are free.
Yashwant
Is it possible to create a template, and then link that up with Django/the database? For example, I need to create a entry form which takes in details of the user & I do that using a bootstrap builder. How can I connect these two (the database and the frontend/form template)?
Ghazwan
Ghazwan
Create a list and detail views
Ghazwan
in your html template <a href='{% url 'yourapp_namespace:your_detail_name pk=object.pk' %}<li>{{object}}</li></a>
Ghazwan
after iterating through your {{object_list}} using for
Ghazwan
you will be using some weird-looking regex in your urls.py too
url(r'^(?P<pk>\d)/$', views.EntryDetailView.as_view(), name='detail')
Yashwant
ok will try this
Anonymous
Okay, I installed django. But it doesn't appear!