Re: New to Django (stuck at the end of the tutorial)

2016-04-26 Thread Patrick Harding
maybe giving it a namespace would handle it for you? such as 
 include('sistema.urls', namespace='sistema')

if not you can try this. the error i get is that you should "pass the 
callable instead" which means in your imports include the views that you 
want to import, then call them in you url statements.
for example:

from .views import (
post_list,
post_create,
post_detail,
post_update,
post_delete,
)

urlpatterns = [
url(r'^$', post_list, name='list'),
url(r'^create/$', post_create, name='create'),
url(r'^(?P\d+)/$', post_detail, name='detail'),
url(r'^(?P\d+)/edit/$', post_update, name='update'),
url(r'^(?P\d+)/delete/$', post_delete, name='delete'),


]


here you are calling the view, then giving it a name that will show up in 
the URL.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9f969947-ced2-4414-9c6f-8a53cf0022a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Trying to extend the User model to create a user profile page

2016-04-26 Thread Patrick Harding
I am creating an app for our company to have users log in, create a profile 
page, and create updates on some personal progress. I have handled logging 
in and registering with django-registration, and have created the app for 
updates, but i'm not able to create a profile page extending the user's 
information. 

I've tried a few ways to do it (django-custom-user, a few tutorials, 
documentation, etc.) but I can't seem to make it work right. I'm assuming 
it would be a good idea to create an entirely new app for this profile 
page, allowing the user to create on the initial login and edit as changes 
require. I have these capabilities already in the updates section. How can 
I make this work right? 


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7394b722-dce2-4c0f-865c-0c3f286781a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.