Re: creating a loginpage

2016-09-14 Thread Andrea D'Amore
On 14 September 2016 at 17:44, Timothy Steele
 wrote:
> Instead of providing the view itself, i want to  pass its module path as a
> string in the urls.py file  as the code below
>
> urlpatterns = ['',
>  url(r'^$', main_page),
>  url(r'^user/(\w+)/$', user_page),
>  url(r'^login/$', 'django.contrib.auth.views.login'),
> ]

Use include() [1] for that, there are further info at [2] including a
shorthand for registering several urls at once and a login form
template.


[1]: https://docs.djangoproject.com/en/1.10/ref/urls/#include
[2]: https://docs.djangoproject.com/en/1.10/topics/auth/default/

-- 
Andrea

-- 
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/CAMonFrTVuJqx3qdiptYnb%2BLbcwtrnJs9dojwf-%3DxHf-GyrGduQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: ModelAdmin missing a couple of key features, or am I doing this wrong?

2016-09-16 Thread Andrea D'Amore
On 16 September 2016 at 00:53,   wrote:
> I have a ModelAdmin subclass (code at: )

Gives a 404:

The requested URL /0LAt was not found on this server.


I'm missing the rationale of using an external paste service while
you're already using a text-based medium, the mailing list, that's
able to accomodate what's (hopefully) a small code excerpt, in worst
case scenario I think it'll accept an attachment as well.

This also has the added bonus of getting archived and never result in
broken links and missing content, like it's likely to happen at some
point with external services.


-- 
Andrea

-- 
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/CAMonFrQ%2B2JYMPEaOXw-FM2Oj--BxjNNrqsO6isEDgFGf%3DHnd0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: model form does not work

2016-10-11 Thread Andrea D'Amore
It's hard to say if that's actual code copied and pasted, but maybe
it's this part:

> class Regform(forms.ModelForm):
> class meta:

> ModelForm has no model class specified. this error

Personal suggestions: paste a minimal working example, when you do su
use text only format messages to keep code properly formatted, use
conventional python spacing for ease of read, use proper naming for
classes -i.e. don't call your model "RegisterForm" and then your form
"Regform".


-- 
Andrea

-- 
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/CAMonFrTSJGEr0hJBxX6J3R2df1UsnsHYNw%2BHyOUVU4NwQ%2Bx9fw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.