Re: Send e-mail with large files from form attached

2010-03-19 Thread tezro
Oh. I get it, sorry. Any suggestions on my next question about file.read() would be thankful. On Mar 19, 5:20 pm, Paulo Almeida wrote: > Hi, > > My suggestion to zip the files was to provide a single download link with > all the files. > > - Paulo > > On Fri, Mar 19

Re: Send e-mail with large files from form attached

2010-03-19 Thread tezro
admin > > - Paulo > > On Wed, Mar 17, 2010 at 8:57 AM, tezro wrote: > > Hello everyone. I need some help or advice. > > > I've got a form with 20 ImageFields - such a form for sending photos > > to the site admin as a request for a new user. Well, Django cert

Re: Send e-mail with large files from form attached

2010-03-19 Thread tezro
Hi. All that you say is totally clear to me, but I tried to suit the customer's needs. And, yes, I finished my deals on just saving the images serverside and sending links to files over e-mail. Thanks for that. Another question that bothers me is the following. ---

Send e-mail with large files from form attached

2010-03-17 Thread tezro
Hello everyone. I need some help or advice. I've got a form with 20 ImageFields - such a form for sending photos to the site admin as a request for a new user. Well, Django certainly handles and uploads the, that's OK. But when it comes to sending all the files as an attachment - I got stuck. Her

Re: Humble-structure sites on Django // Suggestion needed

2009-12-20 Thread tezro
o have a good idea of what you > want. > > On Dec 17, 6:42 am, tezro wrote: > > > Hello everyone. Making well-structured websites on Django is a very > > comprehensive process. All these blogs, news, user-related stuff - > > easy. But what about, say, corporate webs

Humble-structure sites on Django // Suggestion needed

2009-12-17 Thread tezro
Hello everyone. Making well-structured websites on Django is a very comprehensive process. All these blogs, news, user-related stuff - easy. But what about, say, corporate website? I mean I got a project to do, thought it would be great to base it on Django as usual, but... Look at the structure,

Re: Error creating and saving a Django-object from the other script

2009-12-12 Thread tezro
shell or admin site - works still fine... On Dec 12, 5:56 pm, Shawn Milochik wrote: > On Dec 12, 2009, at 8:08 AM, tezro wrote: > > > Nope. Did it again on a clean project with the same models migrated > > then by South. > > > Same error. Any other clues? > > > Tha

Re: Error creating and saving a Django-object from the other script

2009-12-12 Thread tezro
Nope. Did it again on a clean project with the same models migrated then by South. Same error. Any other clues? Thanks for replies. On Dec 12, 3:25 am, Shawn Milochik wrote: > Why did you manually add a 'slug' field to your database after modifying the > model? Django's syncdb does a lot more

Re: Error creating and saving a Django-object from the other script

2009-12-12 Thread tezro
Oops, sorry. Didn't remove the index. Now it worked. Proceeding :) On Dec 12, 3:51 pm, tezro wrote: > Added a migration with South... Ran it. > > --- > Running migrations for news: >  - Migrating forwards to 0002_add_slug. >  > news: 0002_add_slug > Traceback (mos

Re: Error creating and saving a Django-object from the other script

2009-12-12 Thread tezro
Added a migration with South... Ran it. --- Running migrations for news: - Migrating forwards to 0002_add_slug. > news: 0002_add_slug Traceback (most recent call last): File "/home/tezro/lib/python2.5/South-0.6.2-py2.5.egg/south/ migration.py", line 330, in r

Re: Error creating and saving a Django-object from the other script

2009-12-11 Thread tezro
x27;slug' doesn't have a default value" - fixing that from model or base doesn't help either. But... the code works from the shell fine. That's all. On Dec 12, 12:58 am, Shawn Milochik wrote: > On Dec 11, 2009, at 4:51 PM, tezro wrote: > > > > > Seems li

Re: Error creating and saving a Django-object from the other script

2009-12-11 Thread tezro
Seems like no clues... On Dec 10, 12:21 am, bruno desthuilliers wrote: > On 9 déc, 18:58, tezro wrote: > (snip) > > > > > That throws an error: TypeError: 'slug' is an invalid keyword argument > > for this function. > > > What am I doing wrong? &

django-tagging - how to get current page number in a template

2009-12-10 Thread tezro
Firstly, we have simple template. --- {% load pagination_tags %} {% block first_column %} {% autopaginate object_list %} {% paginate %} {% endblock %} --- Suppose, we have "second_column", so how do I get the current page number, number of all pages paginated, or even next/previous

Re: Error creating and saving a Django-object from the other script

2009-12-09 Thread tezro
alid keyword argument for this function --- On Dec 10, 12:21 am, bruno desthuilliers wrote: > On 9 déc, 18:58, tezro wrote: > (snip) > > > > > That throws an error: TypeError: 'slug' is an invalid keyword argument > > for this function. > > > What a

Error creating and saving a Django-object from the other script

2009-12-09 Thread tezro
Hi everyone. I'm using Django 1.1.0, importing it and using in another file "robot_parser.py". I've been using it for months. The script aggregates news from different sources and saves them using Django ORM. Presently I used primary key for urls (http://www.site.com/ news/2009/jan/12/72828/), but

Re: "django-pagination" and generic.views.date_based.archive_index()

2009-10-21 Thread tezro
y as (1) > 3. use list_detail.object_list > Since 1-2 are dirty, I would recommend 3rd way. I'll let you know if I could > suggest something else :) > > 2009/10/19 tezro > > > > > > > Surely I could use the list_detail.object_list, but the use of date > > based g

Re: "django-pagination" and generic.views.date_based.archive_index()

2009-10-19 Thread tezro
view. > Why don't you use list_detail.object_list view? If you need just to order > list by date, you can use ordering on the model > level:http://docs.djangoproject.com/en/dev/ref/models/options/#ordering > > 2009/10/18 tezro > > > > > > > Would it? If &q

Re: "django-pagination" and generic.views.date_based.archive_index()

2009-10-18 Thread tezro
nyways, thanks for reply :) On Oct 18, 11:04 pm, Mihail Lukin wrote: > Look at date_based.py: > >     if date_list and num_latest: >         latest = queryset.order_by('-'+date_field)[:num_latest] >     else: >         latest = None > > So, if you use num_late

Re: "django-pagination" and generic.views.date_based.archive_index()

2009-08-30 Thread tezro
Anyone? On Aug 14, 8:29 am, tezro wrote: > The question is that "django.views.generic.date_based.archive_index()" > takes an optional argument "num_latest" which is 15 by default. > Setting it manually to num_latest=10 is way off to correct to > me.

"django-pagination" and generic.views.date_based.archive_index()

2009-08-13 Thread tezro
The question is that "django.views.generic.date_based.archive_index()" takes an optional argument "num_latest" which is 15 by default. Setting it manually to num_latest=10 is way off to correct to me. It works. I suppose that it even doesn't retrieve all the tons of data from the DB, but w