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
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
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
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.
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,
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
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
> 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
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
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
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
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
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.
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
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
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
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
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
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
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
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
> 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
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
>
>
>
>
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
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
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
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
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
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
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
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
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
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
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,
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
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
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
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
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
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
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
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
> 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
> def clean_username(self):
> data = self.cleaned_data['username']
> try:
> User.objects.get(username=data)
> except User.DoesNotExist:
> return
> raise forms.ValidationError('The userna
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
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
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
>
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
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
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
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
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
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
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
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
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
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
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
>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
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
> 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
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
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,
>
>
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
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
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
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
> 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
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
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
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
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
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
73 matches
Mail list logo