Order by a field in a third table

2006-10-04 Thread Mario Gudelj

Hello django users,

Bit of a newbie question.

For model like this:

class X(models.Model):
name = models.CharField(maxlength=20)

class Y(models.Model):
name = models.CharField(maxlength=20)
x = models.ForeignKey(X)

class Z(models.Model):
name = models.CharField(maxlength=20)
y = models.ForeignKey(Y)

I do not know how to order by x.name in the view:

order_key = name#order by z.name, fine
order_key = y_table.name #order by y.name, fine
#order_key =  #order by x.name, i don't know how

the_list = Z.objects.order_by(order_key)

What would be the elegant soluton?

Thanks,
Mario Gudelj


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



Re: ModelForm

2012-01-29 Thread Mario Gudelj
You can exclude certain fields from the form using exclude['fieldname'] in
that FormName class

On 28/01/2012 6:08 AM, "hack"  wrote:

> Hello,
> I am new to Python and have a Java background.
>
> I have created a bunch of models, and forms using ModelForm:
> class FormName(ModelForm):
>class Meta:
>model = FormName
>
> Whenever I display the form in my browser with {{ form.as_table }} the
> form queries all the foreign key data and displays it in a pulldown.
>
> Is there a way to disable this functionality and still be able to use
> Models for my forms?  Thanks.
>
> I expect there is a param or something similar to blank=False or
> something.
>
> --
> 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: Starting a new Python blog

2012-01-29 Thread Mario Gudelj
Same :)

On 29 January 2012 19:11, Anler Hernandez Peral  wrote:

> you have one subscriber over here and waiting to see more posts ;)
>
> --
> anler
>
>
>
> On Sat, Jan 28, 2012 at 9:35 PM, Kevin  wrote:
>
>> Hello Everyone,
>>
>>  For sometime now I have been itching to create a Python blog, and
>> now the fruits of my labor have paid off.  I am ready to release the
>> blog to the public eyes.  At the moment it has 2 main features, a blog
>> portion, and a bookmark system.  Both the blog and the bookmark system
>> offer an RSS Atom feed.  The bookmark system is fully compatible with
>> "Live Bookmarks" to quickly access some of my top Python sites I visit
>> or visited recently which caught my eye.
>>
>>  The website is called "Python Diary", a rather unique take on a tech
>> blog name.  The site itself has a diary-like theme, and is for the
>> most part very easily to navigate.  The website was completely built
>> using Python, the theme was taken from a wordpress theme website and
>> formatted to work with the Django template system.  The entire backend
>> is written from scratch using a few reusable Django apps, namely,
>> django-tagging, south, and cumulus.
>>
>>  Now you might be saying, "Oh great, yet another Python blog".  But
>> wait...  I plan on setting this blog apart from the thousands of other
>> blogs in the world with some very unique features.  Features normally
>> found on commercial software blogs, movie and video game blogs is a
>> thorough review system.  I plan on going through many of the available
>> Python packages out there in the wild and basically reviewing them
>> like one would review anything else.  I do not see a dedicated Python
>> website which has reviews of many Python packages available in PyPi.
>> I plan on stating the usual pros and cons of the package, and
>> providing a score.  For example of how this type of review is
>> formatted, take a look at a CNET Review.
>>
>> My new blog can be found here: http://www.pythondiary.com/
>>
>>  Tell me what you think of the website in general, and the overall
>> idea for this blog.
>>
>> If you would like to subscribe to the upcoming content, add this RSS
>> feed to your favorite RSS reader:
>> http://www.pythondiary.com/blog.xml
>>
>> --
>> 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: Displaying template location in html

2012-01-29 Thread Mario Gudelj
The only way to achieve this would be to pass the template path, inside the
view, to the template and render it within the template.

Like:

d = {'profile':profile:'template_path':"console/account-profile.html"}
return render_to_response('console/account-profile.html', d)

-m

On 29 January 2012 17:26, Alec Taylor  wrote:

> With 40+ HTML files it's easy to get confused as to where each
> component comes from.
>
> I don't want to annotate each file with its relative path manually, as
> this will prove cumbersome when the site finally goes production.
>
> Is there a trick to displaying the template location on-screen?
>
> Thanks for all suggestions,
>
> Alec Taylor
>
> --
> 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: help with tutorial 01

2012-01-29 Thread Mario Gudelj
That should work. You must have some unusual setting in settings.py. Can
you post time zone references from that file?

On 20 January 2012 09:03, Cyd  wrote:

> In the tutorial here:
>
> https://docs.djangoproject.com/en/1.3/intro/tutorial01/
>
> I get no errors up until the p.save() at the end:
>
> # No polls are in the system yet.
> >>> Poll.objects.all()
> []
>
> # Create a new Poll.
> >>> import datetime
> >>> p = Poll(question="What's up?",
> pub_date=datetime.datetime.now())
>
> # Save the object into the database. You have to call save()
> explicitly.
> >>> p.save()
>
> Right here, I get this error:
>
> RuntimeWarning: DateTimeField received a naive datetime
> (2012-01-19 15:52:43.171000) while time zone support is active.
>
> > What does it mean by naive datetime?
>
> > Thanks for the help,
> > Cyd
>
> --
> 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: imagefiled don't Work

2012-01-29 Thread Mario Gudelj
perhaps something from this post can help -
http://mariogudelj.tumblr.com/post/16717808643/custom-upload-to-path-in-django

On 22 January 2012 21:41, Tony Kyriakides  wrote:

> (in the terminal)
> python manage.py syncdb
>
> On Jan 21, 8:57 am, cha  wrote:
> > Hello I reading this tutorialhttps://
> pype.its.utexas.edu/docs/tutorial/unit6.html#answers
> > it's work OK But When I want improve it and add ImageField in Category
> > Model i have problem with ImageField It's Not uploaded
> >
> > file = models.ImageField(upload_to='img/%Y')
> >
> > see code please :
> > _
> > views.py
> > _
> > from django import forms
> > class CategoryForm(forms.ModelForm):
> > class Meta:
> > model = Category
> >
> > def add_category(request):
> > if request.method == "POST":
> > form = CategoryForm(request.POST, request.FILES)
> > ## Handle AJAX  ##
> > if request.is_ajax():
> > if form.is_valid():
> > form.save()
> > # Get a list of Categories to return
> > cats = Category.objects.all().order_by('name')
> > # Create a dictionary for our response data
> > data = {
> > 'error': False,
> > 'message': 'Category %s Added Successfully' %
> > form.cleaned_data['name'],
> > # Pass a list of the 'name' attribute from each
> > Category.
> > # Django model instances are not serializable
> > 'categories': [c.name for c in cats],
> > }
> > else:
> > # Form was not valid, get the errors from the form and
> > # create a dictionary for our error response.
> > data = {
> > 'error': True,
> > 'message': "Please try again! one",
> > 'name_error': str(form.errors.get('name', '')),
> > 'slug_error': str(form.errors.get('slug', '')),
> > 'file_error': str(form.errors.get('file', '')),
> > }
> > # encode the data as a json object and return it
> > return http.HttpResponse(json.dumps(data))
> >
> > ## Old Form Handler Logic ##
> > if form.is_valid():
> > form.save()
> > return http.HttpResponseRedirect('/category/')
> > else:
> > form = CategoryForm()
> > cats = Category.objects.all().order_by('name')
> > context = Context({'title': 'Add Category', 'form': form,
> > 'categories': cats})
> > return render_to_response('ajax_form.html',
> > context,context_instance=RequestContext(request))
> >
> > ___
> > ajax_form.html
> > ___
> >
> >   >"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> > http://www.w3.org/1999/xhtml";>
> > 
> >{{ title }}
> >
> >   #message {width:250px; background-color:#aaa;}
> >   .hide {display: none;}
> >
> >http://ajax.googleapis.com/ajax/
> > libs/jquery/1.3.2/jquery.js">
> > 
> > 
> >
> > 
> > // prepare the form when the DOM is ready
> > $(document).ready(function() {
> > $("#add_cat").ajaxStart(function() {
> > // Remove any errors/messages and fade the form.
> > $(".form_row").removeClass('errors');
> > $(".form_row_errors").html('');
> > $("#add_cat").fadeTo('slow', 0.33);
> > $("#add_cat_btn").attr('disabled', 'disabled');
> > $("#message").addClass('hide');
> > });
> >
> > // Submit the form with ajax.
> > $("#add_cat").submit(function(){
> > $.post(
> > // Grab the action url from the form.
> > "#add_cat.getAttribute('action')",
> >
> > // Serialize the form data to send.
> > $("#add_cat").serialize(),
> >
> > // Callback function to handle the response from view.
> > function(resp, testStatus) {
> > if (resp.error) {
> > // check for field errors
> > if (resp.name_error != '') {
> > $("#name_row").addClass('errors');
> > $("#name_errors").html(resp.name_error);
> > }
> > if (resp.slug_error != '') {
> > $("#slug_row").addClass('errors');
> > $("#slug_errors").html(resp.slug_error);
> > }
> > if (resp.file_error != '') {
> > $("#file_row").addClass('errors');
> > $("#file_errors").html(resp.file_error);
> > }
> > } else {
> > // No errors. Rewrite the category list.
> > $("#categories").fadeTo('fast', 0);
> >  

Re: Building authentication backend

2012-02-01 Thread Mario Gudelj
I'm new to Django too, but I suspect you'd do something like this:

class AdditinoalUserInfo(models.Model):
user = models.ForeignKey(User, unique=True)
extra_password = models.CharField("Password", blank=True)

That will create a new table for you and a column for new password. You
then need to use Django functions to hash the content of the extra_password
field.

I hope that helps!

-m

On 1 February 2012 19:24, apalsson  wrote:

> Hello.
>
> A very simple question.
>
> I am building an authentication back end to support TWO passwords.
> This requires me to add an extra table to store the secondary password
> plus a ForeignKey to User.
>
> The confusing part is, how I make Django automatically create the
> needed table when SyncDB is run?
> And how do I make this new table show up in the Admin-interface as
> well?
>
> Thanks.
>
> --
> 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: Entering Text into a Database

2012-02-02 Thread Mario Gudelj
Hey dude,

Let's say you have some model with fields defined. It's called Business.
Looks something like this:

class Business(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField("Business Name", max_length=NAME, blank=False)

You create a ModelForm like this:

class BusinessDetailsForm(forms.ModelForm):
class Meta:
model = Business

In your view you have a method that captures the POST and saves it inside
the model:

def save_business_details(request):
if request.POST:
form = BusinessDetailsForm(request.POST)
if form.is_valid():
form.save()
return
HttpResponseRedirect(reverse("your_app.views.some_view_when_submission_is_successful",
args=[]))
else:
here you pass back the form or whatever
return render_to_response(and render that whatever)

So, form.save() will save the details.

I hope that helps!

-m

On 3 February 2012 14:40, Python_Junkie wrote:

> Not sure if this will help, but I have diverted from the standard
> method of database updates taught in the tutorial.
>
> I take a more traditional sql methodology
>
> for example in any view that I am using.
>
> I collect the data elements via a request
> and then build a sql statement
>
> for example
>
> (The exact syntax may be a little off.)
>
> var_1=request.post(name)
>
> var_2=...etc
>
> insert into table 1(col_1,col_2) values ('var_1,var_2)
>
> commit
>
>
> Let me know if this helps and I can update the syntax to be more
> precise.
>
> On Feb 2, 9:51 pm, ajohnston  wrote:
> > On Feb 2, 2:30 pm, ds39  wrote:
> > Is there any page, outside of the
> >
> > > official documentation, that gives an example from beginning to end
> > > regarding how to save ModelForms in your database using views.py
> > > rather than the shell (including sample URLs) ? Also, how would I
> > > access the entered text via the shell to determine if it was saved ?
> >
> > Did you do the tutorial[1]?. Be sure to do all four parts. After that
> > the examples in the ModelForms documentation[2] should make sense. If
> > not, ask specific questions about what is not working the way you
> > think it should. Good luck.
> >
> > {1]https://docs.djangoproject.com/en/dev/intro/tutorial01/
> > [2]https://docs.djangoproject.com/en/1.3/topics/forms/modelforms/
>
> --
> 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.



Unit test example for web froms

2012-02-11 Thread Mario Gudelj
Hi guys,

I was wandering if anyone has a good example of a unit test where they have
a view which processes a web form. I'm not sure how you'd test something
like that.

Thanks,

mario

-- 
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: Why does django default to Chicago time?

2012-02-15 Thread Mario Gudelj
I believe that people who created Django are from there. :)

On 16 February 2012 14:46, Roy Smith  wrote:

> In the default settings.py file, the timezone is set to:
>
> TIME_ZONE = 'America/Chicago'
>
> Why?  Wouldn't None (to match the server's time zone) be a more sane
> default?  Even setting it to UTC would be more reasonable than setting it
> to any specific timezone, but surely going with the system default is the
> best of all.
>
> --
> 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/-/_kKC8BMhA-kJ.
> 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: dropdown select box in django

2012-02-20 Thread Mario Gudelj
Hey there,

Try this:

In your forms.py create a field such as this

message = forms.ChoiceField(label='Event Type', choices=EVENT_TYPE_CHOICES)

That will create a dropdown.

Also, I think that the first thing in the tuple is a value and shouldn't
have a space, so change:

EVENT_TYPE_CHOICES = (('Event Created', 'EventCreated'),('Event Changed',
'EventChanged'),)

to:

EVENT_TYPE_CHOICES = (('event_created', 'Event Created'),('event_changed',
'Event Changed'),)

See if that works for you.

Cheers,

-m

 message = models.CharField("Event Type", max_length=12,
> > choices=EVENT_TYPE_CHOICES)

On 21 February 2012 12:28, larry.mart...@gmail.com
wrote:

> On Feb 20, 5:54 pm, Anurag Chourasia 
> wrote:
> > This is weird
> >
> > I simply copy pasted your code in my environment and it shows me a Drop
> > Down.
> >
> > Could you save the models file again and close your browser (or even try
> > clearing cache) and restart your apache/django dev server whatever may be
> > the case and try again?
>
> Tried all that, still no joy. Also tried 2 different browsers, no
> difference. In the dev server also tried setting a breakpoint and then
> printing out message.choices, and it has the choices I expected:
>
> (Pdb) print message.choices
> (('Event Created', 'EventCreated'), ('Event Changed', 'EventChanged'))
>
>
>
> >
> > Regards,
> > Anurag
> >
> > On Mon, Feb 20, 2012 at 9:32 PM, larry.mart...@gmail.com <
> >
> >
> >
> >
> >
> >
> >
> > larry.mart...@gmail.com> wrote:
> > > I'm fairly new to django, still getting my feet wet. I want to have a
> > > dropdown menu (django seems to call this a select box). I read this:
> >
> > >https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.mo.
> ..
> >
> > > So I did this:
> >
> > > class EventsTable(models.Model):
> > >EVENT_TYPE_CHOICES = (
> > >('Event Created', 'EventCreated'),
> > >('Event Changed', 'EventChanged'),
> > >)
> >
> > >message = models.CharField("Event Type", max_length=12,
> > > choices=EVENT_TYPE_CHOICES)
> >
> > > But I get a standard text entry field where I can type in anything.
> >
> > > I did more googling, and I read a lot of confusing stuff about having
> > > to use javascrpt, ajax, CSS, etc. I read some pages about using a
> > > ChoiceField, but that is not part of the model class (it's in the
> > > forms class). I'm not sure how that would be used with a class that
> > > inherits form models.
> >
> > > What am I missing here? I can't imagine something as common as this
> > > would be hard in django. Shouldn't the first thing I did work?
> >
> > > TIA!
> > > -larry
> >
> > > --
> > > 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: dropdown select box in django

2012-02-21 Thread Mario Gudelj
not sure what you mean there, but take a look at this
https://docs.djangoproject.com/en/dev/ref/forms/fields/#modelchoicefield

On 21 February 2012 23:36, larry.mart...@gmail.com
wrote:

> On Feb 20, 9:52 pm, Mario Gudelj  wrote:
> > Hey there,
> >
> > Try this:
> >
> > In your forms.py create a field such as this
> >
> > message = forms.ChoiceField(label='Event Type',
> choices=EVENT_TYPE_CHOICES)
> >
> > That will create a dropdown.
>
> My app does not have a forms.py file. I know I can just create one,
> but then how would that field be scoped? I want it to be part of the
> EventsTable class.
>
>
> > Also, I think that the first thing in the tuple is a value and shouldn't
> > have a space, so change:
> >
> > EVENT_TYPE_CHOICES = (('Event Created', 'EventCreated'),('Event Changed',
> > 'EventChanged'),)
> >
> > to:
> >
> > EVENT_TYPE_CHOICES = (('event_created', 'Event
> Created'),('event_changed',
> > 'Event Changed'),)
> >
> > See if that works for you.
>
> Changing that did not have any effect.
>
>
> >
> > Cheers,
> >
> > -m
> >
> >  message = models.CharField("Event Type", max_length=12,
> >
> > > > choices=EVENT_TYPE_CHOICES)
> >
> > On 21 February 2012 12:28, larry.mart...@gmail.com
> > wrote:
> >
> >
> >
> >
> >
> >
> >
> > > On Feb 20, 5:54 pm, Anurag Chourasia 
> > > wrote:
> > > > This is weird
> >
> > > > I simply copy pasted your code in my environment and it shows me a
> Drop
> > > > Down.
> >
> > > > Could you save the models file again and close your browser (or even
> try
> > > > clearing cache) and restart your apache/django dev server whatever
> may be
> > > > the case and try again?
> >
> > > Tried all that, still no joy. Also tried 2 different browsers, no
> > > difference. In the dev server also tried setting a breakpoint and then
> > > printing out message.choices, and it has the choices I expected:
> >
> > > (Pdb) print message.choices
> > > (('Event Created', 'EventCreated'), ('Event Changed', 'EventChanged'))
> >
> > > > Regards,
> > > > Anurag
> >
> > > > On Mon, Feb 20, 2012 at 9:32 PM, larry.mart...@gmail.com <
> >
> > > > larry.mart...@gmail.com> wrote:
> > > > > I'm fairly new to django, still getting my feet wet. I want to
> have a
> > > > > dropdown menu (django seems to call this a select box). I read
> this:
> >
> > > > >
> https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.mo.
> > > ..
> >
> > > > > So I did this:
> >
> > > > > class EventsTable(models.Model):
> > > > >EVENT_TYPE_CHOICES = (
> > > > >('Event Created', 'EventCreated'),
> > > > >('Event Changed', 'EventChanged'),
> > > > >)
> >
> > > > >message = models.CharField("Event Type", max_length=12,
> > > > > choices=EVENT_TYPE_CHOICES)
> >
> > > > > But I get a standard text entry field where I can type in anything.
> >
> > > > > I did more googling, and I read a lot of confusing stuff about
> having
> > > > > to use javascrpt, ajax, CSS, etc. I read some pages about using a
> > > > > ChoiceField, but that is not part of the model class (it's in the
> > > > > forms class). I'm not sure how that would be used with a class that
> > > > > inherits form models.
> >
> > > > > What am I missing here? I can't imagine something as common as this
> > > > > would be hard in django. Shouldn't the first thing I did work?
> >
> > > > > TIA!
> > > > > -larry
> >
> > > > > --
> > > > > 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.
>
>

-- 
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: Question on unknown error

2012-02-26 Thread Mario Gudelj
In print 'time' what's time? Should you not have print exp_datetime?

On 27 February 2012 01:27, Stanwin Siow  wrote:

> Hello,
>
> I have the following method:
>
> def subscribe_keyword(userid,subDay =7,KEYWORD_SET=frozenset()):
> try:
> ...
>
> sub_datetime = datetime.datetime.now()
> exp_datetime = sub_datetime + timedelta(days=subDay)
> print 'time'
>
> However when i try to run my app,
>
> The following error throws at those two lines.
>
> Err: sequence item 0: expected string, int found
>
> Is there something wrong with the module?
>
>
>
>
>
> Best Regards,
>
> Stanwin Siow
>
>
>
>  --
> 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.



User actions logging app

2012-02-28 Thread Mario Gudelj
Hi list,

I was wandering if someone could recomend an easy django app for logging
user actions performed on models. I'd like to log changes logged in users
make around the app.

Cheers,

m

-- 
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: User actions logging app

2012-02-29 Thread Mario Gudelj
Wow. Legend! That's so much Annsi.

On 29 February 2012 18:00, Babatunde Akinyanmi  wrote:

> Yes, they definitely will.
>
> On 2/28/12, akaariai  wrote:
> > On Feb 28, 11:35 pm, Mario Gudelj  wrote:
> >> Hi list,
> >>
> >> I was wandering if someone could recomend an easy django app for logging
> >> user actions performed on models. I'd like to log changes logged in
> users
> >> make around the app.
> >
> > I think there are some apps out there. The first question however is
> > do you want to log "user a changed object b" or do you need an audit
> > trail also, that is do you need to have the information of user a
> > changed object b's field c from value "foo" to value "bar".
> >
> > I really am not the one to tell you which app is the correct one. I
> > usually have a small create_log_entry() method for creating entries
> > for modifications, and database triggers for the audit trail. The
> > create_log_entry is often the right way to go, as more often than not
> > I want to set all changes to the "main" record. That is, if somebody
> > changes an article's attachment, it is the article that needs to have
> > the changed log entry, not the attachment.
> >
> > The log entry model is something like this:
> > class LogEntry(object):
> > to_pk = models.IntegerField() #lets assume you are working only
> > with integer primary keys
> > to_type = models.CharField(max_length=40, choices=(('article',
> > 'Article'), ...))
> > mod_type = choices "INSERT/UPDATE/DELETE"
> > who = FK(user)
> > what = models.TextField() # A "comment" for the edit
> > when = models.DateTimeField()
> > @classmethod
> > def create_log_entry(cls, to_obj, edit_type, user, what_done):
> >   ...
> >
> > Combined with database-level triggers you can get a good audit trail.
> > I have some scripts to ease maintain the DB triggers for PostgreSQL
> > when using Django. I hope I will have some time to polish them for
> > release, I believe they could be some use for the community.
> >
> >  - Anssi
> >
> > --
> > 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.



Unicode lists and form submissions

2012-02-29 Thread Mario Gudelj
Hi djangoers,

I've ran into an issue I'm not sure how to handle.

I have a form with 7 checkboxes representing 7 days of the week. I want to
collect the submitted days and use them in rrule to generate some dates.

The form field looks like this:

weekly_interval = forms.MultipleChoiceField(label='Repeat on:',
choices=EventSeries.weekly_interval,widget=forms.CheckboxSelectMultiple,
required=False)

The choices are generated from this:

weekly_interval = (
(rrule.SU, 'Sun'),
(rrule.MO, 'Mon'),
(rrule.TU, 'Tue'),
(rrule.WE, 'Wed'),
(rrule.TH, 'Thu'),
(rrule.FR, 'Fri'),
(rrule.SA, 'Sat')
)

So, the form renders and everything is fine, but once I submit the form,
the data is in incorrect format and I'm not sure how to fix it.

This is how I'm collecting the interval:

interval=form.cleaned_data['weekly_interval']

Then I'm using it in this line:

start_dates = list(rrule.rrule(rrule.WEEKLY, count=self.recurrences,
byweekday=self.interval, dtstart=self.start_datetime))

My problem is in this byweekday=self.interval

If I test this form console with the following it works fine

start_dates = list(rrule.rrule(rrule.WEEKLY, count=a_s.recurrences,
byweekday=(rrule.MO,rrule.TU), dtstart=appt.start_time))

But when I look at the interval submitted from the form using pdb it looks
like this [u'WE', u'TH', u'SA']

I suspect that I need to convert this from unicode to objects. Does anyone
know the best approach? And what it would be?

Thanks a million!

-m

-- 
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: Unicode lists and form submissions

2012-02-29 Thread Mario Gudelj
Found an answer here
http://stackoverflow.com/questions/9210117/attributeerror-str-object-has-no-attribute-n-when-using-dateutil

Thanks guys.

On 1 March 2012 00:30, Mario Gudelj  wrote:

> Hi djangoers,
>
> I've ran into an issue I'm not sure how to handle.
>
> I have a form with 7 checkboxes representing 7 days of the week. I want to
> collect the submitted days and use them in rrule to generate some dates.
>
> The form field looks like this:
>
> weekly_interval = forms.MultipleChoiceField(label='Repeat on:',
> choices=EventSeries.weekly_interval,widget=forms.CheckboxSelectMultiple,
> required=False)
>
> The choices are generated from this:
>
> weekly_interval = (
> (rrule.SU, 'Sun'),
> (rrule.MO, 'Mon'),
> (rrule.TU, 'Tue'),
> (rrule.WE, 'Wed'),
> (rrule.TH, 'Thu'),
> (rrule.FR, 'Fri'),
> (rrule.SA, 'Sat')
> )
>
> So, the form renders and everything is fine, but once I submit the form,
> the data is in incorrect format and I'm not sure how to fix it.
>
> This is how I'm collecting the interval:
>
> interval=form.cleaned_data['weekly_interval']
>
> Then I'm using it in this line:
>
> start_dates = list(rrule.rrule(rrule.WEEKLY, count=self.recurrences,
> byweekday=self.interval, dtstart=self.start_datetime))
>
> My problem is in this byweekday=self.interval
>
> If I test this form console with the following it works fine
>
> start_dates = list(rrule.rrule(rrule.WEEKLY, count=a_s.recurrences,
> byweekday=(rrule.MO,rrule.TU), dtstart=appt.start_time))
>
> But when I look at the interval submitted from the form using pdb it looks
> like this [u'WE', u'TH', u'SA']
>
> I suspect that I need to convert this from unicode to objects. Does anyone
> know the best approach? And what it would be?
>
> Thanks a million!
>
> -m
>

-- 
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: totally a non responsive groups which answers complex questions but not simple ones :(

2012-03-11 Thread Mario Gudelj
Yeah, what's the problem Suresh?

On 12/03/2012 6:32 AM, "yati sagade"  wrote:

> What do you mean?
> On 11 Mar 2012 22:06, "suresh dokania"  wrote:
> >
> >
> > --
> > 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: Coding used for dropbox

2012-03-11 Thread Mario Gudelj
http://en.wikipedia.org/wiki/Dropbox_(service)#Technology

No reason why it can't be made in Django.

On 12 March 2012 16:06, pankaj sharma  wrote:

> Hello everyone,
> i want to know that which language and framework was used for making
> dropbox,
> and i want to make such website, so can i make it in django, if not which
> framework and language should i use?
>
>
>
> --
> Pankaj Sharma
> Third Year Undergraduate Student
> Department of Civil Engineering
> Indian Institute of Technology Kharagpur
> Ph: +91 9547891751
> Email: new.pankajsha...@gmail.com
>
>  --
> 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.



How can I print form errors from inside the test

2012-03-13 Thread Mario Gudelj
Hi djangoers,

I have a problem where I'm running some form tests, the form validation is
failing, and I'm not sure why it's failing and I can't figure out how to
print the errors.

I preload the data into the form and when I validate it returns False.

>>> form.is_valid()
False

If I print the form and look at the HTML code everything looks fine as it
would on the front end

>>> print form

But if I try

>>> print form.errors

I get nothing.

I also tried all individual files with

>>> print form['is_recur'].errors

and I still get nothing.

There are no custom validation functions in this form, so I really don't
knoyw why it wouldn't validate.

Any help will be greatly appreciated.

Thanks!

-m

-- 
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: How can I print form errors from inside the test

2012-03-14 Thread Mario Gudelj
Thanks Daniel and Karen,

Karen, I;'m not entirely sure what an unbound form is. :)

Anyway, this is my test code:

def test_appointment_form(self):

c = Client()

base_data = {
'name':'Foo name',
'slug':'foo-session',
'short_descr':'foo tagline',
'long_descr':'long foo description',
'staff':self.staff,
'business':self.business,
'start_date':'2012-07-24',
'end_date':'2012-07-24',
}
self.form =
AppointmentForm(business=self.business,staff=self.staff,initial=base_data)

self.failUnless(self.form.is_valid()) #< This fails

print self.form.errors # The most common reason I have seen for is_valid() to return False but
> errors to be empty is for the form to be unbound. Unbound forms are
> never valid, but they also don't have any errors. Which goes to
> Daniel's question: how exactly have you "preloaded" the form with
> data?
>
> Karen
> --
> http://tracey.org/kmt/
>
> --
> 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: How can I print form errors from inside the test

2012-03-15 Thread Mario Gudelj
All I had to do is to change initial=base_data to data=base_data and the
thing worked. is_valid() and is_bound now work.

Cheers,

-m

On 15 March 2012 12:20, Daniel Roseman  wrote:

> On Wednesday, 14 March 2012 16:43:12 UTC-7, somecallitblues wrote:
>>
>> Thanks Daniel and Karen,
>>
>> Karen, I;'m not entirely sure what an unbound form is. :)
>>
>
> Then you must not have read the documentation[1], which goes into great
> detail about bound and unbound forms. That's pretty much a prerequisite
> before asking for help, I'm afraid.
>
>
>>
>> Anyway, this is my test code:
>>
>> def test_appointment_form(self):
>>
>> c = Client()
>>
>> base_data = {
>> 'name':'Foo name',
>> 'slug':'foo-session',
>> 'short_descr':'foo tagline',
>> 'long_descr':'long foo description',
>> 'staff':self.staff,
>> 'business':self.business,
>> 'start_date':'2012-07-24',
>> 'end_date':'2012-07-24',
>> }
>> self.form = AppointmentForm(business=self.**
>> business,staff=self.staff,**initial=base_data)
>>
>
> As that documentation points out, `initial` does not bind the form.
>
>
>> self.failUnless(self.form.is_**valid()) #< This fails
>>
>> print self.form.errors #>
>> response = c.post('/console/appointments/**add',
>> {'form':self.form})
>>
>
> Not the cause of your current problem, but this makes no sense: you can't
> POST a form object.
>
>  [1]:
> https://docs.djangoproject.com/en/1.3/topics/forms/#using-a-form-in-a-view
>
> --
> DR.
>
>
>  --
> 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/-/r8lcpGOgA5gJ.
>
> 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: redirect page/view after login in 'django-registration'

2012-03-21 Thread Mario Gudelj
You do this in your settings file. Not sure of the exact sintax but it's
something like login="yoururl".

On 22/03/2012 10:45 AM, "H.T. Wei"  wrote:

> Hey,
>
> I used 'django-registration' for user registration. Is there anyone know
> how configure to redirect the page/view I want after login?
> Thanks in advance.
>
> --
> " stay hungry, stay foolish"
>
> --
> 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: ModelForms

2012-03-23 Thread Mario Gudelj
It doesn't matter how you generate your form, your CSS should be applied
from inside the template. You need to add a CSS file link to a template to
which you're passing the form to inside your context from within a view, or
you can embed it into your template using 

Re: philosophy behind sites and applications in Django

2012-03-25 Thread Mario Gudelj
The easiest thing to do is to create each site as a separate project.
Define a base template for that project inside templates directory and link
your css in that template. Extend that template in all your other
templates. Same goes for users.  Each project/site will have it's own db
and its users.

On 26/03/2012 11:22 AM, "Jojo"  wrote:

> Hi guys, I'm new in Django (I started with the 1.3 and now I'm playing
> with the 1.4) and I'd like to understand better the phylosophy behind the
> concepts of sites and applications.
> Ok a site can contain multiple applications and an application can live in
> many sites, that's simple.
>
> Now.
>
> For me a site is like a "container" of applications and every application
> accomplish a particular job just like manage polls, articles and so on. But
> a site must have its own graphic style, and in particular common parts,
> just like user management.
>
> How do you handle these "trasversal" (common) components?
> For example, is it possible to define a css at site level? How to deal
> with user management and other commont funcionalities?
>
> These are only generic questions, I hope someone can give me a full
> explanation, or at least point me in the right direction.
>
> Thank you to everybody and good work!
>
> --
> 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/-/xM3TUeVaOA4J.
> 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: Is there a place for new Django specialized hosting?

2012-03-25 Thread Mario Gudelj
None of those hosts AT mentioned are cheap (those that actually work) and
many of them are either in Beta or don't work. If you can do $10/month
hosting for a low traffic site and then charge more once the site starts
using a certain amount of bandwidth I think you have a business there.

On 23 March 2012 01:52, shacker  wrote:

> Agreed - hosting of any kind is a tough business these days - it's become
> so commoditized that prices are rock bottom and customer expectations
> extremely high. And there are tons of Django-optimized hosts out there
> already - search for "django hosting" for listings and comparative sites
> before even thinking of taking on a niche like this.
>
> ./s
>
>  --
> 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/-/6_yMq53AQTYJ.
>
> 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: How to model postal address in django ???

2012-04-01 Thread Mario Gudelj
You can use django-countries for county names and codes -
http://code.google.com/p/django-countries/ or
https://bitbucket.org/smileychris/django-countries

There are probably more apps out there.

For geo-coding you can try http://geodjango.org/. It's awesome but it may
be a bit hard to implement. If you find it a bit hard you can always use
Google http://djangosnippets.org/snippets/2241/. Note that you only get
2 free lat long lookups a day with google.

Cheers,

-m




On 31 March 2012 03:54, Ariel Isaac Romero Cartaya wrote:

> Hi everybody, is there any model in Django to represent postal
> address, I mean is there already models like Countries, provinces and
> cities with theirs relations to make this, and how to model the others
> attributes: streets, postal code, between streets and perhaps latitude
> and longitude  to use google maps 
>
> How hope you can help me.
> Any help would be appreciated.
>
> Regards,
> Ariel
>
> --
> 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: where do you host your django app and how to you deploy it?!

2012-04-03 Thread Mario Gudelj
EC2 with Ubuntu instance with Postgre+nginx

On 3 April 2012 20:57, N.Aleksandrenko  wrote:

> What about cloud solutions?
>
> On Mon, Apr 2, 2012 at 2:38 PM, Jani Tiainen  wrote:
> > 2.4.2012 13:48, fix3d kirjoitti:
> >
> >> Where do you host your django app and how to you deploy it?!
> >>
> >> Please share personal exp.
> >>
> >
> > We're deploying to our own application server cluster.
> >
> > And we're using fabric to run actual deployment.
> >
> > --
> >
> > Jani Tiainen
> >
> >
> > --
> > 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: Django tutorial

2012-04-09 Thread Mario Gudelj
Go to 
/Library/Python/2.7/site-packages/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg/
on your Mac and see if _mysql.so is int there. You may need to re-install
MySQL_python connector. Maybe this can help
http://www.brambraakman.com/blog/comments/installing_mysql_python_mysqldb_on_snow_leopard_mac_os_x_106/

Otherwise, you can always use SQlite for dev environment until you go to
production. I find it a lot easier to manage.

On 10 April 2012 10:54, Ed McLaughlin  wrote:

> Hello! I am working through the Django tutorial (
> https://docs.djangoproject.com/en/1.4/intro/tutorial01/ ) and I have
> hit a roadblock in the 'database setup' portion of part 1. When I
> enter the command 'python manage.py syncdb' I get the error below. I
> believe I properly installed MySQL Community Server and mysqldb
> Any help would be GREATLY appreciated.
>
> Eds-MacBook-Air:mysite edmclaugh76$ python manage.py syncdb
> Traceback (most recent call last):
>  File "manage.py", line 10, in 
>execute_from_command_line(sys.argv)
>  File "/Library/Python/2.7/site-packages/django/core/management/
> __init__.py", line 443, in execute_from_command_line
>utility.execute()
>  File "/Library/Python/2.7/site-packages/django/core/management/
> __init__.py", line 382, in execute
>self.fetch_command(subcommand).run_from_argv(self.argv)
>  File "/Library/Python/2.7/site-packages/django/core/management/
> __init__.py", line 261, in fetch_command
>klass = load_command_class(app_name, subcommand)
>  File "/Library/Python/2.7/site-packages/django/core/management/
> __init__.py", line 69, in load_command_class
>module = import_module('%s.management.commands.%s' % (app_name,
> name))
>  File "/Library/Python/2.7/site-packages/django/utils/importlib.py",
> line 35, in import_module
>__import__(name)
>  File "/Library/Python/2.7/site-packages/django/core/management/
> commands/syncdb.py", line 8, in 
>from django.core.management.sql import custom_sql_for_model,
> emit_post_sync_signal
>  File "/Library/Python/2.7/site-packages/django/core/management/
> sql.py", line 6, in 
>from django.db import models
>  File "/Library/Python/2.7/site-packages/django/db/__init__.py", line
> 40, in 
>backend = load_backend(connection.settings_dict['ENGINE'])
>  File "/Library/Python/2.7/site-packages/django/db/__init__.py", line
> 34, in __getattr__
>return getattr(connections[DEFAULT_DB_ALIAS], item)
>  File "/Library/Python/2.7/site-packages/django/db/utils.py", line
> 92, in __getitem__
>backend = load_backend(db['ENGINE'])
>  File "/Library/Python/2.7/site-packages/django/db/utils.py", line
> 24, in load_backend
>return import_module('.base', backend_name)
>  File "/Library/Python/2.7/site-packages/django/utils/importlib.py",
> line 35, in import_module
>__import__(name)
>  File "/Library/Python/2.7/site-packages/django/db/backends/mysql/
> base.py", line 16, in 
>raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
> django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb
> module: dlopen(/Library/Python/2.7/site-packages/MySQL_python-1.2.3-
> py2.7-macosx-10.7-intel.egg/_mysql.so, 2): Library not loaded:
> libmysqlclient.18.dylib
>  Referenced from: /Library/Python/2.7/site-packages/
> MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg/_mysql.so
>  Reason: image not found
> Eds-MacBook-Air:mysite edmclaugh76$
>
> Thanks!!!
>
> --
> 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: Best approach for multiple sites in a single deployment?

2012-04-10 Thread Mario Gudelj
Hey man,

See if this helps
http://tidbids.posterous.com/saas-with-django-and-postgresql-schemas

Cheers,

-m

On 10 April 2012 21:53, Bernardo  wrote:

> I would like to create a subdomain based authentication system, like the
> one on 37signals, freshbooks, codebase, etc. The objective is to do
> something like smaller but in far smaller scale (I suppose a maximum of
> 100-1000 blogs). All other models (blog posts, comments, etc) already have
> a foreign key to Site.
>
> 1. How can I allow different users to have the same username in different
> sites? How can I make so that when a user logs in, he logged in to a
> specific site (logging on blog A does not log you to blog B).
>
> For allowing the same username in different sites I guess I'd have to
> write my own authentication backend and a new model for User, as I don't
> see how the default User model would fit. Is this a good approach?
>
> 2. Is there anyway to make the sites framework fetch the current site
> based on the subdomain instead of the settings? Or am I seeing this the
> wrong way?
>
> My plan was to use a single deployment for everything and use the sites
> framework, but as far as I've understood, the sites framework relies on the
> settings.SITE_ID parameter, which would be the same for a single
> deployment. What would be a good approach here? Creating a new settings
> file for each new blog?
>
> Many thanks in advance!
>
>  --
> 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/-/zQimMoWFGNUJ.
> 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: Force logout a user in signed cookie mode

2012-04-10 Thread Mario Gudelj
Does this help
http://stackoverflow.com/questions/953879/how-to-force-user-logout-in-django
?

On 11 April 2012 14:40, Cherian Thomas  wrote:

> Hi, all
> Can someone help?
> - Cherian
>
>
>
> On Tue, Apr 10, 2012 at 11:51 AM, Cherian  wrote:
>
>> Hi all,
>>
>> In the signed cookie mode is it possible for me force logout an
>> account?
>> Say I login from two places, and I need to logout my account from the
>> one access I forgot to logout in a public internet café. Can I do that
>> from my current login?
>> From my testing I could not do this. But there might be an override
>> key I am missing. Also it’s quite possible that I since there is no
>> session key on the server side to reset, this functionality might not
>> be there.
>> Can someone help?
>>
>> -Cherian
>>
>
>  --
> 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: Django Book

2012-04-12 Thread Mario Gudelj
I followed the book in 1.3 and everything worked. It's the best piece of
documentation I've come across. Such great narrative, not too detailed but
detailed enough.

On 12 April 2012 22:10, Mehmet Gültaş  wrote:

> It is valid for Django 1.1. :)
>
> My solution that I used last year, was installing Ubuntu 10.04 LTS coming
> with, guess Django 1.2 or 1.1 not sure.
> The book was very solid, easy and did not want to back and fort between
> documentation and book.
> After this initial dose of Django book, documentation seemed much more
> easier.
>
>
> On 12.04.2012 10:44, Timothy Makobu wrote:
>
>> The Django book is the best source of understanding Django I have found
>> http://www.djangobook.com/en/**2.0/ 
>>
>> However, it's three years old now. Is the info on it still valid?
>>
>> Is there a plan to update it?
>>
>> regards,
>> Tim
>>
>>
>> --
>> 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
>> .
>>
>
> --
> 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
> .
>
>

-- 
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: how to submit data in django's database

2012-04-12 Thread Mario Gudelj
Have you tried this?:

c = Company()
c.Subject = T
c.save()



On 12 April 2012 02:54, Sophia  wrote:

> Hi all,
>
> I have a question about how to enter data in django's database. I have the
> following Template, in which ' E ' is a variable that get the string:
>
> 
>
> This is my models.py in which I have a class named 'Company' and I want
> this variable 'E' be saved in 'Subject' :
>
> class Company(models.Model):
> Subject = models.CharField(max_length=30)
> start_time = models.DateTimeField()
> end_time = models.DateTimeField()
>
> def __unicode__(self):
> return self.Subject
>
> Then in views.py I wrote something like this to save the variable in
> Subject field, it's incomplete, and I want you to help me about it :
>
> def Text_Box(request):
> T = request.GET.get(E,' ')
> if T:
># I don't know how to make an object of class 'Company' so then I
> save ' T ' in Company.Subject
>  else:
> return render_to_response("Base.html") # Base.html is my basic
> template file
>
> I would really appreciate if you help me with it.
> Thanks in advance.
>
> Sophia
>
>
>
>  --
> 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/-/ChZdnVfKiYIJ.
> 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.



Passing parameters to class Meta:

2012-04-16 Thread Mario Gudelj
Hi Djangoers,

I have an issue I can't work out. This is the situation:

I have a model called payment, which has a custom constructor which takes a
parameter. This is the code:

class Payment(models.Model):
id = models.AutoField(primary_key=True)
amount = models.FloatField("Total payment amount")
...

def __init__(self, business, *args, **kwargs):
super(Payment, self).__init__(*args, **kwargs)
self.business = business



Then in my forms file I have this model form:


class PaymentForm(forms.ModelForm):
class Meta:
model = Payment

def __init__(self, *args, **kwargs):
self.business = kwargs.pop('business')
super(PaymentForm, self).__init__(*args, **kwargs)



The problem I have is that when I try to create an instance of this form
with:

form = PaymentForm(request.GET, business=business)

I get the following error:

TypeError at /payment/

__init__() takes at least 2 arguments (1 given)

The stacktrace shows that it fails on self.instance = opts.model() ... in
this location.

/django/forms/models.py in __init__
 initial=None, error_class=ErrorList, label_suffix=':',
 empty_permitted=False, instance=None):
opts = self._meta
if instance is None:
if opts.model is None:
raise ValueError('ModelForm has no model class specified.')
# if we didn't get an instance, instantiate a new one
self.instance = opts.model() ...
object_data = {}
else:
self.instance = instance
object_data = model_to_dict(instance, opts.fields, opts.exclude)
# if initial was provided, it should override the values from
instance
if initial is not None:

I think I need to somehow pass the business object to model = Payment
inside the Meta class... Is this the case and does anyone know how to do it?

I have remove the constructor from the model and everything works.

Thanks a million!

-m

-- 
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: Any tool to validate django templates?

2012-04-16 Thread Mario Gudelj
PyCharm does a very good job here when it comes to highlighting and error
detection in templates. Try it out.

On 17 April 2012 01:12, John Yeukhon Wong  wrote:

> Would this help?
>
> http://stackoverflow.com/questions/3086637/how-should-i-validate-html-in-django-templates-during-the-development-process
>
> I quite like the not-accepted-as-answer. Just go through your urls.
> Essentially, you have two types of possible template errors:
>
> 1. human errors (missing a close tag / mispell)
> 2. logic error
>
> For logic error, you are dealing with mostly logic tags  such as url tags
> or custom tags rendering problem. For example, does your {% url my_view id
> username %} actually works? are the variables passing to / from view are
> good for these tags? THis kind of error is not possible checked with going
> through all urls because u can't test possibility like that. THat has to be
> handled by unit test and integration (system) test.
>
>
> Good luck.
>
> On Sunday, April 15, 2012 12:42:14 PM UTC-4, Marcin wrote:
>>
>> Hi all,
>>
>> I've got a template that isn't parsing, but the error is the nondescript:
>> **TemplateSyntaxError: Could not parse the remainder: '"{%' from '"{%'
>>
>> Is there a tool that can help locate the source of the error?
>>
>> Marcin
>>
>> --
>> Marcin Tustin
>> Tel: 07773 787 105
>>
>>   --
> 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/-/Ml-zdg0y4WEJ.
>
> 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: Passing parameters to class Meta:

2012-04-16 Thread Mario Gudelj
Hey Javier,

Thanks for the reply. There are thousands of different businesses, so I
guess I'll have to go with the last option...

Is this kind of what you're referring to there
http://stackoverflow.com/questions/7114710/using-a-mixin-with-a-django-form-class
?

Thanks again.

-m

On 17 April 2012 01:28, Javier Guerra Giraldez  wrote:

> On Mon, Apr 16, 2012 at 10:11 AM, Mario Gudelj 
> wrote:
> > I think I need to somehow pass the business object to model = Payment
> inside
> > the Meta class...
>
> how many 'business' options are there?
>
> if it's a fixed num, you could add a Proxy 'subclass' for each one
> that simply provides the apropriate parameter in the constructor.
>
> if not fixed but small quantity (say, less than a hundred), maybe you
> could create those Proxies programatically?
>
> if it's an unbounded number of different 'business objects', then
> you'll have to override the model construction parts of the form i
> guess a mixin class would be easiest to carry to several forms.
>
>
> --
> Javier
>
> --
> 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: Passing parameters to class Meta:

2012-04-16 Thread Mario Gudelj
Hi Tom,

Thanks for chiming in, mate.

What I'm doing here is I'm getting the subdomain from the request and
matching it to the business when paypal PDT notification gets posted with
GET to my app.

I then need to save the payment info and sine a foreign key for the payment
is business I need to save that business against the payment. There are
many businesses running on the same app, so I have to relate payments to
businesses.

My thoughts were to generate the form from the payment model and save this
info inside the model when paypal comes back to me. But I've ran into this
issue.

Cheers,

-mario


On 17 April 2012 01:42, Mario Gudelj  wrote:

> Hey Javier,
>
> Thanks for the reply. There are thousands of different businesses, so I
> guess I'll have to go with the last option...
>
> Is this kind of what you're referring to there
> http://stackoverflow.com/questions/7114710/using-a-mixin-with-a-django-form-class
> ?
>
> Thanks again.
>
> -m
>
>
> On 17 April 2012 01:28, Javier Guerra Giraldez  wrote:
>
>> On Mon, Apr 16, 2012 at 10:11 AM, Mario Gudelj 
>> wrote:
>> > I think I need to somehow pass the business object to model = Payment
>> inside
>> > the Meta class...
>>
>> how many 'business' options are there?
>>
>> if it's a fixed num, you could add a Proxy 'subclass' for each one
>> that simply provides the apropriate parameter in the constructor.
>>
>> if not fixed but small quantity (say, less than a hundred), maybe you
>> could create those Proxies programatically?
>>
>> if it's an unbounded number of different 'business objects', then
>> you'll have to override the model construction parts of the form i
>> guess a mixin class would be easiest to carry to several forms.
>>
>>
>> --
>> Javier
>>
>> --
>> 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: Passing parameters to class Meta:

2012-04-16 Thread Mario Gudelj
TIL don't override model class constructor if you don't really have to.

Thanks for all your help guys! Now when I think about it I don't even know
why I did it in the first place.

On 17 April 2012 03:12, Javier Guerra Giraldez  wrote:

> On Mon, Apr 16, 2012 at 11:08 AM, Tom Evans 
> wrote:
> > Surely you would want what business a payment relates to to be stored
> > directly in the database?! At which point it simply becomes an
> > additional field in your payment model, and the only problems come
> > with automatically populating that field.
>
> my thoughts exactly
>
> --
> Javier
>
> --
> 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: ModelForm Validation Error

2012-04-17 Thread Mario Gudelj
Indent that redirect one more time so that it's wothin the if loop and
you're redirected to good only when the form is valid

On 18/04/2012 5:07 AM, "coded kid"  wrote:

> I want to make sure users fill all the fields before they are
> redirected to the next page. And if they don’t fill the fields it
> should raise an error telling them to fill the fields before they
> proceed. So to do that, I wrote the codes below. But the problem I’m
> facing is that when I didn’t fill the fields, it took me to the next
> page, instead of it to return me to the same page, and it didn’t raise
> any error.
>
> How can I make it validate those fields before taking users to the
> next page?
>
> Model:
>
> from django.core.exceptions import ValidationError
>
> class Memb(models.Model):
>slug=models.CharField(max_length=100)
>member=models.CharField(max_length=100)
>
>def __unicode__(self):
>return self.member, self.slug
>
>def clean_slug(self):
>data=self.cleaned_data['slug']
>if "Testy" not in data:
>raise ValidationError("Enter the correct name for this
> field")
>
> class MembForm(ModelForm):
>class Meta:
>model=Memb
>fields=('slug','member')
>
> Views:
>
> def my_memb(request):
>if request.method=="POST":
>form=MembForm(request.POST)
>if form.is_valid():
>data=form.cleaned_data
>form.save()
>return HttpResponseRedirect('/good/')
>else:
>form=MembForm()
>return render_to_response('member.html',{'MembForm':MembForm},
> context_instance=RequestContext(request))
>
> Template:
>
> {% block content %}
> 
>  {{MembForm.as_p}}
> 
> 
> {% endblock %}
>
> --
> 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: Is there such a open source django project?

2012-04-17 Thread Mario Gudelj
There is an app called django-helpdesk. Can't lookup the link for you but
you should be able to google it

On 18/04/2012 1:18 AM, "Lee Hinde"  wrote:

> On Tue, Apr 17, 2012 at 3:12 AM, James Deng  wrote:
>
>> Hi all,
>>
>> I have a case to manage my staff for customer support, basically I need a
>> time based schedule table. the point is that we need to know WHO at WHEN
>> should take care of WHICH customer, we should be able to input a bunch of
>> support schedule, and get a simple view of it.
>>
>> So my question is, is there any existing django project/module to use
>> before I rush to develop it myself?
>>
>>
> I found this -  https://github.com/glamkit/glamkit-eventtools last time I
> looked for a scheduling app.
>
> --
> 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: Logging in by Email isn't responding

2012-04-24 Thread Mario Gudelj
I'm new to django too, so i'm sorry if i get this wrong, but you don't seem
to be authenticating the user using django's authenticate method. I made my
username equal to email on.signup and then i use vanila django's auth module

On 23/04/2012 7:21 PM, "Mai"  wrote:

> here i guess i wrote Every thing to be able to log in by mail but it's
> not working is there something missing please? and
> AUTHENTICATION_BACKENDS = (
> 'mayapp.backends.EmailAuthBackend',
> 'django.contrib.auth.backends.ModelBackend'
> )
>
>
> backends.py
>
>
> from django.conf import settings
> from django.contrib.auth.backends import ModelBackend
> from django.core.validators import email_re
> from django.contrib.auth.models import User, check_password
>
> # Overwrite the default backend to check for e-mail address
> class EmailAuthBackend(object):
>"""
>Email Authentication Backend
>
>Allows a user to sign in using an email/password pair rather than
>a username/password pair.
>"""
>
>def authenticate(self, username=None, password=None):
>""" Authenticate a user based on email address as the user
> name. """
>try:
>user = User.objects.get(email=username)
>if user.check_password(password):
>return user
>except User.DoesNotExist:
>return None
>
>def get_user(self, user_id):
>""" Get a User object from the user_id. """
>try:
>return User.objects.get(pk=user_id)
>except User.DoesNotExist:
>return None
>
>
> views.py
>
>
>
> def login_user(request):
>state = "Please log in below..."
>username = password = ''
>if request.POST:
>if 'login' in request.POST:
>username = request.POST.get('username')
>password = request.POST.get('password')
>
>user = authenticate(username=username,
> password=password)
>if user is not None:
>if user.is_active:
>login(request, user)
>state = "You're successfully logged
> in!"
>
>return
> render_to_response('master.html',RequestContext(request))
>else:
>state = "Your account is not
> active, please contact the site
> admin."
>else:
>state = "Your username and/or password were
> incorrect."
>elif 'signup' in request.POST:
>form= SignUpForm()
>context = {'form':form}
>return
>
> render_to_response('Sign_up_Employer.html',context,context_instance=RequestContext(request))
>
>
>
>return render_to_response('login.html',{'state':state, 'username':
> username},RequestContext(request))
>
> --
> 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: Soap web services with Soaplib in Django

2012-04-25 Thread Mario Gudelj
It's probably a problem with what you're passing to the template or what
you have in your template. You should supply some actual code from your
view and your template.

-m

On 25 April 2012 15:01, Meenakshi Ithape  wrote:

> I used the Soap web services with Soaplib in Django, for that i take
> the help from below link
> http://djangosnippets.org/snippets/979/
> When i run this code  through command prompt it runs properly, but
> when i run it on browser it shows nothing,
> Can anybody please help me, what should i done wrong?
>
> Thanks for any suggestions
>
> --
> 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: Problem with accessing Audio files from server.

2012-04-26 Thread Mario Gudelj
How do you expect it to play? Do you have a player on the front end? Also,
if you look at the assets loaded into a browser - you can do this with Net
panel in firebug - does the file get loaded?

On 26/04/2012 2:23 PM, "atul khairnar"  wrote:

> Hi,
> I am writing Internet Radio App using Django. When i load the stream page
> in the browser (i.e. play_page.html) server does not stream the audio file
> at all.
> I have following settings in my project.
>
> MEDIA_ROOT = '/home/atul/Atul/django_radio/'
> MEDIA_URL = ''
>
> Audio File's Model:
>
> class Audio(models.Model):
> title= models.CharField(max_length=200)
> mp3  = models.FileField(upload_to = u'talks/', max_length=200)
> seconds  = models.IntegerField(blank = True, null = True)
> def __unicode__(self):
> return self.title
>
> Audio Files are stored at: '/home/atul/Atul/django_radio/talks/'
>
> I don't get why server unable to access the media file stored at above
> location??
> or does problem lies elsewhere?
>
> --
> Atul Khairnar
> College of Engineering , Pune
> Cell - (+91)9579289613
>
>
>  --
> 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: Soap web services with Soaplib in Django

2012-04-26 Thread Mario Gudelj
Never used that soap client, but from looking at the example on the right
you'd do something like this:

def your_view(request):
from soaplib.client import make_service_client
from foo.views import HelloWorldService
client = make_service_client('http://localhost:8000/hello_world/',
HelloWorldService())
result = client.say_hello('John', 2)
d = {'result': result}
return render_to_response('frontend/paypal.html', d)

But, you probably want to do something with the result of your call before
passing it to the template. I can't tell what your web service will return
so I can't advise you on that.

Also, there is another great SOAP client for python you may want to look at
https://fedorahosted.org/suds/ if you're having issues with this one.

Cheers,

-m

On 26 April 2012 19:26, Meenakshi Ithape  wrote:

> Thanks for the reply,
> I am new in django, Can you suggest me, how should i display the result
> which is getting from web service display it on web-browser?
> I am waiting for the reply.
>
> On Thursday, 26 April 2012 11:36:19 UTC+5:30, somecallitblues wrote:
>>
>> It's probably a problem with what you're passing to the template or what
>> you have in your template. You should supply some actual code from your
>> view and your template.
>>
>> -m
>>
>> On 25 April 2012 15:01, Meenakshi Ithape wrote:
>>
>>> I used the Soap web services with Soaplib in Django, for that i take
>>> the help from below link
>>> http://djangosnippets.org/**snippets/979/
>>> When i run this code  through command prompt it runs properly, but
>>> when i run it on browser it shows nothing,
>>> Can anybody please help me, what should i done wrong?
>>>
>>> Thanks for any suggestions
>>>
>>> --
>>> 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
>>> .
>>>
>>>
>>  --
> 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/-/cFhWHJUG2rsJ.
> 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: Soap web services with Soaplib in Django

2012-04-26 Thread Mario Gudelj
BTW, frontend/paypal.html there is a path to one of templates. you need to
supply your template path there.

On 27 April 2012 00:04, Mario Gudelj  wrote:

> Never used that soap client, but from looking at the example on the right
> you'd do something like this:
>
> def your_view(request):
> from soaplib.client import make_service_client
> from foo.views import HelloWorldService
>  client = make_service_client('http://localhost:8000/hello_world/',
> HelloWorldService())
>  result = client.say_hello('John', 2)
> d = {'result': result}
> return render_to_response('frontend/paypal.html', d)
>
> But, you probably want to do something with the result of your call before
> passing it to the template. I can't tell what your web service will return
> so I can't advise you on that.
>
> Also, there is another great SOAP client for python you may want to look
> at https://fedorahosted.org/suds/ if you're having issues with this one.
>
> Cheers,
>
> -m
>
> On 26 April 2012 19:26, Meenakshi Ithape wrote:
>
>> Thanks for the reply,
>> I am new in django, Can you suggest me, how should i display the result
>> which is getting from web service display it on web-browser?
>> I am waiting for the reply.
>>
>> On Thursday, 26 April 2012 11:36:19 UTC+5:30, somecallitblues wrote:
>>>
>>> It's probably a problem with what you're passing to the template or what
>>> you have in your template. You should supply some actual code from your
>>> view and your template.
>>>
>>> -m
>>>
>>> On 25 April 2012 15:01, Meenakshi Ithape wrote:
>>>
>>>> I used the Soap web services with Soaplib in Django, for that i take
>>>> the help from below link
>>>> http://djangosnippets.org/**snippets/979/<http://djangosnippets.org/snippets/979/>
>>>> When i run this code  through command prompt it runs properly, but
>>>> when i run it on browser it shows nothing,
>>>> Can anybody please help me, what should i done wrong?
>>>>
>>>> Thanks for any suggestions
>>>>
>>>> --
>>>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msg/django-users/-/cFhWHJUG2rsJ.
>> 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: Problem with accessing Audio files from server.

2012-04-26 Thread Mario Gudelj
Well, you should be able see the response from the server in Firebug or
Chrome Console. If it's 404 you need to look at your paths. If it's 200 you
have a frontend issue.

-m

On 27 April 2012 14:37, atul khairnar  wrote:

> Yes, I am using embedded player in html in the front end.
> I think the path where i am storing the files, server could no access
> them?
>
> On Apr 26, 2:35 pm, Mario Gudelj  wrote:
> > How do you expect it to play? Do you have a player on the front end?
> Also,
> > if you look at the assets loaded into a browser - you can do this with
> Net
> > panel in firebug - does the file get loaded?
> >
> > On 26/04/2012 2:23 PM, "atul khairnar"  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hi,
> > > I am writing Internet Radio App using Django. When i load the stream
> page
> > > in the browser (i.e. play_page.html) server does not stream the audio
> file
> > > at all.
> > > I have following settings in my project.
> >
> > > MEDIA_ROOT = '/home/atul/Atul/django_radio/'
> > > MEDIA_URL = ''
> >
> > > Audio File's Model:
> >
> > > class Audio(models.Model):
> > > title= models.CharField(max_length=200)
> > > mp3  = models.FileField(upload_to = u'talks/',
> max_length=200)
> > > seconds  = models.IntegerField(blank = True, null = True)
> > > def __unicode__(self):
> > > return self.title
> >
> > > Audio Files are stored at: '/home/atul/Atul/django_radio/talks/'
> >
> > > I don't get why server unable to access the media file stored at above
> > > location??
> > > or does problem lies elsewhere?
> >
> > > --
> > > Atul Khairnar
> > > College of Engineering , Pune
> > > Cell - (+91)9579289613
> >
> > >  --
> > > 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: Testing Google Charts within Django Unit Tests

2012-04-27 Thread Mario Gudelj
Yeah, selenium is your friend in this case

On 27/04/2012 3:07 PM, "Jonas Geiregat"  wrote:

>
>
> > I'm looking for a way to test the data that a google chart displays on
> > a web site with a unit test. Is this at all possible, and if so, where
> > should I look to accomplish this? I've tried accessing the Google
> > visualization datatable that is used to create the chart, but it
> > doesn't seem to be a part of the context of the HTTP responses that I
> > am getting.
>
> Take a look at selenium or windmill, they might be able to solve your
> issue.
>
> --
> 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: Django in mobile devices

2012-05-19 Thread Mario Gudelj
Have a look at http://www.linuxjournal.com/article/10940

Also
http://thedjangoforum.com/board/thread/879/django-python-on-a-standalone-android/

On 19 May 2012 00:54, Phang Mulianto  wrote:

> HI all,
>
> i recently see rhomobile.com , which running ruby in mobile devices, and
> phonegap which use javascript.
>
> do anyone aware of the equivalent python / django can be used for mobile
> devices..
>
> i am thinking about create app for the mobile client using web technology
> without go deeper in java.
>
> any comment appreciated.
>
>
> Thanks,
>
> Mulianto
>
> --
> 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 all does pinax provides us once you have used a starter project ?

2012-05-19 Thread Mario Gudelj
Your question has been answered on SO.

On 20/05/2012 12:35 AM, "yugal"  wrote:

>
> I am confused as I have a starter project with Pinax and it seems its over.
>
> I have mentioned my whole scenario in
> http://stackoverflow.com/q/10569310/731963
>
> Please elaborate and share your experiences with pinax !
>
> --
> 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/-/lFExXc4xnEgJ.
> 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: django forms - overriding constructor for changing field type depending by input

2012-05-19 Thread Mario Gudelj
Hey Luke,

I don't think you need to return anything, especially not a super class.

Try this http://dpaste.com/hold/750356/

Cheers,

-m



On 20 May 2012 10:06, luke lukes  wrote:

> hi everyone. i need to overrid the constructor of a form: if i have some
> value in input, some fields has to be ChoiceField, otherwise they have to
> be CharField. here's the code:
>
> http://dpaste.com/750343/
>
> but this way doesn't work. even if i declare fields before constructor  as
> CharField and then I ovverride them in __init__, they will not be
> renderized in template (I got this message:
> ).I don't
> understand where's the mistake (also because i have poor python skills...)
>
> any help?
>
> --
> 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/-/lIzEfD5QeZMJ.
> 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: bash error when trying to django_admin.py; not found -- FAQ not helping

2012-05-19 Thread Mario Gudelj
Hey Mike,

If you go to Python shell and do "import django", do you get an error
message and what is it?

Also, the location of 2.7 is different to other versions. They used to be
under /Library/Python/.. and 2.7 is under /System/Library/.. so you may
want to check your paths.

Also, try installing with "sudo easy_install django". I think that's what I
used on my Mac and it worked.

Cheers,

-m




Also, make sure that the python version loaded is 2.7.

On 20 May 2012 08:02, Mike Manfrin  wrote:

> I just installed django 1.4 on my OSX.7 macbook running Python 2.7.1.
>
> I installed first via git, and when that didn't work, I downloaded the
> tar and unzipped/installed 1.4.
>
> I am specifically getting the error:
> -bash: django_admin.py: command not found
>
> However, in /usr/local/bin, django_admin.py exists. When trying
> sudo ln -s /usr/local/python2.7/site-packages/django/bin/django-
> admin.py /usr/local/bin/django-admin.py
> as the FAQ suggests, I get an error saying /usr/local/bin/django-
> admin.py exists!
>
> So, I am running in to two errors: One saying django_admin doesn't
> exist, and the other saying it does when I try to set it up.
>
> I'm at the point of pulling out my hair -- any help would be
> appreciated.
>
> --
> 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 all does pinax provides us once you have used a starter project ?

2012-05-20 Thread Mario Gudelj
Yes it is. It practically provides you with a template, rather than a blank
canvas which is what you get with Django. If you follow their instructions
it will take you 5 minutes to see what you get. It gives you a functional
site.

What do you expect from it?


On 20 May 2012 13:04, yugal  wrote:

> I am still not satisfied with the answer I got.. So, is the starter
> project all that pinax provides ?
>
>
> On Saturday, 19 May 2012 18:51:17 UTC+5:30, yugal wrote:
>>
>>
>> I am confused as I have a starter project with Pinax and it seems its
>> over.
>>
>> I have mentioned my whole scenario in http://stackoverflow.com/q/**
>> 10569310/731963 
>>
>> Please elaborate and share your experiences with pinax !
>>
>  --
> 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/-/pwQGvGwWX4kJ.
> 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: Registering and authenticating via iPhone/Android app

2012-05-23 Thread Mario Gudelj
I read somewhere that Instagram use django-piston. But them some people are
saying that Piston has had any development done in over a year.

-m

On 23 May 2012 23:12, Roarster  wrote:

> On Wednesday, 23 May 2012 13:02:15 UTC+1, bruno desthuilliers wrote:
>>
>> On May 23, 1:12 pm, Roarster  wrote:
>> > I'm developing a site using Django using the built in user
>> authentication
>> > module.  This is all working fine and users can register, login, etc.
>> on
>> > the web site with no problems.  The plan is to also have companion
>> > iPhone/Android apps where users can register/login and then access
>> their
>> > data on the main site.  This is where I'm a bit unsure of how to
>> proceed.
>> >  I've been looking into using TastyPie to create a REST API which I
>> think
>> > will work fine for accessing/updating data but I'm not sure if this is
>> > appropriate for creating new users and authenticating existing users.
>>
>> I'm definitly not an expert when it comes to mobile apps, but there
>> are quite a few known REST (or XMLRPC or else) APIs around that
>> include at least user authentication - think google (including
>> youtube, blogger etc), dailymotion, most blogging platforms, etc.
>>
>> As far as I'm concerned, I'd definitly use the API for authentication
>> too (possibly using OAuth). wrt/ registration, well, I have not
>> checked if any of the above APIs support this, but from your Django
>> app's POV, it's still all about HTTP requests / responses anyway so
>> well...
>>
>> My 2 cents, really..
>
>
> Thanks Bruno.  I've had a bit more of a look into this and everyone seems
> to be using OAuth, as you mention.  I did try to get this working with the
> Tastypie API but I couldn't really find any documentation and found it a
> bit of a struggle.  I guess I'll have to look into this further.
>
> I've also looked into the public APIs you mention and none of them seem to
> allow registration (at least not on the public API).  I guess since my API
> will be private (at least initially) I can do what I want, I was just
> hoping to find out what some other well used apps (e.g. Instagram) might
> use for communication.  Do you think it's possible they just have another
> REST API they don't disclose?
>
> --
> 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/-/68UDvibDrpAJ.
>
> 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: Python IDLE

2012-05-30 Thread Mario Gudelj
You seriously have to give PyCharm a go. It's everything IDE should be and
loves django.

On 30 May 2012 23:40, Bill Freeman  wrote:

> On Mon, May 28, 2012 at 12:25 PM, Dennis Lee Bieber
>  wrote:
> > On Mon, 28 May 2012 05:37:43 -0700 (PDT), coded kid
> >  declaimed the following in
> > gmane.comp.python.django.user:
> >
> >> I'm in a big mess now, I've lost my projects due to this errror. I'm
> >> on windows, This is how I encounter the problem; I try to edit my
> >> settings.py in IDLE. After right clicking on the files, I choose open
> >> program with these default file. I choose idle window bat file, and I
> >> clicked Ok. It didn't open, I try to run manage.py runserver on my
> >> DOS. Not working, it will pop up the IDLE Shell and mange.py script by
> >> displaying it in IDLE. It didn't run the server. The logo of my python
> >> files have changed. How can I revert it back to open with IDLE? And
> >> use it as default for my python script?
> >
> >IDLE itself is a Python script; though it sounds like you (or
> > someone) created a Windows BAT file to act as an intermediate.
> >
> >The main problem appears to be that you've associated the "open"
> > action with /IDLE/... The normal "open" action for Python (.py) script
> > files should be Python.exe (or Pythonw.exe for .pyw). For editing you
> > should have/create a "Edit" action that invokes your IDLE
> > BAT file.
> >
> >You'll need to work with the file association commands in Windows
> to
> > reset things so that "open" means RUN the script.
> >
> >Unfortunately, different installations have used different names
> for
> > the file types. Here are mine (I had to do "ftype" with no arguments and
> > scan the long output to find the Python entries):
> >
> > E:\UserData\Wulfraed\My Documents>ftype py_auto_file
> > py_auto_file="E:\Python25\python.exe" "%1" %*
> >
> > E:\UserData\Wulfraed\My Documents>ftype pyw_auto_file
> > pyw_auto_file="E:\Python25\pythonw.exe" "%1"
> >
> >
> >Note that ftype only defines the "open"/"run" action for a file.
> > (Interesting -- the .pyw doesn't take command line arguments, probably
> > to be expected for a double-click open).
> >
> >The other half of the basic equation is the file extension to
> "file
> > type" association:
> >
> > E:\UserData\Wulfraed\My Documents>assoc .py
> > .py=py_auto_file
> >
> > E:\UserData\Wulfraed\My Documents>assoc .pyc
> > File association not found for extension .pyc
> >
> > E:\UserData\Wulfraed\My Documents>assoc .pyw
> > .pyw=pyw_auto_file
> >
> > (This is why I commented that the file type name may differ between
> > installs -- the assoc is
> ><.extension> = 
> > and ftype is
> > = 
> > As long as the same  is used in both commands the linkage
> > works)
> >
> >That SHOULD clear up the double-click/Open/command
> line
> > running of Python scripts. Setting up an Edit action (on WinXP) requires
> > going through either the registry by hand, or opening a directory
> > window,
> >
> > Tools/Folder Options
> > File Types (tab)
> >scroll down to PY and PYW entries, select one
> >Details should show "Opens with: python" (or pythonw)
> > [Advanced]
> >the default action should be "open" (bold). If there is no "edit"
> > action, click [New...]
> >
> >Give it Action name "edit" (or "edit with IDLE")
> >Application used to perform action: full path to the IDLE.BAT file
> > (in quotes) followed by "%1" (with quotes) for the argument placeholder
> > (the file to be edited).
> >Might need to [x] Use DDE; set "Application" to IDLE, set Topic to
> > System
> >
> > {NOTE: I'm paraphrasing from the edit action on my system which uses
> > "E:\Python25\Lib\site-packages\pythonwin\Pythonwin.exe" "%1"}
> > {I'm not sure if you could skip the BAT file and use
> >"path/to/python.exe" "path/to/IDLE.py" "%1"
> > instead}
> >
> > --
> >Wulfraed Dennis Lee Bieber AF6VN
> >wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.com/
>
> Last I used it (I've been blessedly Windows free for some time now),
> IDLE's editor was fine for editing Python (everyone has their own
> favorite code editor), at least giving nice syntax highlighting and
> correct (for Python) treatment of the tab key.  But it is not really
> an IDE (except maybe for projects that are one file, or maybe one
> folder).
>
> I'm sure that there are many fine Windows specific solutions.
> (Someone mentioned NOTEPAD++.  I can't comment, but the list is pretty
> good at that sort of judgement.)  But let me suggest that you learn to
> use a tool that is available on multiple platforms.  (If you deploy a
> site commercially, your costs, flexibility, and perhaps performance,
> will likely be better on a Linux or BSD based VPS or shared host.)  My
> personal favorite is emacs, but it can be easier to use vim remotely,
> and it is more likely to be pre-installed.  Yes, there are native
> Win

Re: Python IDLE

2012-05-30 Thread Mario Gudelj
It's not free but they have a 30 day trial period

On 31 May 2012 00:09, doniyor  wrote:

> @somecallitblues: pycharm is not free, right? but i am really willing to
> give a try for this. i am using for years Aptana studio which is completely
> fullfulling my wishes, but "pycharm loves django" sounds great!
>
> Am Mittwoch, 30. Mai 2012 15:59:13 UTC+2 schrieb somecallitblues:
>
>> You seriously have to give PyCharm a go. It's everything IDE should be
>> and loves django.
>>
>> On 30 May 2012 23:40, Bill Freeman  wrote:
>>
>>> On Mon, May 28, 2012 at 12:25 PM, Dennis Lee Bieber
>>>  wrote:
>>> > On Mon, 28 May 2012 05:37:43 -0700 (PDT), coded kid
>>> >  declaimed the following in
>>> > gmane.comp.python.django.user:
>>> >
>>> >> I'm in a big mess now, I've lost my projects due to this errror. I'm
>>> >> on windows, This is how I encounter the problem; I try to edit my
>>> >> settings.py in IDLE. After right clicking on the files, I choose open
>>> >> program with these default file. I choose idle window bat file, and I
>>> >> clicked Ok. It didn't open, I try to run manage.py runserver on my
>>> >> DOS. Not working, it will pop up the IDLE Shell and mange.py script by
>>> >> displaying it in IDLE. It didn't run the server. The logo of my python
>>> >> files have changed. How can I revert it back to open with IDLE? And
>>> >> use it as default for my python script?
>>> >
>>> >IDLE itself is a Python script; though it sounds like you (or
>>> > someone) created a Windows BAT file to act as an intermediate.
>>> >
>>> >The main problem appears to be that you've associated the "open"
>>> > action with /IDLE/... The normal "open" action for Python (.py) script
>>> > files should be Python.exe (or Pythonw.exe for .pyw). For editing you
>>> > should have/create a "Edit" action that invokes your IDLE
>>> > BAT file.
>>> >
>>> >You'll need to work with the file association commands in
>>> Windows to
>>> > reset things so that "open" means RUN the script.
>>> >
>>> >Unfortunately, different installations have used different
>>> names for
>>> > the file types. Here are mine (I had to do "ftype" with no arguments
>>> and
>>> > scan the long output to find the Python entries):
>>> >
>>> > E:\UserData\Wulfraed\My Documents>ftype py_auto_file
>>> > py_auto_file="E:\Python25\**python.exe" "%1" %*
>>> >
>>> > E:\UserData\Wulfraed\My Documents>ftype pyw_auto_file
>>> > pyw_auto_file="E:\Python25\**pythonw.exe" "%1"
>>> >
>>> >
>>> >Note that ftype only defines the "open"/"run" action for a file.
>>> > (Interesting -- the .pyw doesn't take command line arguments, probably
>>> > to be expected for a double-click open).
>>> >
>>> >The other half of the basic equation is the file extension to
>>> "file
>>> > type" association:
>>> >
>>> > E:\UserData\Wulfraed\My Documents>assoc .py
>>> > .py=py_auto_file
>>> >
>>> > E:\UserData\Wulfraed\My Documents>assoc .pyc
>>> > File association not found for extension .pyc
>>> >
>>> > E:\UserData\Wulfraed\My Documents>assoc .pyw
>>> > .pyw=pyw_auto_file
>>> >
>>> > (This is why I commented that the file type name may differ between
>>> > installs -- the assoc is
>>> ><.extension> = 
>>> > and ftype is
>>> > = 
>>> > As long as the same  is used in both commands the linkage
>>> > works)
>>> >
>>> >That SHOULD clear up the double-click/**Open/command
>>> line
>>> > running of Python scripts. Setting up an Edit action (on WinXP)
>>> requires
>>> > going through either the registry by hand, or opening a directory
>>> > window,
>>> >
>>> > Tools/Folder Options
>>> > File Types (tab)
>>> >scroll down to PY and PYW entries, select one
>>> >Details should show "Opens with: python" (or pythonw)
>>> > [Advanced]
>>> >the default action should be "open" (bold). If there is no
>>> "edit"
>>> > action, click [New...]
>>> >
>>> >Give it Action name "edit" (or "edit with IDLE")
>>> >Application used to perform action: full path to the IDLE.BAT
>>> file
>>> > (in quotes) followed by "%1" (with quotes) for the argument placeholder
>>> > (the file to be edited).
>>> >Might need to [x] Use DDE; set "Application" to IDLE, set Topic
>>> to
>>> > System
>>> >
>>> > {NOTE: I'm paraphrasing from the edit action on my system which uses
>>> > "E:\Python25\Lib\site-**packages\pythonwin\Pythonwin.**exe" "%1"}
>>> > {I'm not sure if you could skip the BAT file and use
>>> >"path/to/python.exe" "path/to/IDLE.py" "%1"
>>> > instead}
>>> >
>>> > --
>>> >Wulfraed Dennis Lee Bieber AF6VN
>>> >wlfr...@ix.netcom.com
>>> > HTTP://wlfraed.home.netcom.**com/
>>>
>>> Last I used it (I've been blessedly Windows free for some time now),
>>> IDLE's editor was fine for editing Python (everyone has their own
>>> favorite code editor), at least giving nice syntax highlighting and
>>> correct (for Python) treatment of the tab key.  But it is not really
>>> an IDE (excep

Re: Tough finding a form with dynamic fields out there

2012-05-30 Thread Mario Gudelj
Daniel has point out the issue, but have a look at this speech from Django
Con last year http://blip.tv/djangocon/advanced-django-form-usage-5573287.
It has some great stuff in there.

-m

On 31 May 2012 06:14, Daniel Roseman  wrote:

> So, compare this:
>
>
> def __init__(self, mailboxes, *args, **kwargs):
>>
>
>  with how you're calling it:
>
>
>> form = MboxReg(request.POST, int(mailboxes))
>>
>>
> and you should see why you're getting this:
>
>
>> Error:
>> Exception Value:
>>
>> int() argument must be a string or a number, not 'QueryDict'
>>
>> On the
>>
>> for i in range(int(mailboxes)):
>>
>> -- Mike
>>
>>
> --
> DR.
>
> --
> 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/-/z68uQEeQ4fsJ.
>
> 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: django site upload

2012-06-04 Thread Mario Gudelj
Upload to where? What's confusing you?

On 5 June 2012 02:17, AJAYI THEOPHILUS  wrote:

> I am a newbie to django and i need help on site upload
>
> --
> 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: Handling millions of rows + large bulk processing (now 700+ mil rows)

2012-06-30 Thread Mario Gudelj
+1

On 1 July 2012 10:40, Setiaman Lee  wrote:

> Hi Cal,
> Interesting topic. Count me in.
> On Jun 30, 2012 11:10 PM, "Cal Leeming [Simplicity Media Ltd]" <
> cal.leem...@simplicitymedialtd.co.uk> wrote:
>
>> Hi all,
>>
>> As some of you know, I did a live webcast last year (July 2011) on our
>> LLG project, which explained how we overcome some of the problems
>> associated with large data processing.
>>
>> After reviewing the video, I found that the sound quality was very
>> poor, the slides weren't very well structured, and some of the information
>> is now out of date (at the time it was 40mil rows, now we're dealing with
>> 700+mil rows).
>>
>> Therefore, I'm considering doing another live webcast (except this time
>> it'll be recorded+posted the next day, the stream will be available in
>> 1080p, it'll be far better structured, and will only last 50 minutes).
>>
>> The topics I'd like to cover are:
>>
>> * Bulk data processing where bulk_insert() is still not viable (we went
>> from 30 rows/sec to 8000 rows/sec on bulk data processing, whilst still
>> using the ORM - no raw sql here!!)
>> * Applying faux child/parent relationship when standard ORM is too
>> expensive (allows for ORM approach without the cost)
>> * Applying faux ORM read-only structure to legacy applications (allows
>> ORM usage on schemas that weren't properly designed, and cannot be changed
>> - for example, vendor software with no source code).
>> * New Relic is beautiful, but expensive. Hear more about our plans to
>> make an open source version.
>> * Appropriate use cases for IAAS vs colo with SSDs.
>> * Percona is amazing, some of the tips/tricks we've learned over.
>>
>> If you'd like to see this happen, please leave a reply in the thread - if
>> enough people want this, then we'll do public vote for the scheduled date.
>>
>> Cheers
>>
>> Cal
>>
>> --
>> 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.



[no subject]

2012-07-07 Thread Mario Gudelj
Hi djangoers,

I have signals issue I can not figure out. NAy help is greatly appreciated.

So, I have defined my own signal like this in my signals.py:

--- signals.py ---

from django.dispatch import Signal

# Sent when a payment is successfully processed.
payment_successful = Signal(providing_args=["business_id"])




I have a function that needs to send an email on successful payment inside
my listeners.py file:

 listeners.py 

@receiver(payment_successful)
def send_email_confirmation(sender, **kwargs):
#more stuff here
-


If I call send function from my payment model the receiver function is
never called.

 models.py --

#this is the line that gets called in models file. I have a print statement
in front of it and I know it gets called.
payment_successful.send(sender=self, business_id=self.id)

-


Also, I have this line before the above statement and I can see that no
receivers are registered inside the payment_successful signal object:

print "receivers: %s", payment_successful.receivers

However, if I open the shell and I pull in a payment and make the same call
to the send function like this:

payment_successful.send(sender=payment, business_id=13)

I get the the email sent and if I check payment_successful.receivers I can
see the receiver functions in there.

I have no idea why this is. If anyone can help I'll buy you a beer!

Thanks a million!

-m

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



Signal receivers not registered in the app. They work fine in shell

2012-07-07 Thread Mario Gudelj
Forgot to add subject. Sorry!

--

Hi djangoers,

I have signals issue I can not figure out. NAy help is greatly appreciated.

So, I have defined my own signal like this in my signals.py:

--- signals.py ---

from django.dispatch import Signal

# Sent when a payment is successfully processed.
payment_successful = Signal(providing_args=["business_id"])




I have a function that needs to send an email on successful payment inside
my listeners.py file:

 listeners.py 

@receiver(payment_successful)
def send_email_confirmation(sender, **kwargs):
#more stuff here
-


If I call send function from my payment model the receiver function is
never called.

 models.py --

#this is the line that gets called in models file. I have a print statement
in front of it and I know it gets called.
payment_successful.send(sender=self, business_id=self.id)

-


Also, I have this line before the above statement and I can see that no
receivers are registered inside the payment_successful signal object:

print "receivers: %s", payment_successful.receivers

However, if I open the shell and I pull in a payment and make the same call
to the send function like this:

payment_successful.send(sender=payment, business_id=13)

I get the the email sent and if I check payment_successful.receivers I can
see the receiver functions in there.

I have no idea why this is. If anyone can help I'll buy you a beer!

Thanks a million!

-m

-- 
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: urlpatterns

2012-07-08 Thread Mario Gudelj
Which url are you trying to access when you get that 404?
On Jul 8, 2012 5:36 PM, "Seyfullah Tıkıç"  wrote:

-- 
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: urlpatterns

2012-07-08 Thread Mario Gudelj
But you've commented out all your URLs that start with /polls/, like
url(r'^polls/$',
'index')... r'^polls/$' will resolve to http://127.0.0.1:8000/polls/, for
example.

-m

On 8 July 2012 23:01, Seyfullah Tıkıç  wrote:

> http://127.0.0.1:8000/polls/34/
> http://127.0.0.1:8000/polls/
> http://127.0.0.1:8000/polls/34/results/
> 2012/7/8 Mario Gudelj 
>
>> Which url are you trying to access when you get that 404?
>> On Jul 8, 2012 5:36 PM, "Seyfullah Tıkıç"  wrote:
>>
>> --
>> 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.
>>
>
>
>
> --
> SEYFULLAH TIKIÇ
>
> --
> 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:

2012-07-08 Thread Mario Gudelj
No, I'm not. I didn't think I need to...

On 9 July 2012 00:04, Tomas Neme  wrote:

> Are you importing your listeners.py from anywhere?
>
> --
> "The whole of Japan is pure invention. There is no such country, there
> are no such people" --Oscar Wilde
>
> |_|0|_|
> |_|_|0|
> |0|0|0|
>
> (\__/)
> (='.'=)This is Bunny. Copy and paste bunny
> (")_(") to help him gain world domination.
>
> --
> 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: dashboard for user profile

2012-07-13 Thread Mario Gudelj
This should be really easy. Google something like "extending user profile"
with user being a foreign key to your model. The you can grab the use from
the request in you view and get the info from db and just spit it out on
the screen.

M
On Jul 13, 2012 11:58 AM, "psychok7"  wrote:

> i there,
> i am trying to write a dashboard page to present after user login. i have
> been searching google and only found *django-admin-tools . won*dering if
> there is something like that for a user profile page (tried django-profiles
> with no luck)
>
> thanks
>
> --
> 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/-/Ffs1FOqrQXoJ.
> 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: more info to the user

2012-08-15 Thread Mario Gudelj
For the first question you should look at Forms topic in django docs. For
the second one take a look at models docs for the info on how to mark the
field as not required.

M
On Aug 15, 2012 3:36 PM, "heni yemun"  wrote:

> Hi,
> I have set up a UserProfile using the technique outlined in the standard.
> What i can do give values to the fields in the user profile model. So if
> i've a city field in the UserProfile, how can i put the value 'Asmara' to
> it and save it in the database?
>
> Second question is whenever i try to save a field it says '*fieldname*cannot 
> be NULL'. What is this? THANK YOU!
>
> --
> 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/-/kNwyJrDyyeUJ.
> 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.



I LOVE THIS COMMUNITY!

2012-08-21 Thread Mario Gudelj
I just want to tell you guys that you're awesome! I've never seen a
community which helps noobs so much and with so few dickheads in it. Good
on you!

Mario

-- 
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: To Use or Not to Use the admin backend

2012-09-03 Thread Mario Gudelj
You can certainly write your own. I wrote one for a saas solution i worked
on since it was quite custom and i didn't need much of the functionality
admin offered. But admin will help you with all that CRUD you normally have
to create yourself. So, it really depends what your requirement is.

M
On Sep 4, 2012 1:38 AM, "Frankline"  wrote:

> Hi,
>
> I'm creating a site in Python/Django and feel that the admin backend, as
> good as it is, may not be a one-fit-for-all situations.
>
> My question is this:
>
> Have any of you ever had a need to have a custom admin backend?
>
> In what example situations would one create his/her own admin backend
> rather than using the default admin panel that ships with Django?
>
> What are the disadvantages of rewriting your own backend?
>
> Regards,
> Frank
>
> --
> 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: bound field object - dynamic forms

2012-09-03 Thread Mario Gudelj
Try {{ issue.0}} and {{ issue.1}}
On Sep 4, 2012 5:55 AM, "mjh"  wrote:

> Hi all - not sure how to show the choicefield dropdown in my template?
>
> Am generating a dynamic form (note: for issue in issues in forms.py) and 
> appending the fields to self.issue_list
>
> in the template I am looping over these fields ({% for issue in 
> form.issue_list %}) and can write out the label {{ issue.label }} but if 
> write out {{ issue }} I simply get the bound field object written to template 
> ().
>
> Question is how do I get the html dropdown to display in the template??
>
>
>
> >>> forms.py
> def __init__(self, item, *args, **kwargs):
> super(ItemAnalysisForm, self).__init__(*args, **kwargs)
> issue_choice = (('1', 'Reduced'),
> ('2', 'Maintained'),
> ('3', 'Increased')
> )
> issues = item.issue.all()
>
> self.issue_list = []
> self.a_list = []
> # generate dynamic issue dropdowns...
> for issue in issues:
> self.fields['issue-' + str(issue.pk)] = 
> forms.ChoiceField(label=issue.name, choices=issue_choice, required=False)
> self.a_list.append(self.fields['issue-' + str(issue.pk)])
> self.issue_list.append(self.fields['issue-' + str(issue.pk)])
> self.fields['text'] = forms.CharField(label='text', required=True, 
> widget=forms.Textarea(attrs={'rows':25,'cols':'100'}))
> self.a_list.append(self.fields['text'])
>
>
> >>> template
> {% 
> csrf_token %}
> 
> Individual Issue Outcome:
> 
> {% for issue in form.issue_list %}
> 
> {{ issue.label }}: {{ issue }}
> 
> {% endfor %}
> 
> 
> 
> Comment:
> 
> {{ form.text }}
> 
>
> 
>
>  --
> 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/-/XSMbUGOJyvMJ.
> 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: Iphone applications via django

2012-09-11 Thread Mario Gudelj
Nope. You do objective c or html and js with something like phonegap
On Sep 11, 2012 6:59 PM, "Sait Maraşlıoğlu"  wrote:

> How do you create iphone applications via django.
> Application logic will be django but what about user interface, do we do
> that with django too?
>
> --
> 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/-/xL4mqQobAEUJ.
> 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: Iphone applications via django

2012-09-11 Thread Mario Gudelj
 Im having a hard time understanding this term, can u explain in a smiple
>>> manner?
>>>
>>>
>>>
>>> On Tuesday, 11 September 2012 22:18:34 UTC+3, Cal Leeming [Simplicity
>>> Media Ltd] wrote:
>>>
>>>> It would be a cold day in hell before I ever used XML for an API ;)
>>>>
>>>>  There's a whole ton of API wrappers for Django (hell you could write
>>>> your own in under 50 lines of code), but here is a pretty good one:
>>>>
>>>>  
>>>> http://django-tastypie.readthe**docs.org/en/latest/index.html<http://django-tastypie.readthedocs.org/en/latest/index.html>
>>>>
>>>>
>>>>  Tastypie is a bit complex to look at, but it is sane and ensures you
>>>> keep to good security and design principles.
>>>>
>>>>  Hope this helps!
>>>>
>>>>  Cal
>>>>
>>>> On Tue, Sep 11, 2012 at 7:56 PM, Ray Ch  wrote:
>>>>
>>>>> Can you tell me how do i do that?
>>>>> Do you have any kind of blog or tutorial which would help me out
>>>>> connecting the web API's with iphone.
>>>>>
>>>>> Do you suggest JSON or XML ?
>>>>>
>>>>>
>>>>> On Tuesday, September 11, 2012 4:09:35 PM UTC+5:30, Cal Leeming
>>>>> [Simplicity Media Ltd] wrote:
>>>>>
>>>>>> You can create a server side API for the app - but the actual
>>>>>> interface is done using the methods mentioned by Mario previously.
>>>>>>
>>>>>>  Cal
>>>>>>
>>>>>>  On Tue, Sep 11, 2012 at 11:09 AM, Mario Gudelj 
>>>>>> wrote:
>>>>>>
>>>>>>>  Nope. You do objective c or html and js with something like
>>>>>>> phonegap
>>>>>>>   On Sep 11, 2012 6:59 PM, "Sait Maraşlıoğlu" 
>>>>>>> wrote:
>>>>>>>
>>>>>>>>  How do you create iphone applications via django.
>>>>>>>> Application logic will be django but what about user interface, do
>>>>>>>> we do that with django too?
>>>>>>>> --
>>>>>>>> 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/ms**g/django-users/-/xL4mqQobAEUJ<https://groups.google.com/d/msg/django-users/-/xL4mqQobAEUJ>
>>>>>>>> .
>>>>>>>>  To post to this group, send email to django...@googlegroups.com.
>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>> django-users...@googlegroups.c**om.
>>>>>>>>
>>>>>>>> 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...@googlegroups.com.
>>>>>>> To unsubscribe from this group, send email to
>>>>>>> django-users...@googlegroups.c**om.
>>>>>>>
>>>>>>> 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 view this discussion on the web visit
>>>>> https://groups.google.com/d/ms**g/django-users/-/J44uT5ivqbIJ<https://groups.google.com/d/msg/django-users/-/J44uT5ivqbIJ>.
>>>>>
>>>>>
>>>>> To post to this group, send email to django...@googlegroups.com.
>>>>> To unsubscribe from this group, send email to
>>>>> django-users...@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 view this discussion on the web visit https://groups.google.com/d/**
>>> msg/django-users/-/**F73khMkPWO4J<https://groups.google.com/d/msg/django-users/-/F73khMkPWO4J>.
>>>
>>>
>>> To post to this group, send email to django...@googlegroups.com.
>>> To unsubscribe from this group, send email to django-users...@**
>>> 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 view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/EkQMqMK1DisJ.
> 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: Override save or other options?

2012-09-11 Thread Mario Gudelj
I had to do the same thing recently. I had to grab the frequency, interval
etc. (used rrule for that) and then had to look at the first event instance
and create multiple instances from that event inside the view. If you
create a series model and use it as a foreign key in your event to keep on
top of everything it should work.

-m

On 12 September 2012 07:31, Lachlan Musicman  wrote:

> On Tue, Sep 11, 2012 at 5:15 PM, Jani Tiainen  wrote:
> >
> > Rather than creating individual series of events from recurring I would
> do a
> > concept called "recurring event". So it would be just a single event
> that is
> > projected to spesific days as necessary. It requires a slightly more work
> > but it's easier to maintain - for example entry would just state:
> >
> > recurring = True
> > frequence = WEEKLY
> > start_date = 2012-09-11
> > end_date = 2012-12-01
> > start_time = 09:00
> > end_time = 10:00
> >
> > Then I would roll out custom non-database concept of "calendar day" that
> > would be projected from database using both individual entries and
> recurring
> > entries.
> >
> > Later on it would be very easy to modify existing recurring events and
> for
> > example add cancellation of single event by creating overriding events
> > concept.
> >
> > This way amount of data will be kept relatively small, it's much easier
> to
> > read and modify. Of course drawback is that you need top level
> mechanisms to
> > work with single calendar entries that map to your database
> representation.
>
> Great, and obvious, idea - unfortunately a bad fit. Each event needs
> to be an object as there are student attendance records and staff
> attendance records linked to each individually.
>
> I was thinking about it last night and it occurred to me that instead
> of using the admin interface I should just write my own form and then
> do the multiple object creation in the view - it makes sense to me,
> although I'm sure I've miffed something up.
>
> Other ideas still welcome.
>
> cheers
> L.
>
>
>
> --
> ...we look at the present day through a rear-view mirror. This is
> something Marshall McLuhan said back in the Sixties, when the world
> was in the grip of authentic-seeming future narratives. He said, “We
> look at the present through a rear-view mirror. We march backwards
> into the future.”
>
> http://www.warrenellis.com/?p=14314
>
> --
> 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.



syncdb is not creating auth tables

2012-09-20 Thread Mario Gudelj
Hi Djangoers,

I'm sure I'm missing something simple but for the life of me I can not
figure this out.

I'm trying to syncdb and I'm getting this error:

File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py",
line 337, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.DatabaseError: no such table: auth_permission

My installed apps in settings file:

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.admin',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.staticfiles',
'forms',
)

I've tried changing the order since the docs say that permissions depend on
contenttypes but that didn't work.

Tried migration using south and it creates some migrations but then it
gives me the same error.

I'm using sqlite3.

I can see that some of the tables do get created, but no auth tables.

Googled for an hour and can't find anything.

Any help would be greatly appreciated!

-m

-- 
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: syncdb is not creating auth tables

2012-09-20 Thread Mario Gudelj
Thanks Amyth, but that doesn't work. I delete the sqlite file that gets
created with syncdb and i still get the same error. The new db file gets
created with some tables in it, but no auth tables.
On Sep 20, 2012 5:44 PM, "Amyth Arora"  wrote:

> You've changed the models after the tables were initially created. Delete
> the current database and create a new one. Then ->> syncdb.
>
> On Thu, Sep 20, 2012 at 1:01 PM, Mario Gudelj wrote:
>
>> Hi Djangoers,
>>
>> I'm sure I'm missing something simple but for the life of me I can not
>> figure this out.
>>
>> I'm trying to syncdb and I'm getting this error:
>>
>> File
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py",
>> line 337, in execute
>> return Database.Cursor.execute(self, query, params)
>> django.db.utils.DatabaseError: no such table: auth_permission
>>
>> My installed apps in settings file:
>>
>> INSTALLED_APPS = (
>> 'django.contrib.auth',
>> 'django.contrib.contenttypes',
>> 'django.contrib.admin',
>> 'django.contrib.sessions',
>> 'django.contrib.sites',
>> 'django.contrib.staticfiles',
>> 'forms',
>> )
>>
>> I've tried changing the order since the docs say that permissions depend
>> on contenttypes but that didn't work.
>>
>> Tried migration using south and it creates some migrations but then it
>> gives me the same error.
>>
>> I'm using sqlite3.
>>
>> I can see that some of the tables do get created, but no auth tables.
>>
>> Googled for an hour and can't find anything.
>>
>> Any help would be greatly appreciated!
>>
>> -m
>>
>> --
>> 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.
>>
>
>
>
> --
> Thanks & Regards
> 
>
> Amyth [Admin - Techstricks]
> Email - aroras.offic...@gmail.com, ad...@techstricks.com
> Twitter - @mytharora
> http://techstricks.com/
>
> --
> 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: problem with html select box values

2012-09-20 Thread Mario Gudelj
There's no way this can be answered without code examples
On Sep 20, 2012 1:54 PM, "Navnath Gadakh"  wrote:

> i have project for online shoping in that i use product category and and
> product names.
>i have taken product name in select dropdown box.
>  now i want to create offer for any perticular product whatever i selected
> .
>
> but at the time of product name comparison in view it takes only first
> string (i.e for ex. product name = sony ericsson , it takes only sony )
> plz do needful...
>
> --
> 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/-/PMY2nBYTF2MJ.
> 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: syncdb is not creating auth tables

2012-09-20 Thread Mario Gudelj
I worked it out. I had another settings.py file inside one of the apps
which had auth inside INSTALLED APPS and it was being imported into the
main settings file.

-m

On 21 September 2012 08:14, Mario Gudelj  wrote:

> Thanks Amyth, but that doesn't work. I delete the sqlite file that gets
> created with syncdb and i still get the same error. The new db file gets
> created with some tables in it, but no auth tables.
> On Sep 20, 2012 5:44 PM, "Amyth Arora"  wrote:
>
>> You've changed the models after the tables were initially created. Delete
>> the current database and create a new one. Then ->> syncdb.
>>
>> On Thu, Sep 20, 2012 at 1:01 PM, Mario Gudelj wrote:
>>
>>> Hi Djangoers,
>>>
>>> I'm sure I'm missing something simple but for the life of me I can not
>>> figure this out.
>>>
>>> I'm trying to syncdb and I'm getting this error:
>>>
>>> File
>>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py",
>>> line 337, in execute
>>> return Database.Cursor.execute(self, query, params)
>>> django.db.utils.DatabaseError: no such table: auth_permission
>>>
>>> My installed apps in settings file:
>>>
>>> INSTALLED_APPS = (
>>> 'django.contrib.auth',
>>> 'django.contrib.contenttypes',
>>> 'django.contrib.admin',
>>> 'django.contrib.sessions',
>>> 'django.contrib.sites',
>>> 'django.contrib.staticfiles',
>>> 'forms',
>>> )
>>>
>>> I've tried changing the order since the docs say that permissions depend
>>> on contenttypes but that didn't work.
>>>
>>> Tried migration using south and it creates some migrations but then it
>>> gives me the same error.
>>>
>>> I'm using sqlite3.
>>>
>>> I can see that some of the tables do get created, but no auth tables.
>>>
>>> Googled for an hour and can't find anything.
>>>
>>> Any help would be greatly appreciated!
>>>
>>> -m
>>>
>>> --
>>> 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.
>>>
>>
>>
>>
>> --
>> Thanks & Regards
>> 
>>
>> Amyth [Admin - Techstricks]
>> Email - aroras.offic...@gmail.com, ad...@techstricks.com
>> Twitter - @mytharora
>> http://techstricks.com/
>>
>> --
>> 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: Iframe, IE and request.session data

2012-11-05 Thread Mario Gudelj
It's a security feature in IE as far as I know. Try going to internet
options and set the security option to low and it will work. I don't think
there's a workaround for that.
On Nov 6, 2012 6:59 AM, "James DeMichele" 
wrote:

> Hello,
>
>
>
> I’m hoping someone here might be able to help me figure out how to fix
> this issue I am seeing with IE and an iframe.
>
>
>
> I’m using Django 1.4 and there is some data that I store on the session
> like such:
>
>
>
> request.session[“KEY”] = “VALUE”
>
>
>
> And then on a different request, I am able to retrieve the data by doing
> request.session.get(“KEY”). This works for all browsers when not within an
> iframe (including IE). However, when my site is running in an iframe, on
> IE, this data is not retrieved. I’ve found multiple pages on the interwebs
> that you need to set the P3P on the header. I’ve done this.
>
>
>
> response["P3P"] = 'CP="CAO IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi
> CONi HIS OUR IND CNT"'
>
>
>
> THIS does not fix the fact that the data on the session does not exist in
> IE.
>
>
>
> Is there a fix for this? Or is my site completely unsuable in IE in an
> iframe?
>
>
>
> Thanks.
>
>
>
> -James
>
> --
> 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: Django Development environment

2011-08-22 Thread Mario Gudelj
Mac, sqlite, Eclipse with Pydev or AquaMacs, apache

On 23 August 2011 13:06, Jani Tiainen  wrote:

> Ubuntu or windows, eclipse with pydev, apache, nginx, virtualenv and
> Oracle.
>
> Stephen Jackson  kirjoitti 23.8.2011 kello
> 1.07:
>
> I am new to the world of Django. I would like to hear from other django
> developers describe their dev environment (tools, os, editors, etc.).
>
> --
> 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/-/Fq-jCVxrK7AJ.
>
> 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.



Error: cannot import name settings

2011-08-24 Thread Mario Gudelj
Hi guys,

I'm still a noob so please bear with me :)

My friend has made a change to my django project and I got a clone of the
project with his changes from the bitbucket repo, but now when I try to
validate it I get:

Error: cannot import name settings

I tried setting the path to the new project as per
http://www.juiceanalytics.com/writing/django_settings_module/ and I can see
the project folder inside the path but I'm still getting the above error.

django_countries module has been added to the project and it seems to me
that it is causing this issue.

I have it inside installed apps:

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'registration',
'django_countries',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
)

When I comment it out I get a different error which refers to the django
countries being used inside the models.py.

I'm really not sure what do here. I have searched internet for the past hour
and can't find an answer.

My Django version is:

>>> print django.VERSION
(1, 3, 0, 'final', 0)

Thanks everyone.

Mario

-- 
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: Error: cannot import name settings

2011-08-24 Thread Mario Gudelj
Thanks for your help guys.

It seems that there is an issue in django_countries app where the fields.py
file has "from django_countries import settings", but there's no settings.py
file inside the django_countries folder. When I comment out that line the
project validates.

I wish that the error message was a bit nicer :(

Cheers,


On 25 August 2011 11:26, Kejun He  wrote:

> Search "settings" in your project, and see the settings how to be imported.
>
>
>
> On Wed, Aug 24, 2011 at 4:45 PM, Reinout van Rees wrote:
>
>> On 24-08-11 09:54, Mario Gudelj wrote:
>>
>>> Error: cannot import name settings
>>>
>>
>> Are you doing "from django.conf import settings"? Is that going wrong?
>> Or does django refuse to start? If so, what's your settings environment
>> variable like?
>>
>> And: can you give the full traceback?
>>
>>
>> Reinout
>>
>> --
>> Reinout van Reeshttp://reinout.vanrees.org/
>> rein...@vanrees.org 
>> http://www.nelen-schuurmans.**nl/<http://www.nelen-schuurmans.nl/>
>> "If you're not sure what to do, make something. -- Paul Graham"
>>
>>
>> --
>> 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.
>

-- 
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: Using gedit for django development

2011-09-12 Thread Mario Gudelj
This is awesome dude. I was looking for something like this since I moved to
Ubuntu.

On 13 September 2011 10:12, Micah Carrick  wrote:

> I've written a blog post on using gedit, the default text editor in GNOME,
> as a Django IDE. If you're a Linux user and you've never considered using
> gedit for development then this may be an interesting read for you.
>
> http://www.micahcarrick.com/gedit-as-a-django-ide-for-linux.html
>
>
>  --
> 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: Automaticall list all fields of generic model in template

2011-10-16 Thread Mario Gudelj
I think you need this
https://docs.djangoproject.com/en/dev/topics/forms/modelforms/

On 16 October 2011 18:24, bovender  wrote:

> Hi all,
>
> new to Django and loving it.
>
> Is there a way to automatically generate HTML output for the fields of a
> model instance?
>
> I'm looking for something similar to form.as_table, just without the form
> widgets.
>
> Currently I find myself manually repeating all the typing work for the
> detail view templates that I already did for the model definitions.
>
> Thanks
>
> bovender
>
> --
> 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/-/iGP654BL2HMJ.
> 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.



Date and time picker in Django

2011-10-20 Thread Mario Gudelj
Hi guys,

I'm looking for a date/time picker that I can use in my web forms. I've used
DateTimeField in my models and have to implement date in this format
"2011-10-19 21:34". I have implemented
http://trentrichardson.com/examples/timepicker/ o my site and it kind of
works in a sense that the picker comes up and it fills the form field with
the date, but for some reason the form is not validated and I can't save it.
If I enter the date in the same format manually it works. I also has a look
at the POST request and the date is there, so for the life of me I can't
figure this one out.

If anyone know of another jQuery date/time picker I could use for the format
I need that would be most appreciated!

Thanks djangoers!

Mario

-- 
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: Date and time picker in Django

2011-10-20 Thread Mario Gudelj
Thanks Kurtis. What do you use as a time picker?

On 21/10/2011 6:39 AM, "Kurtis"  wrote:

> I just use Jquery-UI DatePicker http://jqueryui.com/demos/datepicker/
>
> On Oct 20, 7:46 am, Mario Gudelj  wrote:
> > Hi guys,
> >
> > I'm looking for a date/time picker that I can use in my web forms. I've
> used
> > DateTimeField in my models and have to implement date in this format
> > "2011-10-19 21:34". I have implementedhttp://
> trentrichardson.com/examples/timepicker/o my site and it kind of
> > works in a sense that the picker comes up and it fills the form field
> with
> > the date, but for some reason the form is not validated and I can't save
> it.
> > If I enter the date in the same format manually it works. I also has a
> look
> > at the POST request and the date is there, so for the life of me I can't
> > figure this one out.
> >
> > If anyone know of another jQuery date/time picker I could use for the
> format
> > I need that would be most appreciated!
> >
> > Thanks djangoers!
> >
> > Mario
>
> --
> 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: Date and time picker in Django

2011-10-20 Thread Mario Gudelj
Yeah, that's the one i mentioned that doesn't work for me for some reason

On 21/10/2011 7:10 AM, "Kurtis Mullins"  wrote:

> No problem. I honestly haven't had to use a time picker, yet. But a quick
> google search brought this up:
> http://trentrichardson.com/examples/timepicker/ It seems to work w/ the
> Jquery-ui Datepicker.
>
> On Thu, Oct 20, 2011 at 4:05 PM, Mario Gudelj wrote:
>
>> Thanks Kurtis. What do you use as a time picker?
>>
>> On 21/10/2011 6:39 AM, "Kurtis"  wrote:
>>
>>> I just use Jquery-UI DatePicker http://jqueryui.com/demos/datepicker/
>>>
>>> On Oct 20, 7:46 am, Mario Gudelj  wrote:
>>> > Hi guys,
>>> >
>>> > I'm looking for a date/time picker that I can use in my web forms. I've
>>> used
>>> > DateTimeField in my models and have to implement date in this format
>>> > "2011-10-19 21:34". I have implementedhttp://
>>> trentrichardson.com/examples/timepicker/o my site and it kind of
>>> > works in a sense that the picker comes up and it fills the form field
>>> with
>>> > the date, but for some reason the form is not validated and I can't
>>> save it.
>>> > If I enter the date in the same format manually it works. I also has a
>>> look
>>> > at the POST request and the date is there, so for the life of me I
>>> can't
>>> > figure this one out.
>>> >
>>> > If anyone know of another jQuery date/time picker I could use for the
>>> format
>>> > I need that would be most appreciated!
>>> >
>>> > Thanks djangoers!
>>> >
>>> > Mario
>>>
>>> --
>>> 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.
>

-- 
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: bar charts

2011-11-08 Thread Mario Gudelj
Hey, I implemented a line chart and this is my code:

View:

def render_chart(request):
months =
['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
month_values = [0,0,0,0,0,0,0,0,0,0,0,0]
list_of_items = MyModel.objects.all()
for item in list_of_items:
if item.creation_date.strftime("%b") ==
months[item.creation_date.month - 1]:
month_values[item.creation_date.month - 1] =
month_values[item.creation_date.month - 1] + 1

d = {'user':request.user, 'months':months, 'month_values':month_values}
return render_to_response('chart.html', d)

And this is the template:

script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'Month');
data.addColumn('number', 'bookings');
data.addRows(12);
{% for month in months %}

data.setValue({{forloop.counter0}}, 0, '{{month}}');
{% for value in month_values %}
data.setValue({{forloop.counter0}}, 1, {{value}});
{%endfor%}
{%endfor%}
var chart = new
google.visualization.LineChart(document.getElementById('chart_div'));
chart.draw(data, {width: 760, height: 380, title: 'Stats'});
  }
 wrote:

>  On 2011年11月07日 21:26, Andre Terra wrote:
>
> Pass serialized json as a template variable?
>
> yes of course, pupulate data from django is not special, it's a normal
> process just like other language. we can output json to the chart
>
>
> That's what I'm doing atm. But JKM has built an app to help reduce the
> need to write javascript [1]. I haven't used it myself, but it looks
> interesting and promising.
>
>
> Cheers,
> AT
>
> [1] https://github.com/jacobian/django-googlecharts
>
>
> On Mon, Nov 7, 2011 at 8:16 AM, kenneth gonsalves 
> wrote:
>
>> On Mon, 2011-11-07 at 04:28 -0500, Joey Espinosa wrote:
>> > Here's the Quick Start page: http://goo.gl/g5I7X
>>
>>  that is easy - how does one populate with data from django?
>>  --
>> regards
>> Kenneth Gonsalves
>>
>> --
>> 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.
>

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



controlling user access

2011-11-17 Thread Mario Gudelj
Hi Djangoers,

I have a problem on my hands I'm not sure how to approach and would
appreciate your guidance.

I'm building a site that will host articles for separate businesses and
each business will have a user who needs to log in and administer article
that only belong to a particular business.

So, I have the following model:

class Business(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField("Business Name", max_length=50, blank=False)
slug = models.SlugField("Slug", max_length=255, unique=True,
blank=False)


class StaffProfile(models.Model):
user = models.ForeignKey(User, unique=True)

id = models.AutoField(primary_key=True)

business = models.ManyToManyField(Business)


class Article(models.Model):
id = models.AutoField(primary_key=True)
business = models.ForeignKey(Business, null=False)


So, every business will have a separate subdomain and will have a unique
slug.

Users can belong to one or more businesses and my StaffProfile extends the
Django's user class.

What I don't know is how to authenticate a user into a particular business,
so that this user only has access to the business they are logged into.

What I want them to do is to choose which business they want to log into on
the login and once they enter the username, password and select the
business I want them to be able to access articles that only belong to that
business and none of the articles that belong to those other businesses.

Any help or suggestions will be highly appreciated. Thanks guys!

Mario

-- 
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: controlling user access

2011-11-17 Thread Mario Gudelj
Thanks for the responses guys.

I'll be making a different admin interface for these users and leave the
django admin for myself.

The admin for these other users will be on
http://business1.myurl.com/console/,
http://business2.myurl.com/console/and so on.

So, the only way I can think of achieving this is to read the URL the
request is coming from (perhaps using HttpRequest.build_absolute_uri - what
do you think?) and then grabbing the authenticated user, getting the
"business" using get_profile(), then fetching articles that belong to that
business.

I was hoping that I could create a separate user group for every business
and then use some kind of decorator in my views that would limit the
access. I guess I still have to do do the same thing with queries here...

Thanks guys!



On 17 November 2011 20:26, Ivo Brodien  wrote:

> Do you want to use the admin for administration? You should not, since the
> admin is designed to be used by people that can be trusted, although it can
> be done, by overriding queryset method of the ModelAdmin.
>
> As stated before, make a page where a user selects the business and
> afterwards you query the articles for that business. This can be done in
> one or different views.
>
> Bye
>
> On Nov 17, 2011, at 9:13, Mario Gudelj  wrote:
>
> Hi Djangoers,
>
> I have a problem on my hands I'm not sure how to approach and would
> appreciate your guidance.
>
> I'm building a site that will host articles for separate businesses and
> each business will have a user who needs to log in and administer article
> that only belong to a particular business.
>
> So, I have the following model:
>
> class Business(models.Model):
> id = models.AutoField(primary_key=True)
> name = models.CharField("Business Name", max_length=50, blank=False)
> slug = models.SlugField("Slug", max_length=255, unique=True,
> blank=False)
> 
>
> class StaffProfile(models.Model):
> user = models.ForeignKey(User, unique=True)
>
> id = models.AutoField(primary_key=True)
> 
> business = models.ManyToManyField(Business)
>
>
> class Article(models.Model):
> id = models.AutoField(primary_key=True)
> business = models.ForeignKey(Business, null=False)
> 
>
> So, every business will have a separate subdomain and will have a unique
> slug.
>
> Users can belong to one or more businesses and my StaffProfile extends the
> Django's user class.
>
> What I don't know is how to authenticate a user into a particular
> business, so that this user only has access to the business they are logged
> into.
>
> What I want them to do is to choose which business they want to log into
> on the login and once they enter the username, password and select the
> business I want them to be able to access articles that only belong to that
> business and none of the articles that belong to those other businesses.
>
> Any help or suggestions will be highly appreciated. Thanks guys!
>
> Mario
>
>
>  --
> 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.



IntegrityError: bookings_business.slug may not be NULL on .create()

2011-11-17 Thread Mario Gudelj
Hi guys,

I have this issue I can not work out for the life of me. I would really
appreciate it if someone could help.

This is my model:

class Business(models.Model):
...
slug = models.SlugField("Slug", max_length=255, unique=True,
blank=False)

I have the following function in the models.py file that generates the
unique slug.

def unique_slug(item,slug_source,slug_field):
if getattr(item, slug_field): # if it's already got a slug, do nothing.
slug = slugify(getattr(item,slug_source)) #get the value of slug_source
from the item and slugify it
itemModel = item.__class__
   # the following gets all existing slug values
allSlugs = [sl.values()[0] for sl in itemModel.objects.values(slug_field)]
if slug in allSlugs:
counterFinder = re.compile(r'-\d+$')
counter = 2
slug = "%s-%i" % (slug, counter)
while slug in allSlugs:
slug = re.sub(counterFinder,"-%i" % counter, slug)
counter += 1
setattr(item,slug_field,slug)

I have overridden the save method for Business class with this:

def save(self, *args, **kwargs):
self.slug = unique_slug(self, slug_source='slug', slug_field='slug')
super(Business, self).save(*args, **kwargs)

The issue I have is that this will work in shell:

b = Business(name="some name", slug="some slug")
slug = unique_slug(b, slug_source='slug', slug_field='slug')
super(Business, b).save()

But this will not work:

b = Business.objects.create(name="some name", slug="some slug")

The error I get is:

"IntegrityError: bookings_business.slug may not be NULL"

I don't get it what the difference is and what I'm missing here. Any help
is highly appreciated guys. Thanks a million!

-- 
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 for a large social networking or photo sharing site?

2011-11-23 Thread Mario Gudelj
I'd suggest you to learn 2.x, since django doesn't run on 3. I would just
get into it. Make sure you learn pure basics of programming and Python and
then just start with that first django Polls tutorial and make sure you
understand every line of code as you go along. Finish few tuts, first 7
chapters of the book and you're good to go my friend! Just start coding.

On 24 November 2011 05:34, badlearner  wrote:

> @Simon: Thanks for the suggestion and reply. I have a question...
>
> I am an absolute beginner in programming, so the code I write (whilst
> using Django) may not be very very mature. So, do you think it would
> be okay (easy?) to optimize it as time passes by?
>
> This is probably related to Python, but I want to ask anyway - - if
> someone's starting to learn Python what would you suggest he learn?
> Python 2.x or 3.x? The problem is, not many APIs support Python 3.x,
> do they?
>
> Thanks.
>
> --
> 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: Help with many-to-many field update

2011-11-24 Thread Mario Gudelj
Hey Leslie,

Try add() method like in this answer on SO
http://stackoverflow.com/questions/1226290/django-manytomany-relation-add-error

Cheers,

On 25 November 2011 00:43, Nichehosters  wrote:

> Hi,
> I am relatively new to Django, and am trying to update a many-to-many
> related table using a ModelForm.
> I see fro the documentation that if I use save(commit=False) - which I
> do - I need to use save_m2m() after saving the initial form.  I am
> using the save_m2m(), but my related table does not get updated.
> Any help appreciated.
> I am using django V1.3.1 on linux using Postgresql as the db.
>
> Details:
>
> The Model:
> class srvorders(models.Model):
>client = models.CharField('Client', max_length=200)
>server = models.CharField('Server Type', max_length=200)
>os = models.CharField('Operating System', max_length=200)
>osopts = models.CharField('Operating System Options',
> max_length=200, blank=True, null=True)
>ordertotal = models.IntegerField()
>notes = models.TextField('Notes', blank=True, null=True)
>orderdate = models.DateTimeField()
>orderIP = models.IPAddressField()
>status = models.CharField('Order Status', max_length="20")
>srvopts = models.ManyToManyField(srvoptions, blank=True,
> null=True)
>
> class Meta:
>ordering = ["id"]
>verbose_name_plural = "Server Orders"
>
> def __unicode__(self):
>return str(self.id)
>
> class Admin:
>pass
>
> The ModelForm:
> class NewOrderForm(forms.ModelForm):
>Server_CHOICES = [('', '-- choose a Server --'), ] + [(s.id,
> s.name) for s in products.objects.all()]
>OS_CHOICES = [('', '-- choose a Server --'), ] +[(o.id, o.name)
> for o in OS.objects.all()]
>OPTION_CHOICES = [('', '-- choose a Server --'), ] +[(opt.id,
> opt.name) for opt in osoptions.objects.all()]
>
> server=forms.ChoiceField(choices=Server_CHOICES)
> os = forms.ChoiceField(choices=OS_CHOICES)
> osopts=forms.ChoiceField(choices=OPTION_CHOICES, required=False)
> ordertotal=forms.CharField(required=False)
> notes=forms.CharField(required=False)
>
> class Meta:
>model= srvorders
>exclude = ('client', 'orderdate', 'orderIP', 'status')
>
> The View snippet:
> if request.method == 'POST':
>form = NewOrderForm(request.POST)
>if form.is_valid():
>new_item = form.save(commit=False)
>new_item.client = orderClient
>new_item.orderdate = datetime.now()
>new_item.orderIP = remote_ip
>new_item.status = "Not_Paid"
>new_item.save()
>form.save_m2m()
>
> Regards,
> Leslie
>
> --
> 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: better datepicker

2011-11-28 Thread Mario Gudelj
Hey,

I use http://docs.jquery.com/UI/Datepicker on the front end.

It's as simple as placing $("#datepicker").datepicker(); inside the page
where you want to convert the text fields to date picker fields. I'll you
have to do is change the ID inside $("#datepicker").datepicker(); to an ID
of your field. e.g. change $("#datepicker").datepicker(); to
$("#your_field_id").datepicker();

You can also use a class as a selector if you have multiple fields.

To change the format use $("#your_field_id").datepicker({ dateFormat:
'yy-mm-dd' }); or $("#your_field_id").datepicker({ dateFormat: 'dd-mm-yy'
}); in your case

I hope that helps!

On 29 November 2011 03:32, marjenni  wrote:

> Hi,
>
> class SearchForm(forms.Form):
>
>date = forms.DateField(required=True,
> input_formats=('%d/%m/%Y',))
>
>
> I am trying to change this so that it displays a calendar when the
> user starts to enter a date.
> I have seen various examples using JQuery, but I can't find an example
> that explains what I have to do quite clearly enough. Ideally I would
> like to use a date range picker.
>
> many thanks
>
> Mark
>
> --
> 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: urls.py?

2011-12-08 Thread Mario Gudelj
I think you have to add "from views import *" to urls.py and make sure you
have a method called contact in your view.

Cheers,

On 09/12/2011 12:10 PM, "Jim Byrnes"  wrote:

> I am trying to learning django by working my way through The Definitive
> Guide to django (vers 1.1). I am running django 1.1.1 on Ubuntu 10.04.
>
> I get the following error when trying to import urls:
>
> >>> import urls
> Traceback (most recent call last):
>  File "", line 1, in 
>  File "/home/jfb/MyProgs/djcode/**mysite/urls.py", line 16, in 
>(r'^contact/$',views.contact),
> AttributeError: 'module' object has no attribute 'contact'
>
> Here is urls.py:
>
> from django.conf.urls.defaults import *
> from mysite import views
> from mysite.views import hello, current_datetime, hours_ahead, display_meta
> from django.contrib import admin
> from mysite.contact import views
> from mysite.books import views
>
> admin.autodiscover()
>
> urlpatterns = patterns('',
>(r'^hello/$', hello),
>(r'^time/$', current_datetime),
>(r'^time/plus/(\d{1,2})/$', hours_ahead),
>(r'^admin/' , include(admin.site.urls)),
>(r'^contact/$',views.contact),
>(r'^search-form/$', views.search_form), #from mysite.books
>(r'^search/$', views.search),   # from mysite.books
>
> )
>
> If I comment out either the reference to importing contact and it's
> pattern or books and it's pattern I get no error. Both books and contact
> are directories at the same level under mysite.
>
> Usually when I get in situations like this it is because I missed
> something.  I've gone back a reviewed everything I have done and still
> don't understand what is wrong.
>
> I would appreciate any help you could give me in figuring this out.
>
> Thanks,  Jim
>
>
> --
> 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
> .
>
>

-- 
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: working with forms , problem !!!

2011-12-11 Thread Mario Gudelj
Try using this:

d = {'form':form}
d.update(csrf(request))
return render_to_response('contact.html',d)

Tip: don't use !!! or ??? in your emails when asking for help :)



On 12 December 2011 08:30, Hassan  wrote:

> Dear All ,
> am trying to make a form and i used an example from the book but its
> not working , dont know why ?
>
> this is what i have :
>
> models.py :
> from django.db import models
> from django import forms
>
>
> class ContactForm(forms.Form):
>subject = forms.CharField(max_length=100)
>message = forms.CharField()
>sender = forms.EmailField()
>cc_myself = forms.BooleanField(required=False)
>
> --
> views.py:
> from django.shortcuts import render_to_response
> from models import ContactForm
> def contact(request):
>if request.method == 'POST': # If the form has been submitted...
>form = ContactForm(request.POST) # A form bound to the POST
> data
>if form.is_valid(): # All validation rules pass
># Process the data in form.cleaned_data
># ...
>return HttpResponseRedirect('/thanks/') # Redirect after
> POST
>else:
>form = ContactForm() # An unbound form
>
>return render_to_response('contact.html', {
>'form': form,
>})
>
> 
> contact.html:
>
> {% csrf_token %}
> {{ form.as_p }}
> 
> 
>
>
>
> i keep getting this :
>
> Forbidden (403)
>
> CSRF verification failed. Request aborted.
> Help
>
> Reason given for failure:
>
>CSRF token missing or incorrect.
>
>
> In general, this can occur when there is a genuine Cross Site Request
> Forgery, or when Django's CSRF mechanism has not been used correctly.
> For POST forms, you need to ensure:
>
>The view function uses RequestContext for the template, instead of
> Context.
>In the template, there is a {% csrf_token %} template tag inside
> each POST form that targets an internal URL.
>If you are not using CsrfViewMiddleware, then you must use
> csrf_protect on any views that use the csrf_token template tag, as
> well as those that accept the POST data.
>
> You're seeing the help section of this page because you have DEBUG =
> True in your Django settings file. Change that to False, and only the
> initial error message will be displayed.
>
> You can customize this page using the CSRF_FAILURE_VIEW setting.
>
> --
> 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: Show deactived radio button on a form

2011-12-30 Thread Mario Gudelj
I think you may need a HTML or JS solution here. Check out this SO post
http://stackoverflow.com/questions/1953017/why-cant-radio-buttons-be-readonly

Cheers,


On 31 December 2011 05:29, CrabbyPete  wrote:

> I have the following form:
>
> DEAL_CHOICES = [
>('Standard','Standard'),
>('Sponsored','Sponsored'),
>('Trial' ,'Trial')
>   ]
>
> class ApplyForm(forms.Form):
>
>deal_type= forms.ChoiceField( required = True,
>  choices=DEAL_CHOICES,
>
> widget=forms.RadioSelect(attrs={'class':"termscode"})
>)
>
>def __init__(self, *args, **kwargs):
>super(ApplyForm, self).__init__(*args, **kwargs)
>
> If a trial is no longer available, I want to show it, but as a
> deactivated choice. Can I do it, and is there a way to pass argument
> to the init function to tell it to do so?
>
> I tried ApplyForm( trial = False), but it causes the super(ApplyForm,
> self).__init__(*args, **kwargs)
> to blow up.
>
>
>
> --
> 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 does login() and logout() actually do?

2011-12-30 Thread Mario Gudelj
Hey,

All that code is in django.contrib.auth. The login() function is is in
views.py in that directory.

Cheers,



On 31 December 2011 11:34, David Zheng  wrote:

> Hi, all.
>
> In Django Document - User authentication in Django, it talks about how
> to log a user in and out. But I really what to know what happens under
> the hood when calling the functions login() and logout(). There is
> little content concerned with this topic. I've read almost every
> article or document I could find and the only thing I know is that
> login() function
> "
> i) uses the session framework to save the cookie we’ve seen in the
> first section of this article.
> ii) login() saves the user's ID in the session
> "
> Does anyone know where can I find the source code of the login() and
> logout() function or any articles talking about these two functions in
> detail. I really need to know what happens behind the scene to better
> understand Django's session framework.
>
> Thanks.
>
> -David.
>
> --
> 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.



not sure how to unpack a list within a tuple within another list inside the template

2012-01-11 Thread Mario Gudelj
Hi Djangoers,

I have a default dict variable final_d = defaultdict(list) that looks like
this:

[(order1, [customer2, customer1]), (order2, [customer3, customer5,
customer6]) ]

I've tried everything possible inside the template and I can't unpack this
thing. I'm passing final_d to the template inside the dictionary like
this: d = {'final_d':final_d}

This is my template which should I think work from what I've read on SO
and elsewhere:


{% for order, customers in final_d %}


{{ ordder.name }}
Cusotmers

{% for customer in customers %}
{{
customer.name }}
{% endfor %}


{% endfor %}


I have tried absolutely everything and I can't get this to render.

The above code doesn't render a result. if I change {% for order, customers
in final_d %} to {% for order in final_d %} I do get the order details, but
I can't access customer details.

Thank you for your help!

-m

-- 
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: Help me with django Form

2012-01-11 Thread Mario Gudelj
Can you provide your register model?

Is it possible that you've extended the user model and that your username,
password etc is getting stored inside auth_user table?


On 12 January 2012 12:49, coded kid  wrote:

> Hi guys, I’ve been trying to signup using the django form I created.
> Whenever I signup, the form is always saving the id no and not other
> fields like names, username.pasword,email etc. Below are the codes;
> In views.py:
> from django.shortcuts import render_to_response
> from django.http import HttpResponse
> from django.template import RequestContext
> from django.http import HttpResponseRedirect
> from mymeek.meekme import models
> from django.views.decorators.csrf import csrf_exempt
> @csrf_exempt
> def welcome(request):
>#Allow new user reg and login, if failed direct the user to signup
>if request.method=='POST':
>form=models.Register()
>new_user=form.save()
>return HttpResponseRedirect('/logpage/')
>else:
>form=models.Register()
>return render_to_response('mainpage.html',
> {'form':models.Register})
>
> In Models.py
> from django.db import models
> class Register(models.Model):
>names=models.CharField(max_length=50)
>email=models.EmailField('e-mail', blank=False)
>password=models.CharField(max_length=25)
>username=models.CharField(max_length=25)
>country=models.CharField(max_length=40)
>state_province=models.CharField(max_length=30)
>
>def __unicode__(self):
>return self.names
>
> In Template Form:
> 
>  {% csrf_token %}
> Names: 
> Email Address: 
> Password: 
> Username: 
> Country: 
> State: 
> 
> 
> 
> Please where I’ve I done something wrong? Help me out!
>
> --
> 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: not sure how to unpack a list within a tuple within another list inside the template

2012-01-12 Thread Mario Gudelj
Thanks for your help guys. I ended up creating a class for for orders and
customers class and then I passed those objects to the tepmlate inside a
dict. That worked.

Cheers,

On 12 January 2012 21:55, Masklinn  wrote:

> On 2012-01-12, at 11:47 , Daniel Roseman wrote:
> > However I'm confused by your initial description. What you show is not a
> > dict at all, but a list of 2-tuples (each containing a string and a
> list).
> > Is that a single value of the dict, or what?
>
> I'm guessing it's the initialization vector for the dict, though I'm not
> sure why he used this for a non-ordered dict.
>
>>>> dict([(1, [2, 3]), (5, [6, 7, 8])])
>{1: [2, 3], 5: [6, 7, 8]}
>>>> collections.defaultdict(lambda: [], [(1, [2, 3]), (5, [6, 7, 8])])
>defaultdict( at 0x1004ce488>, {1: [2, 3], 5: [6, 7,
> 8]})
>
>
> --
> 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: Does anyone know any blogs that write about how to quickly install and deploy a django application on Amazon EC2?

2012-01-12 Thread Mario Gudelj
http://www.synstorm.co.uk/2012/01/08/setting-up-django-on-a-free-amazon-ec2-instance/?utm_source=Python+Weekly+Newsletter&utm_campaign=337820f7f5-Python_Weekly_Issue_17_January_12_2012&utm_medium=email

On 13 January 2012 10:44, Stuart Laughlin  wrote:

> I am partial to debian / ubuntu, so I use those rather than Amazon's
> default AMIs (see http://alestic.com/ ). Here are a few links that I
> have found particularly useful in the past, for various aspects of the
> deployment process...
>
> *
> http://www.saltycrane.com/blog/2009/05/notes-using-pip-and-virtualenv-django/
> * http://www.saltycrane.com/blog/2010/10/how-install-pil-ubuntu/
> *
> http://brandonkonkle.com/blog/2010/jun/25/provisioning-new-ubuntu-server-django/
>
>
> Hope that helps,
>
> --Stuart
>
> On Thu, Jan 12, 2012 at 5:37 PM, Jeff Heard 
> wrote:
> >
> http://kencochrane.net/blog/2011/06/django-gunicorn-nginx-supervisord-fabric-centos55/
> >
> > I would go there.  It's not Amazon EC2 specific, but Amazon's
> distribution
> > by default is a Centos-based one, so everything should be in the same
> place.
> >  Plus, he very helpfully gives you code you can use to get everything
> > running quickly.  The hardest thing is getting nginx running within the
> main
> > initlevel, but even that is not hard, just tedious.
> >
> > This does not, however, tell you how to setup S3 storage to be Django's
> file
> > backend.  You'll have to look somewhere else for that
> >
> >
> > On Thu, Jan 12, 2012 at 6:32 PM, Stuart Laughlin 
> > wrote:
> >>
> >>
> >> On Thursday, January 12, 2012 10:09:13 AM UTC-6, Javier Guerra wrote:
> >>>
> >>> On Thu, Jan 12, 2012 at 9:54 AM, Stuart Laughlin <
> stu...@bistrotech.net>
> >>> wrote:
> >>> >  # author admits he is a non-sysadmin noob
> >>>
> >>> ad-hominem
> >>
> >> False. I pointed out what the author clearly stipulates.
> >>
> >> "I’m a sys admin NOOB. I am also teaching myself to code. This is my
> first
> >> time setting up this stack so there are probably going to be some
> >> bugs/security issues I conveniently side stepped just to get it to
> work."
> >>
> >> "This is obviously not secure enough for a ‘production’ environment."
> >>
> >> If that's what you want to model your deployment after, be my guest. I
> >> hardly think it's fallacious of me to suggest someone do otherwise.
> >>
> >>
> >> >  # he uses apache instead of... well... anything else
> >>>
> >>> well-tuned apache and mod_wsgi is on the same league as the cool boys.
> >>>  (i still prefer nginx, and i don't think this is a good example of
> >>> apache tuning, but nothing bad about it)
> >>
> >> I don't care a whit about what "the cool boys" are doing. What I care
> >> about is a production deployment that works efficiently and reliably and
> >> that is diagnosable when something doesn't work. Apache fails those
> >> criteria; nginx and lighttpd pass (in my opinion and the opinion of many
> >> other developers who have used these technologies for non-trivial web
> >> applications in production environments).
> >>
> >>>
> >>> > Bonus reason:
> >>>
> >>> >  # he uses mysql instead of postgres
> >>>
> >>> again, might not be the bestest choice but nowhere near a bad one.
> >>
> >> That's why I listed it as a bonus reason. Better than mssql and sqlite
> for
> >> a production deployment anyway, eh?
> >>
> >>
> >> --Stuart
> >>
> >> --
> >> 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/-/ByBrEdUj8HUJ.
> >>
> >> 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.
>
>

-- 
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: [pinax-users] Learn DJango first, then learn Pinax; or just learn Pinax straight-off?

2012-01-16 Thread Mario Gudelj
I'd recommend Django first. Do the polls tutorial, first 7 chapters of the
book, some Django By Example tuts and then get into Pinax.

https://docs.djangoproject.com/en/dev/intro/tutorial01/

http://www.djangobook.com/en/2.0/

http://lightbird.net/dbe/

Cheers,

On 17 January 2012 05:12, Alec Taylor  wrote:

> Thanks
>
> (also, apologies for replying to these so late, I thought I was subscribed
> but I was only a member... n00b mistake, well I'm getting them as they
> arrive now)
>
> --
> 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/-/rmwxQRV2v50J.
> 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.



  1   2   3   >