Re: Problem with RSS feed. (Long Post)

2010-04-21 Thread Nuno Maltez
As you probably have found out by now, since you're using 1.1, just creat the templates feed/_description.html as mentioned in the docs for version 1.1: http://docs.djangoproject.com/en/1.1/ref/contrib/syndication/ On Wed, Apr 14, 2010 at 5:44 PM, Ronnie Betzen wrote: >> Have you tried the obv

Re: feed decorator

2010-04-26 Thread Nuno Maltez
Have you tried invoking the pyhton debugger inside _wrapped to find out the actual values of req_format and fmt and what's happening in there? Nuno On Mon, Apr 19, 2010 at 4:15 AM, Streamweaver wrote: > I'm having trouble developing a feed decorator. I feel like the > decorator I've come up with

Re: Many-To-Many issue; trying to find a way around conditional id

2010-04-26 Thread Nuno Maltez
Are you saying that: collegelist = college.current_objects.filter(collegechoices__school=highschoolid).exclude(name='Undeclared').distinct().annotate(ccount=Count('collegechoices')) gives you the same results as collegelist = college.current_objects.exclude(name='Undeclared').distinct().annota

Re: modelForm ordering

2010-04-26 Thread Nuno Maltez
I'm not sure I understood correctly what you wanted to achieve, but if you want to order the Persons in the dropdown for the players field by name, you need to change the order of the queryset associated with that field. For a ForeignKey field, a ModelForm generates a ModelChoiceField http://docs.

Re: NoReverseMatch for authentication app views

2010-05-03 Thread Nuno Maltez
Can you access the django login view by typing the URL directly on the browser (http:///login/)? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group,

Re: How to filter a query set based on a calculated date value?

2010-05-03 Thread Nuno Maltez
You can try the extra() method and write some SQL: http://docs.djangoproject.com/en/dev/ref/models/querysets/#extra-select-none-where-none-params-none-tables-none-order-by-none-select-params-none Something like (you'd need the correct functions for adding time and finding the current date for you

Re: filebrowser issue

2010-05-04 Thread Nuno Maltez
On Mon, May 3, 2010 at 8:10 PM, Bobby Roberts wrote: > hey I have a strange issue.  I was having trouble getting django- > tinymce and filebrowser working.  I've worked through all of the > errors etc.  In filebrowser, I can create a new directory, but when i > try to upload a file or image, nothi

Re: values() and GenericRelation

2010-05-07 Thread Nuno Maltez
>  MyModel.objects.values('id', 'field1__name', 'field2', > 'field3__value', 'my_custom_set') ... > I could use all() result, but I must use the ForeingKey values of the > field1 and field3, so I don't know how to get its values if it not the > way I said before. > > How can I resolve this? I ca

Re: Localeurl and django-multilingual

2010-05-10 Thread Nuno Maltez
How are you creating the url for the links? Are you using the {% url %} tag and reverse() functions? It should work, we have sites with localeurl and django-multilingual running fine in production. Nuno On Sat, May 8, 2010 at 12:34 PM, Alessandro Ronchi wrote: > I need to have links with languag

Re: Paginating search results

2010-05-11 Thread Nuno Maltez
You need to pass the current search paramters in your query string (?party=D&q=&page= ) when you create the links to all the pages, and you need to be able to retrieve them from request.GET in order to recreate the object list (reps) when rendering a specific page (any particular reason why are you

Re: Paginating search results

2010-05-11 Thread Nuno Maltez
ure the query string and place it in the "next" and > "previous" page links. Here's how I went about doing that, just in > case someone else runs into this issue: > >  query_string = request.GET.copy() > > and then in the dict: > > 'query_string&#x

Re: Taking on a NoneType error

2010-05-12 Thread Nuno Maltez
Hi, I think the simple {% if entry.DOB %} {{ entry.DOB|age }}{% else %} N/A {% endif %} should work. Or, the other way around: {% if not entry.DOB %} ... You could also try testing in your filter: def age(bday, d=None): if bday is None: return None and use the default_if_no

Re: Using a variable for a field name in a filter?

2010-05-14 Thread Nuno Maltez
Sure: http://docs.python.org/tutorial/controlflow.html#unpacking-argument-lists myfilter = { var_field: "found" } Foo.objects.filter(**myfilter} hth, Nuno On Fri, May 14, 2010 at 2:19 PM, derek wrote: > Given a model Foo, with a field bar: > Foo.objects.filter(bar = "found") > works just fine.

Re: M2M with Intermediary - Django Admin Support - Doesn't appear?

2010-05-14 Thread Nuno Maltez
Hmmm ... you should have an inline formset at the bottom to add firms to your Article, with an associated input box forthe rating. If I understand correctly, each relation Article-Firm now needs a rating (mandatory), sou you can't just select Firms from a filter_horizontal widget - you need a way

Re: override base translations in your project

2010-05-17 Thread Nuno Maltez
I believe it should work the way you describe (you can even remove the line with the reference to the source). Are all the other translations in your project, excepto for those copied from the third party app, working fine? Nuno On Sun, May 16, 2010 at 11:46 PM, lenz wrote: > The Django docs te

Re: Custom Model Fields

2010-05-18 Thread Nuno Maltez
Hi, I think what you're trying to accomplish is more or less what django-tagging [http://code.google.com/p/django-tagging/] does, so I suggest looking at its source code. HTH, Nuno On Sun, May 9, 2010 at 11:24 PM, Nick Taylor wrote: > Hi all, > > I want to create my own "field" type for a model

Re: send_mail not firing

2010-05-19 Thread Nuno Maltez
Anything it the mail server's logs? Any trace of your app trying to send the message? Any errors? Nuno On Tue, May 18, 2010 at 11:42 PM, Nick wrote: > Actually, I've fixed the problem with send_activation. If i go via the > form it still doesn't trigger the email. > > On May 18, 5:19 pm, Nick w

Re: Extremely simple question that I can't get a simple answer for in Docs

2010-05-19 Thread Nuno Maltez
I think you need the google search help list :-) Just type "django forms" in the search box at docs.djangoproject.com And in the first result you have a lot of examples on how to print everything from a form in your template: http://docs.djangoproject.com/en/dev/topics/forms/ On Wed, May 19, 201

Re: ModelForm gives invalid option.

2010-05-26 Thread Nuno Maltez
You simply need to provide a default value for your field, i.e. : turtle_type = models.IntegerField(null=False, blank=False, choices=TURTLE_TYPES, default=1) See the notes on: http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#field-types hth, Nuno On Tue, May 25, 2010 at 10:05 PM, J

Re: Session not working as i had hoped

2010-05-26 Thread Nuno Maltez
http://docs.djangoproject.com/en/dev/topics/http/sessions/#using-sessions-in-views >    if request.session.get('has_visited',True): You're passing True as the default value to the get method - get(key, default=None); this means that when 'has_visited' isn't set in your session (1st visit) it st

Re: Image deduplication and upload_to

2010-05-27 Thread Nuno Maltez
Hi, I think it's designed to do that. See the behaviour of the save/get_available_name methods on core/files/storage.py (in the django source). Maybe you can write your own storage that overrides this (never tried it, but should work). Nuno 2010/5/26 Ricardo Bánffy : > Hi folks. > > I want to pr

Re: mod_wsgi can't find app to import..but I added path to wsgi file?!

2010-05-27 Thread Nuno Maltez
> ImportError: No module named mvc What's the "mvc" module? Python can't seem to find it. Is it in your python path? Nuno On Thu, May 27, 2010 at 4:20 PM, Chris Seberino wrote: > > I fixed the path issue that was causing the spinning but now I'm back > to getting import errors even with __init

Re: password reset getting error - 'function' object is not iterable

2010-05-28 Thread Nuno Maltez
At a first glance it looks like a problem with your urls. Could you show us your custom template and url definitions from urls.py? Nuno On Thu, May 27, 2010 at 7:10 PM, Pankaj Singh < singh.pankaj.iitkg...@gmail.com> wrote: > > > > > Exception Value: > > 'function' object is not iterable > > > >

Re: tinymce hyperlinks

2010-05-31 Thread Nuno Maltez
Which version of grappelli are you using? Currently the trunk requires django 1.2 but I think there's a branch that still works with 1.1. Having said that, we're using grappelli (a slightly older revision) with Django 1.1 in a live project and it works just fine. Do you notice any javascript error

Re: ImportError: No module named django.core

2010-05-31 Thread Nuno Maltez
Well, it seems that your python lib is at /usr/lib/python2.6/dist-packages: > mx:~/webapps$ python -c "from distutils.sysconfig import > get_python_lib; print get_python_lib()" > > /usr/lib/python2.6/dist-packages but django is in "local" - /usr/local/lib/python2.6/dist-packages > /usr/local/lib

Re: tinymce hyperlinks

2010-05-31 Thread Nuno Maltez
tting is this: > > document.getElementsBySelector is not a function > > it's in my admin/js folder in the action.js file? > > > > > On May 31, 5:15 am, Nuno Maltez wrote: >> Which version of grappelli are you using? Currently the trunk requires >> django 1.2 but I think there

Re: Problems with Django File Fields

2010-05-31 Thread Nuno Maltez
Well, I know this doesn't address most of the issues you raise, but I've used a combination of django-filebrowser, http://code.google.com/p/django-filebrowser/ , FileBrowseField and apache's x-sendfile, http://tn123.ath.cx/mod_xsendfile/, for serving restricted access files, successfully. I found

Re: Path issue (TemplateDoesNotExist)

2010-06-02 Thread Nuno Maltez
Well, if you're trying to render a template : "posts/post_list.html", the post_list.html file should live inside "posts" directory inside of your "templates" directory : templates/posts/post_list.html Don't mix html and python files in the same dir. Nuno On Wed, Jun 2, 2010 at 4:44 AM, M. Bash

Re: Several translations for the same string

2010-07-05 Thread Nuno Maltez
Have you tried giving the message different IDs and, in the English po file, translating them to the same string while in the italian language file translating to the same string? Silly example: ###it/myapp.po #: .\myapp\models.py:39 msgid "is active (m)" msgstr "è attivo" #: .\myapp\models.py:87

Re: Apache config trouble

2010-07-07 Thread Nuno Maltez
Hi, Are you sure the syntax error isn't in the wsgi file itself? /Library/WebServer/testing123/apache/django.wsgi Nuno On Wed, Jul 7, 2010 at 3:02 PM, Bradley Hintze wrote: > Hi all, > > I'm getting the following error n the apache error log: > > [Wed Jul 07 09:53:12 2010] [error] [client 152.1

Re: Query raises a DoesNotExist error

2010-07-07 Thread Nuno Maltez
At a glance: >        try: >            FullProfile.objects.get(email=email) >        except FullProfile.DoesNotExist: > >         test = > FullProfile.objects.get(email=self.cleaned_data['email']) >         raise forms.ValidationError("%s" % (test)) Shouldn't the second FullProfile.objects.get

Re: models.py import from other models.py

2010-07-08 Thread Nuno Maltez
What error do you get when you execute 'manage.py syncDB'? Could you paste it here? Nuno On Thu, Jul 8, 2010 at 2:28 AM, yugori wrote: > Hi, I'm beginner. > > I tried to execute 'manage.py syncDB' command, > but it's not work. -- You received this message because you are subscribed to the Goo

Re: return number instead of string in admin

2010-07-14 Thread Nuno Maltez
Hi, Why not def __unicode__(self): return u"%d" % self.mynumber ? Nuno On Wed, Jul 14, 2010 at 11:15 AM, alan-l wrote: > Hi, > > in the tutorial i see that to return a string or a combination of > strings, i can do: >    def __unicode__(self): >        return u'%s %s' % (self.firstname, s

Re: Admin Model Validation on ManyToMany Field

2010-07-14 Thread Nuno Maltez
Hi, Just a guess: have you actually selected a user and a folder when submitting the form? I think only valid field are present on the cleaned_data dict, and your users and folder fields are not optional (blank=True, null=True). hth, nuno On Tue, Jul 13, 2010 at 1:45 PM, Heleen wrote: > Hello,

Re: Admin Model Validation on ManyToMany Field

2010-07-14 Thread Nuno Maltez
really do fill in the data. In fact, if I delibirately throw an > error and look in the debug info I can see the ManyToMany field data > being present in the POST data, just like I can when I do the same > thing with the above models. > > Btw, I just noticed a typo in my Folder model

Re: Admin Model Validation on ManyToMany Field

2010-07-14 Thread Nuno Maltez
On Wed, Jul 14, 2010 at 3:50 PM, Nuno Maltez wrote: > Sorry, I can't reproduce your error with django 1.2. > > I copied your models (just removed the intermediaty "Permission" > because I don't know your User model) into a new app and I have 2 Oops, forgot

Re: problem models.py code

2010-07-14 Thread Nuno Maltez
Just set primary_key=True on your field: jono = models.PositiveIntegerField(primary_key=True) See the django documentation for details: http://docs.djangoproject.com/en/dev/topics/db/models/#id1 Nuno On Wed, Jul 14, 2010 at 6:38 PM, Jagdeep Singh Malhi wrote: > I try  this code to create datab

Re: Problem with simple search func in template

2010-07-16 Thread Nuno Maltez
On Fri, Jul 16, 2010 at 1:56 PM, maciekjbl wrote: > urlpatterns = patterns('django.views.generic.list_detail', >    url(r'^(?P[-\w]+)/$', 'object_detail', info, name="link- > prod"), >    url(r'^$','object_list', info, name="link-home"), > > ) > > urlpatterns += patterns('web_aplikacje.produkty.vi

Re: Custom form field validation and required=False

2010-07-16 Thread Nuno Maltez
Hi, Looking at Django's forms/fiedls.py may give you some ideas. The test for an empty value is if value in validators.EMPTY_VALUES You can also use self.required to see if the required attribute is set (e.g., see Field's validate() method). Of course, a username with a single space will still

Re: GAE + Django Authentication

2010-07-20 Thread Nuno Maltez
Hi, Have you tried django-nonrel? - http://www.allbuttonspressed.com/projects/django-nonrel On Tue, Jul 20, 2010 at 6:59 AM, Venkatraman S wrote: > Hi, > > Has anyone made inroads into django auth in GAE? I have been Googling around > for sometime and havent found a credible link on this. > Hel

Re: Accessing the current user's first name

2010-07-20 Thread Nuno Maltez
Hi, If user is a FK to the User model, then simply self.user.first_name should work. http://www.djangoproject.com/documentation/models/many_to_one/ Have you set the user property on the object you're trying to save? What error do you get? Btw what exactly are you trying to achieve with this lin

Re: permalink problem

2010-07-20 Thread Nuno Maltez
Maybe you can get a better description / traceback of the error from the shell. Something like python manage.py shell >> from myapp.models import Post >> p = Post.objects.all()[0] >> p.get_absolute_url() hth, Nuno On Tue, Jul 20, 2010 at 4:46 AM, vcarney wrote: > I'm having a problem getting a

Re: Unicode challenged

2010-08-09 Thread Nuno Maltez
> I have also tried replacing the write() statement with > write( string_content.encode( '' )) where I have tried the > encodings 'latin-1' and 'utf-8'; then it does not fail hard, but > instead of the wanted 'øåæ' characters I get '?' marks. Are you sure that you get '?' on the file if you wr

Re: Need help with my Form.save() method. Trouble with ForeignKey and ManyToMany Fields.

2010-08-09 Thread Nuno Maltez
>        def clean_username(self): >                data = self.cleaned_data['username'] >                try: >                        User.objects.get(username=data) >                except User.DoesNotExist: >                        return >                raise forms.ValidationError('The userna

Re: problem with a formset from model

2010-08-11 Thread Nuno Maltez
This happens to me as well (also with 1.2.1). Seems like a bug with _queryset vs queryset on BaseModelFormSet. Maybe you could submit a ticket to http://code.djangoproject.com/query Nuno On Tue, Aug 10, 2010 at 9:21 PM, refreegrata wrote: > Hello list. I have a problem. I'm a newbie in Django u

Re: I need a middleware to add language to urls in my templates

2010-08-11 Thread Nuno Maltez
I'm not sure if this provides exactly what you need, and I've never tested it with satchmo, but I've been using http://code.google.com/p/django-localeurl/ with success to proved different urls according to the language transparently. Maybe this helps, Nuno On Wed, Aug 11, 2010 at 3:46 PM, Alessan

Re: problem with block tag and autoescaping

2010-09-16 Thread Nuno Maltez
On Wed, Sep 15, 2010 at 4:50 PM, Julian wrote: > before returning, all paramaters in the urls are separated by & as > they should be. in the template the & occur as &. for example, the > url is print'ed in the tag: > > /go/to/url? > utts=-1&utsrc=trackuser&utsig=f6730dc992ee9a23c24ed0adae0eb5f6 >

Re: Deply with mod_wsgi

2010-09-16 Thread Nuno Maltez
At a glance: is your graphic dynamically generated and served by Django? If so, shouldn't the the src of the img tag point to /simuladores/grafico/ - or something under /simuladores where the wsgi script can catch it - instead of /grafico ? If your code is writing the image to the filesystem, is i

Re: Deply with mod_wsgi

2010-09-16 Thread Nuno Maltez
my graph is generated dynamically. Where do I change my code for this > error doesn't occur and my image appears? > > On Thu, Sep 16, 2010 at 1:56 PM, Nuno Maltez wrote: >> >> At a glance: is your graphic dynamically generated and served by >> Django? If so, shouldn

Re: Mudar Senha de um usuário

2010-09-17 Thread Nuno Maltez
Hi, If the user is logged in, instead of user = User.objects.get(username=nome) you can use user = request.user See: http://docs.djangoproject.com/en/dev/topics/auth/#authentication-in-web-requests Nuno 2010/9/17 Giovanna Ronzé : > Dado que um usuário está logado e quer mudar sua senha, co

Re: RSS Questions

2010-09-20 Thread Nuno Maltez
Hi, I didn't have any problems subscribing to your blog with google reader from http://www.tapnik.com/ > > Secondly, I'd like to include the entire post in the RSS feed, not > just the description. Looking at other feeds, it looks like these are > stuffed into a "content:encoded" tag? Is that rig

Re: filepath (system file system path) field

2010-09-22 Thread Nuno Maltez
On Tue, Sep 21, 2010 at 6:17 PM, pixelcowboy wrote: > Hi, I have seen this asked before here (without answers), but I wanted > to know how to go on about creating a field that stores filepath names > from the client filesystem, so I wanted to check if someone could > recommend the best apporach: C

Re: Using urlencode with the url tag

2010-03-18 Thread Nuno Maltez
On Mon, Mar 15, 2010 at 11:28 PM, saxon75 wrote: > I'm trying to generate a link where the URL of the current page gets > passed in the querystring of the link.  Like so: . > > I would have thought that I could do this relatively easily with > template tags, so I've tried this: > > <% url arg1, ar

Re: An odd issue with loading /media/ files

2010-03-19 Thread Nuno Maltez
Have you checked the logs (or what gets printed to the console in your dev server) to see if what files flash is actually requesting from the server? Any 404s? Nuno On Fri, Mar 19, 2010 at 2:48 PM, Jeffrey Taggarty wrote: > Any ideas? I know the flash loader is working just fine, it's a > trivia

Re: query a foreignkey

2010-03-19 Thread Nuno Maltez
On Fri, Mar 19, 2010 at 2:11 PM, het.oosten wrote: > To clarify. If I have three houses, and  house 120 has two > reservations, I get a list like this: > > 120 121 122 120 (if all are available) > > If the query matches one reservation of house 120 i get a list like > this: > > 121 122 120 > > Hou

Re: Dynamic multi-site - running many sites from one Django instance

2010-03-23 Thread Nuno Maltez
On Mon, Mar 22, 2010 at 5:53 PM, Tim Shaffer wrote: > It gives you multiple sites from one codebase with multiple settings > files. They are using the same project module. So your project would > look like this: > > project > - app1 > - app2 > - settings.py > - settings_site1.py > - settings_site2

Re: Remove session on browser close

2010-03-23 Thread Nuno Maltez
Do you really need to show the message for the remainder of the session? Or just when the page loads right after the user has successfully subscribed? in this case you could just delete the value after being "used": if request.session.get('signed_up', True): form.thanks = True

Re: How verbose model name in admin panel

2010-03-24 Thread Nuno Maltez
I think you need toput verbose_name(_plural) in the class Meta http://docs.djangoproject.com/en/dev/topics/db/models/#id3 class Category(models.Model): class Meta: verbose_name = "Kategoria" verbose_name_plural = "Kategorie" Nuno On Wed, Mar 24, 2010 at 5:49 PM, serek wrote: > Hi

Re: Initial data in a many to many field

2010-03-25 Thread Nuno Maltez
>On Thu, Mar 25, 2010 at 2:00 AM, mjlissner wrote: > I'll make things more concrete. I have the following in my model > (which is made into a ModelForm): > class UserProfile(models.Model): >    barmembership = models.ManyToManyField(BarMembership, >        verbose_name="the bar memberships held by

Re: probleme with delete on cascade with foreign key self-referencing

2010-03-29 Thread Nuno Maltez
Hello, Are you sure you don't have a cyclic reference in there: cat1 -> cat2 -> cat1 ? You can always insert a import pdb; pdb.set_trace() line in the method and use the debugger to figure out what's keeping the loop from exiting normally. Nuno On Mon, Mar 29, 2010 at 2:55 PM, mouadino wrot

Re: raw sql

2010-03-29 Thread Nuno Maltez
>        self.fields['man'].queryset=Pupil.objects.filter(gender='M') >        self.fields['woman'].queryset=Pupil.objects.filter(gender='F') > > It returns only the man and woman for each combo box. Now, also, I only want > the User wich aren't Teacher. How can I do this? I've tried with Manager.r

Re: Passing hidden foreign key to form as initial value

2010-04-01 Thread Nuno Maltez
What about: class CourseBook(ModelForm): course = ModelChoiceField(queryset=Course.objects.all(), widget=HiddenInput()) class Meta: model = CourseBooking and in your view: form = CourseBook(initial = {'course': course.pk}) Nuno On Wed, Mar 31, 2010 at 8:06 PM, phoebebright wrot

Re: Complex Django query - filtering, joining a many-to-many table

2010-04-01 Thread Nuno Maltez
How about just accessing the "through" models attributes using user__ : filters['user__question_published_date'] see http://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships Hht, Nuno On Thu, Apr 1, 2010 at 3:09 PM, Jim N wrote: > Hello Djanglers, > >

Re: Passing hidden foreign key to form as initial value

2010-04-01 Thread Nuno Maltez
I think the form I sent, with ModelChoiceField, will validate with the returned values without any further code. Or am I missing something obvious? On Thu, Apr 1, 2010 at 6:49 PM, phoebebright wrote: > That's one option, the problem is changing the course value returned > from the form into a co

Re: Noticed some strange behaviour of request.GET.get()

2010-04-07 Thread Nuno Maltez
The only difference I can see is that request.GET.get ('subdir') will return an unicode string, u"public_html", instead of a normal string, 'public_html'. If it works with the byte string, try changing the line to subdir_path = str(request.GET.get('subdir')) Nuno 2010/4/7 Alexey Vlasov : > H

Re: Inline for model causes problem during save

2010-04-08 Thread Nuno Maltez
If I understand correctly, you can't create a User without defining a SoldService at the same time? Can't reproduce this behaviour. Which version of Django are you using? Nuno 2010/4/7 onorua : > Hello colleagues, > > I have the models.py: > class User(models.Model): >    LastName = models.CharFi

Re: Inline for model causes problem during save

2010-04-09 Thread Nuno Maltez
On Thu, Apr 8, 2010 at 7:42 PM, onorua wrote: > I'm using 1.1.1 > On the development server on my laptop - it doesn't happen, on > production - happen every time. > How can I debug why this happen? I have no idea :-P Any other differences between the 2 environments? Database server? -- You rece

Re: Problem with RSS feed. (Long Post)

2010-04-09 Thread Nuno Maltez
> Exception Type: ImproperlyConfigured at /feeds/latest/ > Exception Value: Give your Entry class a get_absolute_url() method, or > define an item_link() method in your Feed class. Have you tried the obvious - do what the Exception tells you and add a "get_absolute_url" method to the model of the

Re: another many-to-many filtering question

2010-04-09 Thread Nuno Maltez
Hi, On Wed, Apr 7, 2010 at 9:35 PM, Jim N wrote: > I want to get Questions that a given User has not asked yet.  That > is,  Questions where there is no Asking record for a given User.  I > have the User's id. Well, you can use the exclude() method. In a ManyToMany, the "user" field is like a Us

Re: Send file over HTTP

2010-04-15 Thread Nuno Maltez
http://stackoverflow.com/questions/68477/send-file-using-post-from-a-python-script although this is not really a django issue... On Tue, Apr 13, 2010 at 8:59 PM, Rafael Nunes wrote: > How can I send a file over HTTP? -- You received this message because you are subscribed to the Google Groups

Re: ChoiceField invalid literal for int() with base 10: ''

2010-04-15 Thread Nuno Maltez
Hi, I think the problem is tyhat you're using the wrong type of field in your form. A ChoiceField, like the documentations says [1], returns '' for an empty value, i.e. when you do not select an option. Trying to save an empty string into ans INT field in the database will throw the error you see

Mysql + Unicode + username curiosity

2011-11-14 Thread Nuno Maltez
So, I just ran into a funny issue. I'm using Django + Mysql and when retrieving users (Auth.user) form the database, the username field comes as a bytestring while everything else seems to come as unicode strings: >>> from django.contrib.auth.models import User >>> a=User.objects.get(id=1) >>> a.u

ANN: Two-Step Authentication with Django

2012-01-23 Thread Nuno Maltez
django-twostepauth is a Django application that allows user authentication with two steps for additional security. The first step with username and password and the second step with a one-time code such as the codes generated by soft token devices like Google Authenticator. Features: * Authe