Re: Django/python free Training

2020-12-20 Thread cubells
El 18/12/20 a les 6:41, Python Class ha escrit:
> Hi guys,
> 
> I am manucho from Kenya and am good developer with django and python and
> i want to teach people what i know .I want to start a youtube channel
> for Django and python based tutorials ..If intrested you can message me
> here on concepts and projects you want covered and i will start immediately.
> 

I'm interested too manucho.


-- 
Atentament, cubells.
--

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/22dd90e3-077b-0f3b-bc08-1392d5934dfd%40vcubells.net.


Re: Using standard Django admin User forms for Custom User model?

2013-08-05 Thread cubells
S

, Vicent Cubells,
Tel: 659 06 36 1w4.

- Reply message -
From: "Victor Hooi" <victorh...@gmail.com>
To: <django-users@googlegroups.com>
Subject: Using standard Django admin User forms for Custom User model?
Date: dl., ag. 5, 2013 11:21
Hi,
I got it working at a basic level by just registering against UserAdmin.
from django.contrib.auth.admin import UserAdmin
admin.site.register(Customer, UserAdmin)
For custom fields, I just needed to add them to fieldsets.
However, even though I could view/edit users, adding new Users failed - the 
forms seemed to be looking specifically for auth_user.

Apparently this is something that could be made easier?
https://code.djangoproject.com/ticket/19353
http://stackoverflow.com/a/17496836/139137

Is that something that could be in 1.6?
Cheers,Victor

On Thursday, 1 August 2013 09:45:51 UTC+10, Russell Keith-Magee  wrote:
On Wed, Jul 31, 2013 at 12:36 PM, Victor Hooi <victo...@gmail.com> wrote:

Hi,
When you add a Django User through the admin, it presents you with a initial 
screen to enter a username and password  (/admin/auth/user/add/), and then 
handles hashing for you.

Also, when you go to edit a User, it gives you a Change Password form (e.g. 
/admin/auth/user/2/password/)
I'm using a custom user model in my Django app, by inheriting from 
AbstractCustomer.

If I add this to the admin now, password is just a standard textbox, and 
obviously if I create a user through that, I can't login since I assume it's 
not hashing the password.

Is there any way I can use the normal Django User admin forms with a custom 
User model?
Secondly, I tried creating a user via the create_user() method on my custom 
User object - I still wasn't able to login to the admin using that 
username/password, which I thought was weird.

Have you read the documentation on this issue? 
https://docs.djangoproject.com/en/1.5/topics/auth/customizing/#custom-users-and-the-built-in-auth-forms

The docs discuss what you have to do in order to get your User model 
represented in the admin, and also provide a worked example.
If you've got a specific question that isn't covered by the docs, or if you're 
confused by what the docs say, let us know.

Yours,Russ Magee %-)




-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Tutorial three '-pub_date'

2012-07-03 Thread cubells
It means "in descending order"

, Vicent Cubells.

- Reply message -
De: "Smaran Harihar" <smaran.hari...@gmail.com>
Para: <django-users@googlegroups.com>
Asunto: Tutorial three -pub_date
Fecha: mar., jul. 3, 2012 20:33
Hey Djangoers,
I am on the tutorial 3, and found this code where we are modifying the view 
index()






def index(request):
latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5]
output = ', '.join([p.question for p in latest_poll_list])
return HttpResponse(output)
What I did not understand, was why did we state,
order_by('-pub_date'), what does that '-' mean before 'pub_date' ? 


-- 
Thanks & RegardsSmaran Harihar





-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.

For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Post url incorrect on syndication

2012-03-14 Thread cubells

> cubells <vic...@vcubells.net>:
>


Hi all:

In order to show my feeds blog I have a class:

class BlogFeed(Feed):
title = "MySite"
description = "Some ramblings of mine"
link = "/blog/feed/"

def items(self):
return Post.objects.all().order_by("-created")[:2]
def item_title(self, item):
return item.title
def item_description(self, item):
return item.body
def item_link(self, item):
return u"/blog/%d" % item.id

And the url for the feed is:

url(r'^feed/$', BlogFeed()),

All works fine but the post url.

The post url that is shown in feeds is
http://example.com/blog/4

when It should be
http://vcubells.net/blog/4

What's the problem? I don't see what I'm doing wrong.



Solved!

I had the table django_site of my project database incorrect.


--

cubells

web: vcubells.net
microblogging: identi.ca/cubells
xmpp: cube...@jabber.org

--

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Post url incorrect on syndication

2012-03-13 Thread cubells

Hi all:

In order to show my feeds blog I have a class:

class BlogFeed(Feed):
title = "MySite"
description = "Some ramblings of mine"
link = "/blog/feed/"

def items(self):
return Post.objects.all().order_by("-created")[:2]
def item_title(self, item):
return item.title
def item_description(self, item):
return item.body
def item_link(self, item):
return u"/blog/%d" % item.id

And the url for the feed is:

url(r'^feed/$', BlogFeed()),

All works fine but the post url.

The post url that is shown in feeds is
http://example.com/blog/4

when It should be
http://vcubells.net/blog/4

What's the problem? I don't see what I'm doing wrong.

Thanks a lot!


--

cubells

web: vcubells.net
microblogging: identi.ca/cubells
xmpp: cube...@jabber.org

--

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Which IDE do you choose with django?

2008-10-13 Thread Cubells



En/na zjffdu ha escrit:
> I am a newbie of django, and want to know which IDE is suit for
> django?
>   

vim is a good option...

Cheers,

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Module not callable (Practical Django Projects)

2008-08-24 Thread Cubells



En/na marsii ha escrit:
> excerp_html = models.TextField(editable=False, blank=True)
>   
_
 ↓
excerpt_html = models.TextField(editable=False, blank=True)


You have only that mistake in the code you've attached...

Your models.py works on my system.

Cheers...

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Module not callable (Practical Django Projects)

2008-08-24 Thread Cubells



En/na marsii ha escrit:
> Hi!
> I working whit the book Practical Django Project and have a problem
> with th weblog example.
>
> (I have Django revision 8511.
>
> I got the following error when I try to add an entry:
> ---
> TypeError at /admin/coltrane/entry/add/
>
> 'module' object is not callable
>
> Request Method:   POST
> Request URL:  http://127.0.0.1:8000/admin/coltrane/entry/add/
> Exception Type:   TypeError
> Exception Value:
>
> 'module' object is not callable
>
> Exception Location:   /home/markku/django/practical_djproj/coltrane/
> models.py in save, line 76
> Python Executable:/usr/bin/python
> Python Version:   2.5.2
> ---
>
> copy of my models.py (error line 76 is marked):
>
> --
>   

I have the same code, I think..., and I doesn't get that error.

Try to put comments in the whole method save() or in the line 76 so that
we can see where is the problem...

Cheers...



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---