Re: OneToOne? Inheritance? Another solution for nested model relationships?

2014-05-30 Thread Leonardo Giordani
a Student or a Staff role. Does this fit better? Let me know Regards, Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page <https://github.com/lgiordani> - My Coderwall pr

Re: Django get queryset year month day

2014-05-28 Thread Leonardo Giordani
list you may use values()<https://docs.djangoproject.com/en/1.2/ref/models/querysets/#values>or values_list()<https://docs.djangoproject.com/en/1.2/ref/models/querysets/#values-list> . Let me know if this answers your question. Regards, Leo Leonardo Giordani Author of The Digit

Re: OneToOne? Inheritance? Another solution for nested model relationships?

2014-05-28 Thread Leonardo Giordani
As always with inheritance, I suggest to think twice before implementing it, but in this case I'd say that it fits perfectly. Regards, Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani>

Re: Digging Up Django Class-based Views

2014-02-17 Thread Leonardo Giordani
You are welcome! I'm glad to know that it was useful. I hope to post soon some tips with real world examples. Cheers, Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<htt

Digging Up Django Class-based Views

2014-02-14 Thread Leonardo Giordani
Hi all, the third issue of the small series "Digging Up Django Class-based Views" is out. This latest post is about form views. You find the whole series here http://lgiordani.github.io/blog/categories/django/ I hope you will find it interesting and useful. Cheers, Leo Leonard

Re: Filtering by month doesn't work

2013-11-26 Thread Leonardo Giordani
tps://docs.djangoproject.com/en/dev/ref/models/querysets/#year>does things this way. I see that you succeded in filtering with filter(end_start='2013') perhaps end__startswith? In that case you are treating it as a string. May you please check this and let me know? Cheers, Leo Leonardo Giordani

Re: Filtering by month doesn't work

2013-11-25 Thread Leonardo Giordani
May you please post your Event model? Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<https://github.com/lgiordani>- My Coderwall profile <https://coderwall.com/lgiordani&

Re: order_by result of sum of fields computed from an annotate

2013-11-19 Thread Leonardo Giordani
ce of averages is the average of the differences (in this case, since the number of object is the same for the first and the second average), so you can store in your object the difference between published and insertion date, overriding the save() method. Then you annotate and filter on

Re: votes/score

2013-11-18 Thread Leonardo Giordani
Érico, it is not really clear to me what you are trying to accomplish. That HTML in MYVALUES is a try to show that line in the dropdown? And why is "{{form|safe}}" there? May you please decribe what you would like to obtain? Cheers, Leo Leonardo Giordani Author of The Digital

Re: order_by result of sum of fields computed from an annotate

2013-11-18 Thread Leonardo Giordani
May you please post the code of Book and Author models? Thanks Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<https://github.com/lgiordani>- My Coderwall profile <

Re: Error while deploying django with mod wsgi

2013-11-18 Thread Leonardo Giordani
kage? Let me know, cheers Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<https://github.com/lgiordani>- My Coderwall profile <https://coderwall.com/lgiordani&

Re: TypeError: can't subtract offset-naive and offset-aware datetimes

2013-11-04 Thread Leonardo Giordani
Take a look at https://docs.djangoproject.com/en/dev/topics/i18n/timezones/#naive-and-aware-datetime-objects Basically you need to fix datetime objects adding a timezone. Regards, Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me

Re:

2013-11-04 Thread Leonardo Giordani
entries with the same number it is clearly not a primary key, so probably you are filtering on the wrong column. Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<https://githu

Re: Digging up Django class-based views - 1

2013-10-29 Thread Leonardo Giordani
Thank you! I am going to correct it asap. Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<https://github.com/lgiordani>- My Coderwall profile <https://coderwall.com/lgiord

Re: formating

2013-10-28 Thread Leonardo Giordani
What is foundation? You said that {{form.valor_ultimacompra}} works. What about {{form.valor_ultimacompra|foundation}} ? Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<htt

Re: formating

2013-10-28 Thread Leonardo Giordani
Can you please paste the code with a good formatting? To pastebin or similar? I'd like to see model, view and template. Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<htt

Digging up Django class-based views - 1

2013-10-28 Thread Leonardo Giordani
Hi all, I want to share with you a post about class-based views. Hope you find it useful. http://lgiordani.github.io/blog/2013/10/28/digging-up-django-class-based-views-1/ Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http:/

Re: formating

2013-10-28 Thread Leonardo Giordani
I think that the extra space between "floatformat:" and "2" is confusing the template system. Try using "floatformat:2" without spaces. Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/le

Re: variable in django template

2013-10-23 Thread Leonardo Giordani
Indeed this is a good solution. Just a typo correction, use "%" instead of "@". Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<https://github.com/lgio

Re: variable in django template

2013-10-23 Thread Leonardo Giordani
can better clarify what you want to accomplish, I can perhaps be more specific. Regards, Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<https://github.com/lgiordani>- My

Re: Customizing your project's templates

2013-10-21 Thread Leonardo Giordani
orward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. ) Remember that settings.py is a Python module, so you can use any valid Python code. Let me know if you succeed. Cheers, Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com&

Re: set-up and usage of mysql in django

2013-10-21 Thread Leonardo Giordani
, Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<https://github.com/lgiordani>- My Coderwall profile <https://coderwall.com/lgiordani> 2013/10/21 Mahantesh U <mahant.

Re: How to handle values_list?

2013-10-18 Thread Leonardo Giordani
or multiple? If you need to pass a list to the template just fill the dictionary accordingly, but follow Daniel's advice when rendering the list in the template. Regards, Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http:/

Re: def altword_list(self, request, word_id):

2013-10-16 Thread Leonardo Giordani
of objects, however, I suggest you to try and use a ListView, where you can define your queryset, as you tried to do with the get_queryset() method. Try and let me know if something starts to work. Feel free to ask further if the matter is not clear. Cheers, Leo Leonardo Giordani Author

Re: AttributeError: 'module' object has no attribute '_handlerList'

2013-10-15 Thread Leonardo Giordani
g >>> print logging.__file__ This should hopefully show us what logging is working behind the scenes. Try and post the results Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHu

Re: def altword_list(self, request, word_id):

2013-10-15 Thread Leonardo Giordani
Can you check the code you posted? The get_query() function is empty so this code, as posted, can not run. Please post even the urls you are using to call the view. Cheers, Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http:/

Re: AttributeError: 'module' object has no attribute '_handlerList'

2013-10-15 Thread Leonardo Giordani
Ok, can you please try to traceback the command and post the results? python django-admin.py startproject hello --traceback Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<htt

Re: AttributeError: 'module' object has no attribute '_handlerList'

2013-10-14 Thread Leonardo Giordani
Please give me the information I asked you, otherwise I cannot figure out what kind of problem you have. Are you using a virtualenv? In that case, can you post the list of packages you installed? If not, can you give details about the OS you are working on? Leonardo Giordani Author

Re: AttributeError: 'module' object has no attribute '_handlerList'

2013-10-14 Thread Leonardo Giordani
Hi, are you using a virtualenv? In that case, can you post the list of packages you installed? If not, can you give details about the OS you are working on, Django version, and so on? Regards, Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on Ab

Re: View for creating, listing, and deleting

2013-10-14 Thread Leonardo Giordani
ter, I'd create a Factory, i.e. a class that returns a class. You can then loop over your models and call the Factory, generating urls on-th-fly. Does this make sense for you? Let me know Cheers, Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About

Re: Django query from database

2013-10-11 Thread Leonardo Giordani
e to check if the template attribute retrieving syntax also performs getattr. if this does not work you have to store tuples as values of the users dict, instead of fields, each tuple being (field, getattr(user, field)). Try to give a sense to all this stuff and let me know! Cheers, Leo Leonardo Giord

Re: Django query from database

2013-10-11 Thread Leonardo Giordani
problem. Cheers Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<https://github.com/lgiordani>- My Coderwall profile <https://coderwall.com/lgiordani> 2013/10/1

Re: Django query from database

2013-10-11 Thread Leonardo Giordani
suggest you to keep it simple and readable. If you need to have each element in B appear just one time (uniqueness) just perform a B = set(B) at the end. Let me know if it works. =) Cheers Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me

Re: Query field with reference

2013-10-08 Thread Leonardo Giordani
I do not know MongoDB, so sorry if I get it wrong. I'd say that you have to write *result = [a.get_json() for a in Player.objects.filter(position__position_name='DD')] * since in your attached document you set it this way (line 53). Try and let me know Leo Leonardo Giordani Author

Re: logic problem

2013-10-07 Thread Leonardo Giordani
Are you sure that your DB contains only one entry with that name? Try printing it in the view you use to render that template and check the output of the development server. Cheers, Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me

Re: Custom Filter: Filter output based on a Python list

2013-10-05 Thread Leonardo Giordani
[...] >> >> This can also be written (and is perfectly correct): >> >> *VIEW* >> def someview(request): >> my_list_of_objects = *[exam.label for exam in*Exam.objects.filter(label=' >> **somelabel')*]* >> context = {'object':my_list_of_

Re: Custom Filter: Filter output based on a Python list

2013-10-04 Thread Leonardo Giordani
objects %} {{obj}} {% endfor %} [...] (Please note that in the second example I left the previous nomenclature for clarity's sake - in a real case I'd call the values 'labels' and not 'objects') Hope this helps you. Regards, Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.g

Re: uptodate Account_balance

2013-10-03 Thread Leonardo Giordani
think you are implementing some views or at least using them in some code. Can you give some details about the procedure you are implementing and the exact issue tou are facing? Cheers, Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me

Re: model inheritance

2013-10-02 Thread Leonardo Giordani
Are you sure your DB has been synced after putting the ForeignKey(News) in your Department model? Can you post somewhere the following models: News, OldNews, Department? Regards, Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me

Re: Custom Filter: Filter output based on a Python list

2013-10-02 Thread Leonardo Giordani
2011' irrespective of the input value. Please check the above code, I wrote it directly in the mail composer, so bugs are certainly lurking. Let me know if you succeed in solving the problem Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on Ab

Re: Custom Filter: Filter output based on a Python list

2013-10-02 Thread Leonardo Giordani
Can you perhaps paste the view you are using to render the template? So I can try and help your with some code Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<https://github.com

Re: Custom Filter: Filter output based on a Python list

2013-10-02 Thread Leonardo Giordani
I'd cycle in the template through a list of exam periods, printing a table for each cycle. You have to pass the list of exam periods in the context of your view. Try and let me know. Regards, Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on Ab

Re: Django-cart. How to run method add_to_cart?

2013-10-02 Thread Leonardo Giordani
/en.wikipedia.org/wiki/Hypertext_Transfer_Protocol https://docs.djangoproject.com/en/dev/ref/forms/api/ Feel free to ask more if you need help. Cheers, Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.g

Re: Django-cart. How to run method add_to_cart?

2013-10-01 Thread Leonardo Giordani
code and see if it works. As for the django_cart: when you modify the DB always use POST views and not GET, then you are right, you have to return a template rendering in your add_to_cart() view. Let me know if it comes to life =) Cheers, Leo Leonardo Giordani Author of The Digital Cat <h

Re: Django-cart. How to run method add_to_cart?

2013-10-01 Thread Leonardo Giordani
You have to implement an URL dispatcher that links an URL to your view. Read here <https://docs.djangoproject.com/en/dev/topics/http/urls/> and feel free to ask again if something is still not clear. Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile

Re: Django South - SyntaxError: invalid syntax (, line 1)

2013-10-01 Thread Leonardo Giordani
Can you use the models.py file with the user field on a bare DB? I mean: if you start from scratch with an empty DB everything works correctly? You can create Carriers from the Django shell? Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me

Re: Need help figuring out why my { key:value } doesn't seem to be passed to my view by my javascript file.

2013-09-19 Thread Leonardo Giordani
I see now that you are not passing the CSRF token, are you? https://docs.djangoproject.com/en/dev/ref/contrib/csrf/ Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<https://githu

Re: migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-19 Thread Leonardo Giordani
with the core apps * syncdb * inspectdb * schemamigration --auto * migrate I strongly feel that your problem has to do with Django processing your models BEFORE doing the base stuff. Can you try this? Regards Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My p

Re: Exception Error

2013-09-19 Thread Leonardo Giordani
You are using self.loan_amount, which is an attribute, as a function: self.load_amount(). I suspect there is a missing sign (+-*/) between self.loan_amount and the following ( May you confirm this? Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My p

Re: Exception Error

2013-09-19 Thread Leonardo Giordani
Ok, can you report the content of /home/maurice/Desktop/django/Servant/Dashboard/models.py around line 264? Your error is there. Simply paste the output of "nl models.py | grep 264 -C 20" Regards PS: Rember to reply to the list =) Leonardo Giordani Author of The Digital

Re: while loop in django

2013-09-19 Thread Leonardo Giordani
our issue, so that we can come up with a solution. Regards, Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<https://github.com/lgiordani>- My Coderwall profile <https

Re: Need help figuring out why my { key:value } doesn't seem to be passed to my view by my javascript file.

2013-09-19 Thread Leonardo Giordani
gards Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<https://github.com/lgiordani>- My Coderwall profile <https://coderwall.com/lgiordani> 2013/9/18 <7equivale...@gm

Re: migrating from django 1.3.0 to 1.5.4, getting ImproperlyConfigured exceptions (AUTH_USER_MODEL refers to model 'auth.User' that has not been installed)

2013-09-19 Thread Leonardo Giordani
your application's user model in the settings.py file. Let me know if I correctly understood your issue. Regards Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<https://github.com

Re: while loop in django

2013-09-19 Thread Leonardo Giordani
Can you perhaps better describe what you are trying to do? Do you need it in a view or in a template? Regards Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<https://github.com

Re: Need help figuring out why my { key:value } doesn't seem to be passed to my view by my javascript file.

2013-09-18 Thread Leonardo Giordani
value". May you perhaps check the devel server output? Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<https://github.com/lgiordani>- My Coderwall profile <https://coderw

Re: Exception Value: 'Decimal' object is not callable dont no where this is coming from, Any help will be kindly appreciated

2013-09-18 Thread Leonardo Giordani
Hi Maurice, where do you get this exception? Do you have a Django debug page as output? Are you calling a view? Can you paste its code? Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHu

Re: Django project and SVN loads older code versions

2012-09-25 Thread Leonardo Giordani
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. > -- Leonardo Giordani -- You received this message because you are subscribed to the Google Groups "Dja

Admin custom widget and add new button

2012-08-08 Thread Leonardo Giordani
Hi all, I'm trying to enhance a form in the admin site for a given model (Django 1.3). The relevant part of the model is the following class Project(models.Model): [...] icon = models.ForeignKey(Icon, null=True) [...] and the admin is a simple call to admin.site.register(). This way I get

Upload file and primary key - double save

2012-05-02 Thread Leonardo Giordani
Hi all, I'm developing a site where the object Project is referenced by zero or more objects Image, say basically CODE class Projects(models.Model): pass class Image(models.Model): project = models.ForeignKey(Project)

Re: Installation steps for Ubuntu 11.10 users

2012-02-20 Thread Leonardo Giordani
Can you detail your problems? I installed it on a 11.10 some time ago and perhaps I can help you 2012/2/20 jigbox > The installation guide has instructions for Ubuntu 10.10 and below > users. > However, there is no help for Ubuntu 11.10 users. since I am facing > some

Re: CSS reference to Media folder

2012-02-16 Thread Leonardo Giordani
I think it is better for you to keep CSS images in /static folder too. /media is better suited as a folder to host user-loaded content. If you keep CSS and images in /static you can just refer to them with a relative path. I think that probably (but I'm not sure) CSS can only address relative

Re: Help in adding jQuery to my pages

2011-10-28 Thread Leonardo Giordani
if I'm not understanding you, but regarding 2 and 3, if jQuery > isn't being loaded, shouldn't you be getting a 404 error for the > jquery-1.6.4.js file? > > > Cheers, > AT > > On Fri, Oct 28, 2011 at 11:30 AM, Leonardo Giordani > <giordani.leona...@gmail.com> wro

Re: Help in adding jQuery to my pages

2011-10-28 Thread Leonardo Giordani
ete...@gmail.com>: > I'm sorry if I'm not understanding you, but regarding 2 and 3, if jQuery > isn't being loaded, shouldn't you be getting a 404 error for the > jquery-1.6.4.js file? > > > Cheers, > AT > > On Fri, Oct 28, 2011 at 11:30 AM, Leonardo Giordani > <giord

Re: Help in adding jQuery to my pages

2011-10-28 Thread Leonardo Giordani
]. Good luck! > > > Cheers, > AT > > [1] > https://docs.djangoproject.com/en/dev/howto/static-files/#with-a-template-tag > [2] http://code.google.com/apis/libraries/devguide.html#jquery > > On Fri, Oct 28, 2011 at 11:05 AM, Leonardo Giordani > <giordani.leona...@gmail.com>

Help in adding jQuery to my pages

2011-10-28 Thread Leonardo Giordani
Hi all, I'm trying to add a bit of jQuery to a page in a Django site. It seems that my jQuery scripts are simply not loaded, while JS scripts work perfectly. Evan Firebug does not see the jQuery file as loaded. This is what I do in base.html                            {% block javascript %}{%

Re: create object instance with ManyToManyField

2011-10-28 Thread Leonardo Giordani
The add() method of a ManyToMany field adds the indexes of the given objects to the field. If you add a list, each index in the list is added to the field. In the admin interface, when you edit a Company object, you see a convenient automagically-created menu which lists all Index object in your

Re: Database management commands

2011-10-28 Thread Leonardo Giordani
You are right, thanks. 2011/10/28 Russell Keith-Magee <russ...@keith-magee.com>: > On Fri, Oct 28, 2011 at 12:49 AM, Leonardo Giordani > <giordani.leona...@gmail.com> wrote: >> This is a problem related to Innodb and MyISAM. Django uses this >> latter, > > Inco

Re: Database management commands

2011-10-27 Thread Leonardo Giordani
This is a problem related to Innodb and MyISAM. Django uses this latter, while probably your imported DB is an Innodb one. Check here https://docs.djangoproject.com/en/dev/ref/databases/ Search Google for the matter too, you are not the only one experiencing it. I would suggest getting rid of the

Re: create object instance with ManyToManyField

2011-10-27 Thread Leonardo Giordani
Hi Jaroslav, you have to do the following n = Company(name=my_name, country=my_country, isin=my_isin) n.save() n.indices.add(my_indices) See here https://docs.djangoproject.com/en/dev/topics/db/queries/#saving-foreignkey-and-manytomanyfield-fields Bye 2011/10/27 Jaroslav Dobrek

Radio button with nested widget

2011-10-20 Thread Leonardo Giordani
Hi all, I'm trying to implement the following form: a first ChoiceField with values "mode 1", "mode 2" or "manual". Depending on its value I need to show a FileUpload field (mode1 or mode2) or some CharFields (mode3). I'm trying to mimic a desktop GUI, where you can three radio button and each

Re: Forms with FileField - access file content

2011-10-20 Thread Leonardo Giordani
Yes you are right, I was not thinking about security. :) Thanks 2011/10/20 Tom Evans <tevans...@googlemail.com> > On Thu, Oct 20, 2011 at 10:49 AM, Leonardo Giordani > <giordani.leona...@gmail.com> wrote: > > No, I think I didn't correctly explain the matter; sa

Re: Forms with FileField - access file content

2011-10-20 Thread Leonardo Giordani
. Submit the form So I need to "modify" the view attaching fields which content comes from what the user uploads. 2011/10/20 Venkatraman S <venka...@gmail.com> > > On Thu, Oct 20, 2011 at 1:32 PM, Leonardo Giordani < > giordani.leona...@gmail.com> wrote:

Forms with FileField - access file content

2011-10-20 Thread Leonardo Giordani
Hi all, I'm trying to implement a an application where the user creates a new object through a form. Up to here I'm fine. This time though the object creation involves loading a file and choosing some data from it (say choosing some lines, for examples). So I'm a little stuck here. How can I

Re: Testing: create db from scratch not working

2011-09-22 Thread Leonardo Giordani
() and everything works. Leo 2011/9/22 Leonardo Giordani <giordani.leona...@gmail.com>: > This is very strange for me: even flatpages depends on Site > > /usr/local/lib/python2.6/dist-packages/django/contrib/flatpages/models.py:from > django.contrib.sites.models import Site > >

Re: Testing: create db from scratch not working

2011-09-22 Thread Leonardo Giordani
on Site the same way manouche/models.py:from django.contrib.sites.models import Site but I cannot syncdb it with other applications. No one can help? 2011/9/22 Leonardo Giordani <giordani.leona...@gmail.com>: > Sure my application depends on the site app, I'm importing Site in my &g

Re: Testing: create db from scratch not working

2011-09-22 Thread Leonardo Giordani
e it depends on the site app being installed, but when django loads the > manouche.models file, it hasn't loaded sites yet. > -- > Sent from my Android phone with K-9 Mail. Please excuse my brevity. > > Leonardo Giordani <giordani.leona...@gmail.com> wrote: >> >> H

Testing: create db from scratch not working

2011-09-22 Thread Leonardo Giordani
Hi all, I developed a Django application (named "manouche") using south. Thus I have some migrations which build my database. I want to setup a testing environment where I want to begin with a clean db, create it with syncdb, migrate my application, load current fixtures and run tests. My

Re: Where is "base.html" that "templates/site_base.html" extends?

2011-09-09 Thread Leonardo Giordani
Hi Christos, if you put {% extends "somefile.html" %} in your template, Django expects to find it in one of the directories specified in your TEMPLATE_DIRS variable in settings.py. They are considered in the order they are written, so the base.html you are extending is the first you find in