Re: django and eclipse

2010-12-29 Thread Emmanuel Mayssat
For the sqlite.db file issue, I changed the settings.py with: import os PROJECT_DIR = os.path.dirname(__file__) ... DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = os.path.join(PROJECT_DIR, 'sqlite.db') that now works as expected. -- Emmanuel Mayssat On Wed, Dec 29, 2010 at 4:38 PM, Emmanuel

django and eclipse

2010-12-29 Thread Emmanuel Mayssat
to point to the right location, but runserver doesn't get that. So what is this db file path used for ? (settings.py is created but not even configured...) -- Emmanuel Mayssat -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Splitting the models.py file

2010-12-29 Thread Emmanuel Mayssat
I attempted to split the model file into a 'module' (subdir with __init__.py). But for some reason syncdb doesn't see my app anymore. Did anyone of you manage to split the models.py file into several smaller ones? -- E -- You received this message because you are subscribed to the Google Groups

Re: database migration

2010-12-29 Thread Emmanuel Mayssat
gt; >> On 28/12/10 Emmanuel Mayssat said: >> >>> I have a classic database dump question >>> >>> I would like to migrate from sqlite to mysql. >>> How can I dump and import the data? >> >> See the manage.py dumpdata/loaddata

Re: admin interface does NOT show

2010-12-28 Thread Emmanuel Mayssat
ALMOST CORRRECT : WITHOUT THE QUOTES ! (r'^admin/', include('admin.site.urls')), --> (r'^admin/', include(admin.site.urls)), I was trying too hard! -- E On Tue, Dec 28, 2010 at 4:32 PM, Emmanuel Mayssat <emays...@gmail.com> wrote: > Hello, > > I followed http://docs.dj

admin interface does NOT show

2010-12-28 Thread Emmanuel Mayssat
Hello, I followed http://docs.djangoproject.com/en/dev/intro/tutorial02/ and attempted to enable the django admin interface, but it does not show. Actually it returns an error, Django version 1.1.1, using settings 'komunity.settings' Development server is running at http://127.0.0.1:8080/ Quit

database migration

2010-12-28 Thread Emmanuel Mayssat
I have a classic database dump question I would like to migrate from sqlite to mysql. How can I dump and import the data? Regards, -- E -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: automatic addition of several ForeignKeys to model

2010-12-27 Thread Emmanuel Mayssat
yes and no ;-) I am not sure I understand clearly, but I believe you want to have let's say 2 word1 links in word2 For that you need yo use the related_name as otherwise in word1, django tries to create 2 word2 fields (which result in an error) 149 class Mentorship(models.Model): 154 mentee =

Re: loading the external css file

2010-12-27 Thread Emmanuel Mayssat
You template should all inherit from (aka extend) a base template. So include the html code for the ccs in the base template... -- Emmanuel Mayssat On Mon, Dec 27, 2010 at 6:07 AM, Chris Lawlor <lawlor.ch...@gmail.com> wrote: > Django doesn't server static files (like your CSS file) b

Re: modelform with many_to_many key with textinput widget

2010-12-27 Thread Emmanuel Mayssat
tom textinput widget On Sun, Dec 26, 2010 at 1:20 PM, Emmanuel Mayssat <emays...@gmail.com> wrote: > On Sun, Dec 26, 2010 at 1:15 PM, Emmanuel Mayssat <emays...@gmail.com> wrote: >> Hello, >> >> I have a modelform with a model which include a models.many_to_man

Re: inline-model-formset help

2010-12-27 Thread Emmanuel Mayssat
I don't think you want a form set, but rather a modelform. Look at the top (not the bottom!) of the page http://docs.djangoproject.com/en/dev/topics/forms/modelforms/ On Mon, Dec 27, 2010 at 12:06 AM, Burhan wrote: > Thanks, but I'm not sure which models to pass to it,

Re: inline-model-formset help

2010-12-26 Thread Emmanuel Mayssat
Look at modelforms with instance... http://docs.djangoproject.com/en/dev/topics/forms/modelforms/ -- Emmanuel Mayssat On Sun, Dec 26, 2010 at 8:48 PM, Burhan <burhan.kha...@gmail.com> wrote: > I forgot to add that this is the model that defines the relationship between > a merchant a

Re: Foreign key Real world use case Q

2010-12-26 Thread Emmanuel Mayssat
! mymenu = Menu() item=Item(desc="sdfsdf", menu=mymenu) or item.menu = mymenu Good luck, -- Emmanuel Mayssat On Sun, Dec 26, 2010 at 4:05 PM, rahul jain <jainwolver...@gmail.com> wrote: > Foriegn Key Use case > > Class Item(): >      desc = models.StringFrield() &g

Re: modelform with many_to_many key with textinput widget

2010-12-26 Thread Emmanuel Mayssat
On Sun, Dec 26, 2010 at 1:15 PM, Emmanuel Mayssat <emays...@gmail.com> wrote: > Hello, > > I have a modelform with a model which include a models.many_to_many field. > By default the modelform represents those m2m entries with a > multiplechoice field > > http://do

modelform with many_to_many key with textinput widget

2010-12-26 Thread Emmanuel Mayssat
with following def save(self,commit=True): ''' Overwrite the default model save ''' self.__assignment = super(AssignmentEditForm,self).save(commit=False) self.__assignment.save() self.save_m2m() Is there a better way to do that? -- Emmanuel Mayssat -- You received