databases

2023-12-01 Thread Karim Dahman
Hi, how can create python script in terminal to update the data from old databases into new databases automaticaly -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email

Re: How to override the ModelAdmin "change" form ?

2019-03-01 Thread karim . atiki
Hi Mike, I tried what you wrote by overriding the *self.change_form_template* but the form does not appear. Would you please provide me the content of your model admin *billing_payment_view ?* Thanks. Karim Le vendredi 1 mars 2019 00:06:40 UTC+1, Mike Dewhirst a écrit : > > On 28/02/

Re: How to override the ModelAdmin "change" form ?

2019-03-01 Thread karim . atiki
Hi Mike, Thanks a lot for your feedback. Your situation is quiet different from mine, BUT the way you override change_view and the related template will certainly help me to achieve what I need. ...and getting rid of dirty and unnecessary ajax calls. I keep you posted. Thx. Karim Le

How to override the ModelAdmin "change" form ?

2019-02-28 Thread karim . atiki
Hi, I'm currently struggling with a custom ModelAdmin. Considering the following model: # Bloc fonctionnel class Assembly(Item): product = models.ForeignKey(to='ProductFamily', on_delete=models.CASCADE , null=True, verbose_name=_('Famille Produit')) functions =

Re: Django and asynchronous tasks

2018-08-30 Thread Karim
On Thu, Nov 10, 2016 at 7:05 PM Alain Muls wrote: > Hi All > [...] > I found celery very hard to work with. I liked a lot ` https://django-q.readthedocs.io/`. Give it a go. -- Karim N. Gorjux -- You received this message because you are subscribed to the Google Groups "Djang

Mock external api call (xero)

2016-09-22 Thread Karim
er_invoice = fakeInvoice(**{'Amount':1000}) response.add(invoice, another_invoice) # response.json # return the json response as the XERO api with the two invoices. ​Thank you​ -- Karim N. Gorjux -- You received this message because you are subscribed to the Google Groups "Djan

Django-nose and errors on the admin

2016-08-20 Thread Karim
and I have exceptions on register and unregister model admins. We are using django 1.7.7 planning the update soon could be this the problem? The error I'm facing is the same issued on this article: https://www.peterbe.com/plog/cryptic-errors-when-using-django-nose Any idea? -- Karim N. Gorjux -- Yo

Django admin, InLineForm and many2many fields

2016-02-09 Thread Karim
also filter the location based on the active boolean field. Is possible to do that? Thanks -- Karim N. Gorjux -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, sen

Re: django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet when using django-role-permission package

2015-12-20 Thread karim bernardet
Using the branch "django19" fixed the problem. Sorry or the noise Karim Le dimanche 20 décembre 2015 00:06:38 UTC+1, karim bernardet a écrit : > > Hi > > I am a new user with Django. I am trying to use the django-role-permission > package but I have the error below :

django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet when using django-role-permission package

2015-12-19 Thread karim bernardet
Hi I am a new user with Django. I am trying to use the django-role-permission package but I have the error below : [karim@localhost gfmt]$ python ./manage.py check Traceback (most recent call last): File "./manage.py", line 10, in execute_from_command_line(sys.argv) File

Re: Implement a instant saving on edit form

2015-06-25 Thread Karim
On Thu, Jun 25, 2015 at 3:16 PM, Karim <lemieli...@gmail.com> wrote: > Hello everyone, I had to implement automatic saving on the various edit > forms on the webapp I'm working on. The purpose is (I guess) to avoid lost > of data if the user move from the edit page without savi

Re: can i use sqlite for big project?

2015-06-25 Thread Karim
On Thu, Jun 25, 2015 at 5:08 PM, Arindam sarkar <asarkar1...@gmail.com> wrote: > i need to develop a job portal . is there any problem if i use sqlite ? > coz i am having problem to setup mysql or postgresql . please help. ​sqlite was not created for big portal. Use postgresql​

Implement a instant saving on edit form

2015-06-25 Thread Karim
pp.. :D :D), I have to figure out how to do the same in JS (smartly as in python...) Do you have any suggestions? Thanks ​ Links: [1] https://developer.mozilla.org/en-US/docs/Web/Events/blur "if I have seen further, it is by standing on the shoulders of giants -- Isaac Newton"

Re: Suggiestion on how split a views.py file

2015-05-12 Thread Karim
app to refer to the new file with the code I moved into. At the moment, the only thing that can help is to have all the view tested to show an error in the import during the Test Harness. ​ ​Obviously I have not all my code cover by a test.​ -- Karim N. Gorjux -- You received this message

Suggiestion on how split a views.py file

2015-05-12 Thread Karim
Hello everyone! I have a huge views.py about 1200 lines. I would like to split it in different files moving some classes. Do you have any suggestion on how handle the import/dependencies in the project? Thanks -- Karim N. Gorjux -- You received this message because you are subscribed

Re: Form Wizard: store the session values

2015-02-25 Thread Karim
r get return super(ServiceCreationWizard, self).get(request, *args, **kwargs -- Karim N. Gorjux -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it,

Re: Delete the file related on the FileField

2015-02-25 Thread Karim
On Thu, Feb 26, 2015 at 2:13 AM, Rodrigo Zayit <rodr...@zayit.com.br> wrote: > Hi Karim, > ​[]​ > > Thank you! -- Karim N. Gorjux -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this gro

Re: Form Wizard: store the session values

2015-02-25 Thread Karim
On Wed, Feb 25, 2015 at 12:14 PM, Karim <lemieli...@gmail.com> wrote: > When I click on the link for my form, > ​[...] > -- Karim N. Gorjux -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group

Delete the file related on the FileField

2015-02-24 Thread Karim
I'm using a form that get an image and store it in the database. Doing my (manual) tests I discover that the deleting the FileField doesn't remove the associated file on the hard disk. Is there a design pattern to handle the remaining file? Thank you. -- Karim N. Gorjux -- You received

Re: Form Wizard: how to send instance_dict based on the request

2015-02-24 Thread Karim
On Fri, Feb 20, 2015 at 5:49 AM, Collin Anderson <cmawebs...@gmail.com> wrote: > You could instead just override get_form_instance(step). That way you'll > have access to self.request. > ​Thank you!​ -- Karim N. Gorjux -- You received this message because you are subscribe

Form Wizard: store the session values

2015-02-24 Thread Karim
form. Thank you. -- Karim N. Gorjux -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group,

Form wizard: how I can jump on a specific step?

2015-02-24 Thread Karim
you​ ​ ​[1] https://docs.djangoproject.com/en/1.7/ref/contrib/formtools/form-wizard/​ -- Karim N. Gorjux -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-user

Form Wizard: how to send instance_dict based on the request

2015-02-17 Thread Karim
think I could do that subclassing def __init__, but the instance_dict is a class attribute, how I can populate it? Thnak you -- Karim N. Gorjux -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Dropzone.js and images POST on new object

2015-02-10 Thread Karim
On Tue, Feb 10, 2015 at 7:25 PM, James Schneider <jrschneide...@gmail.com> wrote: > I wouldn't store binary data like an image in a session, especially if you > have a DB-backed session system. > > ​[] > > ​Thank you James.​ -- Karim N. Gorjux -- You received

Dropzone.js and images POST on new object

2015-02-09 Thread Karim
them in the sessions. Than when the user submit the form, the form object get the images from the session and save them in the new object. Could be a good design pattern? Thank you! -- Karim N. Gorjux -- You received this message because you are subscribed to the Google Groups "Django

Re: Select Field With Other option

2015-01-27 Thread Karim
with the Field() object? http://django-crispy-forms.readthedocs.org/en/latest/layouts.html#layout-objects-attributes ​ ​ -- Karim N. Gorjux -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and s

Best practice to render the view based on the user

2015-01-27 Thread Karim
is automatically fired. My doubts (at the moment): 1) Do you think is the a good way to face the problem? 2) I have methods in the models to know what person is logged. How I can automatically load the right function in the class based on the user? Thank you -- Karim N. Gorjux -- You received

Re: Help in Django-contact-form

2015-01-27 Thread Karim
com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/035e8b0b-e502-4ba5-b8e2-9923afa43909%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/035e8b0b-e502-4ba5-b8e2-9923afa43909%40googlegroups.com?utm_medium=ema

Modify a queryset and add computed value to the objects

2014-12-09 Thread Karim
ot;distance" to the objects in the QuerySet? Thank you! -- Karim N. Gorjux -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr.

Strange import error with GeoIP

2013-11-18 Thread Karim
can help me to solve this problem? Thanks in advance -- Karim Gorjux -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@google

Re: Form containing a Mutipolygon field for Django 1.3

2011-04-19 Thread GARRAM karim
with this instruction PolygonFormField=GeneratePolygon._meta.get_field('Polygon') it didn't found the GeneratePolygon object On Apr 18, 3:13 pm, GARRAM karim <garram.ka...@gmail.com> wrote: > I am using dream weaver so when I deleted the heading > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-st

Re: Form containing a Mutipolygon field for Django 1.3

2011-04-18 Thread GARRAM karim
I am using dream weaver so when I deleted the heading http://www.w3.org/1999/xhtml;> the problem of plotting the openlayer map was resolved Now my problem is still the mapping between the data to plot in the map and the multipolygon field, in my object definition On Apr 18, 1:12 pm, GARRAM ka

Form containing a Mutipolygon field for Django 1.3

2011-04-18 Thread GARRAM karim
I am working on a GeoDjango project. I have a model.py wich extend the user model and contains a MultiPolygonField class Membre(models.Model): user = models.ForeignKey(User, unique=True) #some other attributes mpoly = models.MultiPolygonField() objects = models.GeoManager()

Re: Create User from an User extension

2010-11-13 Thread Karim Gorjux
On Sat, Nov 13, 2010 at 00:08, Steve Holden wrote: > When you add a Persona the UserInline lets you enter a User record, but > the User has to be saved before the Persona. You could do this by > extending the Persona.save() method to save the User as well. Thanks a lot. I'll

Create User from an User extension

2010-11-12 Thread Karim Gorjux
Hi all, I successfully extended the User as described in the authorization documentation. Now I would like to use and edit the User and my class Persona not like two entity but just one. When I want to create a Persona, I have also to create a User first. Now the steps are too long, how I can

Create a simple Editor with image support

2010-11-08 Thread Karim Gorjux
Hi all, I would like to create a "improved" flatpage application adding a editor and the support of image files. My target is to edit a static web page load images and see a preview. I can add easily a editor like tinymce, I would try also FCKeditor, but what about the handle of images? Could you

Re: django-cms error: no module named simplesite.urls

2010-11-04 Thread Karim Gorjux
On Thu, Nov 4, 2010 at 19:35, Karim Gorjux <lemieli...@gmail.com> wrote: > Hi all, I'm just taking a look to the django-cms. I followed all the > instruction, but when I try to connect to the site I get this error my mistake. Was the settings.py wrong! :-| -- K. Blog Per

django-cms error: no module named simplesite.urls

2010-11-04 Thread Karim Gorjux
Hi all, I'm just taking a look to the django-cms. I followed all the instruction, but when I try to connect to the site I get this error - log - File "/home/karim/Projects/e_dcms/lib/python2.6/site-packages/django

Re: How create a simple "brochure" website in django?

2010-11-04 Thread Karim Gorjux
Now I'm trying django-cms, but I would like to find some really essential to study on. -- K. Blog Personale: http://www.karimblog.net -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: How create a simple "brochure" website in django?

2010-11-04 Thread Karim Gorjux
On Thu, Nov 4, 2010 at 18:26, James wrote: > Yes, there is. > > You should take a look at "Practical Django Projects" (be sure to get > the 2nd edition)  by James Bennett. In the book he creates a > simple-cms with a tinymce editor. > > He has the source code published here:

Re: How create a simple "brochure" website in django?

2010-11-04 Thread Karim Gorjux
On Thu, Nov 4, 2010 at 15:06, bruno desthuilliers wrote: > You may not realize that what you're describing here is a full blown > CMS, and as such is a tad more complex than simple thing like a blog > or wiki or dumbed-down twitter clone. I strongly suggest you try

How create a simple "brochure" website in django?

2010-11-04 Thread Karim Gorjux
Hi all! I'm a relative newbie in Django and I spending a lot of time study it in these days. I read many tutorials and books and I'm surprised to found very interesting resource to how create a wiki, a blog, app like twitter even a social bookmarking website but I never found a simple tutorial to

Re: Cherokee for home developing

2010-11-01 Thread Karim Gorjux
On Mon, Nov 1, 2010 at 21:21, Max Countryman <m...@me.com> wrote: > Karim, I would set it up using a UNIX socket. Then all you have to do is rm > the socket path. :) There is no need to kill uWSGI in that case. Let me study that, because there is always a newbie side in me that some

Re: Cherokee for home developing

2010-11-01 Thread Karim Gorjux
On Sun, Oct 31, 2010 at 01:27, Max Countryman wrote: > Yes, absolutely. :D Good luck! Max, I'm trying with uwsgi and Cherokee. Seems to work, but if I edit the code, I have to kill the uwsgi process to see the modification on the browser. Is that normal? -- K. Blog Personale:

Re: Add admin action to Django User

2010-11-01 Thread Karim Gorjux
Maybe you'll find this also useful: http://www.theotherblog.com/Articles/2009/06/02/extending-the-django-admin-interface/ -- K. Blog Personale: http://www.karimblog.net -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Add admin action to Django User

2010-11-01 Thread Karim Gorjux
On Mon, Nov 1, 2010 at 05:03, Django-learner wrote: > Hi, I want to add an customized action to user management in django > admin site. I can see that only delete selected user is available, how > can I add more to that? Did you try to google that? This is my **first**

Re: Cherokee for home developing

2010-10-30 Thread Karim Gorjux
guess so, but I had many problems to serve static files, and the :8000 port wasn't so cool so I tried to work with a production web server even for the developing. > Karim, you may find that refreshing your project is easier with uWSGI as > opposed to something > like FastCGI, in re

Re: Cherokee for home developing

2010-10-29 Thread Karim Gorjux
I have just one question. While I'm editing the source of the project, to see the result I have always to restart the server or there is another way? -- K. Blog Personale: http://www.karimblog.net -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Cherokee for home developing

2010-10-28 Thread Karim Gorjux
On Thu, Oct 28, 2010 at 21:06, Robbington wrote: > Glad to finally see some one using Cherokee with django. Dont just use > it in development, its actually less memory intensive than apache as > well as having an awesome admin interface. Now I can just develop on Django

Re: Cherokee for home developing

2010-10-28 Thread Karim Gorjux
On Thu, Oct 28, 2010 at 19:32, Karim Gorjux <lemieli...@gmail.com> wrote: > Hi all! I'm trying to create my devbox for Django and I use a server I fixed the problem with the settings.py and now admin works. The problem now is to avoid the flup's "Unhandled Exception" a

Cherokee for home developing

2010-10-28 Thread Karim Gorjux
Hi all! I'm trying to create my devbox for Django and I use a server in my lan with Ubuntu and Cherokee installed in. For every project I use virtualenv so I install django and flup and I create in cherokee panel the virtual server using the path of my virtualenv. All I do is explained in the

Re: With apache2 and mod_python I can't get static files loading in admin

2010-10-01 Thread Karim Gorjux
On Fri, Oct 1, 2010 at 15:17, Daniel Roseman wrote: > Either use > a DocumentRoot directive Thanks! I solved the problem using the directive. Thanks really a lot! :-) -- K. Blog Personale: http://www.karimblog.net -- You received this message because you are subscribed

Re: I don't understand the difference between these two views

2010-09-02 Thread Karim Gorjux
On Thu, Sep 2, 2010 at 17:46, Daniel Roseman <dan...@roseman.org.uk> wrote: > See here for an explanation: > http://docs.djangoproject.com/en/1.2/ref/templates/api/#subclassing-context-requestcontext > especially the "Note" box a screen or so down. Thanks! Now everything

I don't understand the difference between these two views

2010-09-02 Thread Karim Gorjux
o_response( 'coltrane/category_detail.html', { 'object_list': category.live_entry_set()} ) -- Karim Gojux www.karimblog.net -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to th

Re: How to create a gerarchical list in admin for flatpages?

2010-08-31 Thread Karim Gorjux
On Tue, Aug 31, 2010 at 14:11, Karim Gorjux <lemieli...@gmail.com> wrote: > I would like to > realize a easy admin page for my flat pages that in Django-CMS is > called "site map". I found what I need. Is here: http://code.google.com/p/django-mptt/ -- Karim Gojux w

Re: Overriding flatpages class meta

2010-08-31 Thread Karim Gorjux
Try to modify the flatpages source! You can find it directly in your django installation. -- Karim Gojux www.karimblog.net -- 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...@google

How to create a gerarchical list in admin for flatpages?

2010-08-31 Thread Karim Gorjux
go-cms.org/media/uploads/cms_page_media/2/3_pagelist___.png -- Karim Gojux www.karimblog.net -- 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 th

Re: Problems loading static files on runserver (I mean images and css)

2010-08-27 Thread Karim Gorjux
/admin-media/' And everything works now. Thanks! -- Karim Gojux www.karimblog.net -- 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, send

Problems loading static files on runserver (I mean images and css)

2010-08-27 Thread Karim Gorjux
': 'settings.STATIC_DOC_ROOT'}), ## end of urls.py ## ## settings.py ## [...] STATIC_DOC_ROOT = '/Users/karim/Projects/simplesite/template/media/' [...] ## end of settings.py ## My doubt is in these 3 variables. How I have to use they? MEDIA_ROOT = '' MEDIA_URL = '' ADMIN_MEDIA_PREFIX = '/media/' I tried

Re: Newbie question about url and seo

2010-08-20 Thread Karim Gorjux
ful! Have a nice day. -- Karim Gojux www.karimblog.net -- 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, send email to django-users+unsubsc

Newbie question about url and seo

2010-08-20 Thread Karim Gorjux
point to a directory. Is that good in terms of SEO? I guess that is even better than the old fashion way with the index.something, but I don't know. Thanks in advance -- Karim Gojux www.karimblog.net -- You received this message because you are subscribed to the Google Groups "Django

Re: Can I simply disable the CSRF? crazy

2010-08-17 Thread Karim Gorjux
On Tue, Aug 17, 2010 at 23:29, Rolando Espinoza La Fuente <dark...@gmail.com> wrote: > See csrf_exempt decorator: > http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#exceptions I had problems too, but the decorator is a good patch for the moment :-) Thanks! --

Re: Running Django admin site using Lighttpd

2009-04-09 Thread Karim Hamdan
HowTo) so now the polls site is accessible but the admin site gives 404 error. I hope my explanation made things clearer. Thanks Adam for sharing your conf file but lighttpd is the required server that I should be working with :( -- Karim

Re: Running Django admin site using Lighttpd

2009-04-09 Thread Karim Hamdan
I fail to access Django's admin site and get a 404 Not Found error instead. I am running lighttpd-1.4.19 and python-django 1.0-1ubuntu1 on my Ubuntu Intrepid machine. -- Karim Hamdan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Running Django admin site using Lighttpd

2009-04-08 Thread Karim Hamdan
When I try to access the admin site using "http://localhost/admin; I get a 404 not found error instead of getting the login page to enter my admin credentials to log in the admin site. -- Karim Hamdan --~--~-~--~~~---~--~~ You received this message becaus

Running Django admin site using Lighttpd

2009-04-08 Thread Karim Hamdan
Hi all, I have been trying to run my django site using lighttpd rather than using the development server that is shipped with django and I managed to run the site of the project but I failed to run the admin site. Any ideas how I can approach this problem? Thanks. -- Karim Hamdan