Strange import error with GeoIP

2013-11-18 Thread Karim
bs Anyone 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

Re: Help in Django-contact-form

2015-01-27 Thread Karim
iew 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=email&utm_source=footer>

Best practice to render the view based on the user

2015-01-27 Thread Karim
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 this

Re: Select Field With Other option

2015-01-27 Thread Karim
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 stop receiving emails fr

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: Dropzone.js and images POST on new object

2015-02-10 Thread Karim
On Tue, Feb 10, 2015 at 7:25 PM, James Schneider 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 this message because you are s

Form Wizard: how to send instance_dict based on the request

2015-02-17 Thread Karim
e, but I can populate it only using the request. I 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&qu

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

2015-02-24 Thread Karim
lidated? Thank 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

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,

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 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 subscribed to the Google Groups

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 rec

Re: Form Wizard: store the session values

2015-02-25 Thread Karim
backup and restore the session? Thank you [1] https://docs.djangoproject.com/en/1.7/ref/contrib/formtools/form-wizard/#django.contrib.formtools.wizard.views.WizardView.initial_dict On Wed, Feb 25, 2015 at 12:14 PM, Karim wrote: > When I click on the link for my form, > ​[...] > --

Re: Delete the file related on the FileField

2015-02-25 Thread Karim
On Thu, Feb 26, 2015 at 2:13 AM, Rodrigo Zayit 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 group and stop receiving emails

Re: Form Wizard: store the session values

2015-02-25 Thread Karim
all the default super 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 recei

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 to the

Re: Suggiestion on how split a views.py file

2015-05-12 Thread Karim
ew 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 because you are sub

Implement a instant saving on edit form

2015-06-25 Thread Karim
ed in my app.. :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 Ne

Re: can i use sqlite for big project?

2015-06-25 Thread Karim
On Thu, Jun 25, 2015 at 5:08 PM, Arindam sarkar 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​ -- Karim N. Gorjux -

Re: Implement a instant saving on edit form

2015-06-25 Thread Karim
On Thu, Jun 25, 2015 at 3:16 PM, Karim 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 saving first. > ​I

Modify a queryset and add computed value to the objects

2014-12-09 Thread Karim
d "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+unsu

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 -

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 &quo

Django admin, InLineForm and many2many fields

2016-02-09 Thread Karim
. I would like 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 f

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

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

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 b

Re: Running Django admin site using Lighttpd

2009-04-09 Thread Karim Hamdan
ail 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

Re: Running Django admin site using Lighttpd

2009-04-09 Thread Karim Hamdan
ion of the 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 :(

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 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! -- Karim Gojux www.karimblog.net -- You re

Newbie question about url and seo

2010-08-20 Thread Karim Gorjux
y url 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 &qu

Re: Newbie question about url and seo

2010-08-20 Thread Karim Gorjux
On Fri, Aug 20, 2010 at 18:19, David Euzen wrote: > Hello, > > you should think of it in terms of ressource, not of file. URLs are > about ressources not about files even if sometimes ressources are > files. Thanks for your answer. Was very useful! Have a nice day.

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

2010-08-26 Thread Karim Gorjux
{'document_root': '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 = '&#

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

2010-08-27 Thread Karim Gorjux
PREFIX = '/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 fr

How to create a gerarchical list in admin for flatpages?

2010-08-31 Thread Karim Gorjux
.django-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

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...@googlegrou

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 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 www.karimblog.net -- You re

I don't understand the difference between these two views

2010-09-02 Thread Karim Gorjux
r_404(Category, slug=slug) return render_to_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 th

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 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 is clear -- Karim Goju

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 to the Google Groups "

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 Chero

Re: Cherokee for home developing

2010-10-28 Thread Karim Gorjux
On Thu, Oct 28, 2010 at 19:32, Karim Gorjux 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" and let django show

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 with Cherokee I haven't an

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" group

Re: Cherokee for home developing

2010-10-30 Thread Karim Gorjux
Yes I 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 Fast

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** result: http://docs.django

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, se

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: http://www.karimbl

Re: Cherokee for home developing

2010-11-01 Thread Karim Gorjux
On Mon, Nov 1, 2010 at 21:21, Max Countryman 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 sometimes scream out

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 e

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 some > existing CMS like django-

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: > http://bitbucket.org

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 django-us...@googlegroup

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/d

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 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 Personale: http://www.karimblog.n

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 s

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 crea

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 try. -- K. Blog Per

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() cla

Re: Form containing a Mutipolygon field for Django 1.3

2011-04-18 Thread GARRAM karim
, GARRAM karim wrote: > 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 = model

Re: Form containing a Mutipolygon field for Django 1.3

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

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 = models.ManyToManyField(F

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

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/

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: 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 :

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