Recursive Relation in django-taggit

2011-08-18 Thread Eyad Al-Sibai
 I have created the following TagBase and each category can have
subcategory... Will this work? How can I override its add function in the
TaggableManager?

 class Category(TagBase):


parent = models.ForeignKey('self', blank=True, null=True,


   related_name='child')


description = models.TextField(blank=True, help_text="Optional")


class Meta:


verbose_name = _('Category')


verbose_name_plural = _('Categories')

-- 
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: (UsingTheMailingList) Pre-requisites for newcomers on Django

2011-07-11 Thread Eyad Al Sibai
+!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/kIcMhIXH_ZoJ.
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.



New to Django

2011-07-11 Thread Eyad Al-Sibai
Hi!

I am new to Django, but I am not sure if I should use the built in Django
auth for registration and authorization or I should use another app/package.


Eyad

-- 
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.



Custom Manager

2011-07-22 Thread Eyad Al-Sibai
Hi!

I still do not get the meaning of Manager or Custom Manager in Django... I
am confused!

-- 
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.



Real Example

2011-07-22 Thread Eyad Al-Sibai
Hi!

I want a real example of complete django application with source code to
understand django better

-- 
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.



What is the Development Life Cycle of Django App?

2011-07-22 Thread Eyad Al-Sibai
What is the Development Life Cycle of Django App? Should I start in
implementing the models or the urls ... or what exactly?

-- 
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: Real Example

2011-07-22 Thread Eyad Al-Sibai
Thanks a lot! I appreciate it

On Sat, Jul 23, 2011 at 5:33 AM, Peter Murphy wrote:

> Eyad,
>
> Well, I'll be damned:
>
> http://www.djangosites.org/with-source/
>
> It's good etiquette to say "thank you" at this point. ;-)
>
> Best regards,
> Peter
>
> On Jul 23, 4:17 am, Phang Mulianto  wrote:
> > you better find books in amazon. .. many ready to learn for you..
> > On Jul 22, 2011 10:41 PM, "Shawn Milochik"  wrote:>
> On 07/22/2011 10:31 AM, Eyad Al-Sibai wrote:
> > >> Hi!
> >
> > >> I want a real example of complete django application with source code
> > >> to understand django better
> >
> > > 1. Search Google, github, and bitbucket.
> >
> > > 2. Read this:https://code.djangoproject.com/wiki/UsingTheMailingList
> >
> > > --
> > > 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.
>
>

-- 
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: Custom Manager

2011-07-22 Thread Eyad Al-Sibai
Thanks a lot!

On Sat, Jul 23, 2011 at 5:08 AM, Matt M  wrote:

> From The Definitive Guide to Django:
>
> "In short, a model’s manager is an object through which Django models
> perform database queries. Each Django model has at least one manager, and
> you can create custom managers to customize database access. There are two
> reasons you might want to create a custom manager: to add extra manager
> methods, and/or to modify the initial QuerySet the manager returns."
>
> The default manager is called '*objects*'. It's the manager you use if you
> don't add custom managers:
>
> Model.*objects*.all()
>
> In a model you can replace the default manager with a custom manager for
> custom access/specialized queries.
>
> You can also add a custom manager into a model after the default one. So
> you will have access to the default manager and the custom manager.
>
> Model.objects.all()
> Model.custom_objects.all()
>
> Model.objects.all() will return all objects for this model
> Model.custom_objects.all() will return all objects as filtered by your
> custom manager.
>
> Hope that helps,
> ~Matt
>
>
>
>
> On Fri, Jul 22, 2011 at 6:35 PM, Andre Terra  wrote:
>
>> Managers operate on your model, so their methods usually call sgl
>> queries on a model's database.
>>
>> As an example, assume a blog app with a Post model which, among other
>> things has a BooleanField called 'draft'.
>>
>> You could then write a custom manager called PublishedManager that
>> subclasses the default manager and overrides the default get_queryset
>> method, so that a .filter(draft=False) is added to every query.
>>
>> Add it to your Post model by setting it as the 'published' attribute
>> and then you could use Post.published.all() to get just the posts with
>> draft=False.
>>
>>
>> Cheers,
>> AT
>>
>> On 7/22/11, Shawn Milochik  wrote:
>> > On 07/22/2011 10:30 AM, Eyad Al-Sibai wrote:
>> >> Hi!
>> >>
>> >> I still do not get the meaning of Manager or Custom Manager in
>> >> Django... I am confused!
>> >>
>> >
>> > If you've used the '.objects' attribute of a model you've used a
>> manager.
>> >
>> > A custom manager would be a subclass of the standard manager. You can
>> > then alter/replace things like all(), filter(), and get(), and add your
>> > own methods.
>> >
>> >
>> > --
>> > 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.
>> >
>> >
>>
>> --
>> Sent from my mobile device
>>
>> --
>> 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.
>

-- 
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: What is the Development Life Cycle of Django App?

2011-07-22 Thread Eyad Al-Sibai
Thanks!

On Sat, Jul 23, 2011 at 4:04 AM, Mike Dewhirst wrote:

> On 23/07/2011 12:31am, Eyad Al-Sibai wrote:
>
>> What is the Development Life Cycle of Django App? Should I start in
>> implementing the models or the urls ... or what exactly?
>>
>
> Best advice I know is in Practical Django Projects by James Bennett
>
>
>  --
>> 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+unsubscribe@**
>> googlegroups.com .
>> For more options, visit this group at http://groups.google.com/**
>> group/django-users?hl=en<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+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/django-users?hl=en<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.



writing function into the Manager or the Model

2011-07-23 Thread Eyad Al-Sibai
I am a little bit confused... what functions should I write it in the
Manager and what should be within the Model itself... Also what functions do
you think should be written inside the class Admin within the Model?


Regards,
Eyad

-- 
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: django-registration - stuck at Required templates topic

2011-08-05 Thread Eyad Al-Sibai
I had the same thing...

all what you need is to add " {% csrf_token %}" in each template for Post
form

it will solve your issue

On Sat, Aug 6, 2011 at 7:42 AM, bob gailer  wrote:

> I have stumbled around following various pieces of advice:
>
> added to views:
>from django.core.context_processors import csrf
>
> modified views to end with:
>form = ContactForm()
>c = {}
>c.update(csrf(request))
>c['form'] = form
>return render_to_response('contact_form.html', c)
>
> modified contact_form.html:
>  {% csrf_token %}
>
> The first bullet in the error message:
> The view function uses RequestContext for the template, instead of
> Context.
>   makes no sense - even after attempting to read what the
> RequestContext link points to.
> |
> now what?
>
> --
> 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.