Pass variable to {% load %} templatetag

2022-12-27 Thread Santiago Lamora
; works because load templatetag doesn't accept variable only strings. Any idea? Do you think that code of attempt one should work and it is a bug? I'm missing something. Thanks a lot! Santiago -- You received this message because you are subscribed to the Google Groups "Django us

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread Duncan Santiago
let's try google meet. On Tue, 23 Nov 2021 at 11:39, DJANGO DEVELOPER wrote: > can I have you on anydesk or any meeting tool? > > On Tue, Nov 23, 2021 at 11:31 PM Duncan Santiago < > duncansantiag...@gmail.com> wrote: > >> send me your code then, >> or Gi

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread Duncan Santiago
send me your code then, or GitHub repo handle. On Tue, 23 Nov 2021 at 11:27, DJANGO DEVELOPER wrote: > sorry if you get offended because I need a solution. a working solution. I > am not familiar with javascript. so getting a lot of issues > > On Tue, Nov 23, 2021 at 10:38 PM Dun

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread Duncan Santiago
t-danger'; output.innerHTML = err.message; }); }; })(); On Tue, 23 Nov 2021 at 10:34, Duncan Santiago wrote: > do a demo, enter the URL on the text area and click on the post button. > Then send me the logs on the terminal running Django and also open the > console and send th

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread Duncan Santiago
t? > > On Tue, Nov 23, 2021 at 10:16 PM Duncan Santiago < > duncansantiag...@gmail.com> wrote: > >> hello, am not sure what the question is. Kindly elaborate. >> >> On Tue, 23 Nov 2021 at 09:19, DJANGO DEVELOPER >> wrote: >> >>> I am working

Re: AJAX or Javascript POST request for Django form

2021-11-23 Thread Duncan Santiago
hello, am not sure what the question is. Kindly elaborate. On Tue, 23 Nov 2021 at 09:19, DJANGO DEVELOPER wrote: > I am working on a django based project in which I have integrated ML > trained models to check if a https url is legitimate or not. for this I > need javascript or ajax to call a re

Re: Django and Progressive web application

2021-08-26 Thread Duncan Santiago
gt; > -- > Gerardo Palazuelos Guerrero > > > > On Thu, Aug 26, 2021 at 11:33 AM Duncan Santiago < > duncansantiag...@gmail.com> wrote: > >> I have been trying to bring in the concept of progressive web application >> to my django websites. I have had issue with wit

Django and Progressive web application

2021-08-26 Thread Duncan Santiago
I have been trying to bring in the concept of progressive web application to my django websites. I have had issue with with the service worker, the major problem is the scope attribute. When I leave the scope unconfigured it defualts to the static folder, which means I cannot cache an html file

BPMN Library for Django

2020-01-10 Thread santiago contreras
Hi People, I'm new to Django And I'm looking for a library that can be used with Django To do workflows, I found Viewflows and Spiffworkflow, but I don't know really which one is better. Have you ever used them before? Regards, Santiago. -- Santiago Contreras Castillo Python Dev

Re: possible bug - CharField accepts string as max_length

2015-05-19 Thread Santiago L
El lunes, 18 de mayo de 2015, 12:33:21 (UTC+2), James Schneider escribió: > > I'd post a bug report. Based on the behavior you've outlined (haven't > looked at the Django source), there may have been some oversight on the > duck typing that python performs. It sounds like the migration package is

Re: possible bug - CharField accepts string as max_length

2015-05-18 Thread Santiago L
really 16 char max_length in DB if > you specifiy a string '16'? > > On 05/15/2015 10:53 AM, Santiago L wrote: > > Hi, > > I think that I have found a bug on the system check: it accepts a string > as value for CharField.max_length argument. > > It

possible bug - CharField accepts string as max_length

2015-05-15 Thread Santiago L
280, in __call__ if self.compare(cleaned, self.limit_value): File "/usr/local/lib/python3.4/dist-packages/django/core/validators.py", line 319, in compare = lambda self, a, b: a > b TypeError: unorderable types: int() > str() Best regards, Santiago -- You received

Django 1.7 - data migration which needs content types populated

2015-05-11 Thread Santiago L
Hi, I'm migrating an app from Django 1.6 to 1.7 and I need to create a data migration to load some initial data. Some of the migrations requires that Content Types are populated in order to create some objects with Generic Relations. # models.py class TincHost(models.Model): name = models.

Re: simultaneously submit three forms on the same page

2014-07-31 Thread Santiago Lamora
2014-07-30 21:33 GMT+02:00 aRkadeFR : > Excellent. > > Thanks for the share. > > How backward compatible is it? > > On 29/07/14 17:51, Santiago Lamora wrote: > > 2014-07-29 16:50 GMT+02:00 John : > > > > > How can one submit 3 form

Re: simultaneously submit three forms on the same page

2014-07-29 Thread Santiago Lamora
2014-07-29 16:50 GMT+02:00 John : > How can one submit 3 forms simultaneously?? Even ajax, is on by one! > > Quotting https://docs.djangoproject.com/en/dev/ref/forms/api/#prefixes-for-forms > You can put several Django forms inside one tag. To give each Form its own namespace, use the prefix keyw

Re: Site Framework

2014-07-23 Thread Santiago Lamora
2014-07-23 12:52 GMT+02:00 Akshay Mukadam : > Why do we use Site Framework in django > https://docs.djangoproject.com/en/dev/ref/contrib/sites/#how-django-uses-the-sites-framework -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: django Page

2014-07-23 Thread Santiago Lamora
2014-07-23 10:15 GMT+02:00 ngangsia akumbo : > Thanks , i have built some apps in my site like new, event and gallery, so > i want to include a new app that will help to create pages on the site > would the link above help me do that? > > What are you trying to do exactly? You talk like you're try

Re: django Page

2014-07-23 Thread Santiago Lamora
2014-07-23 9:44 GMT+02:00 ngangsia akumbo : > I want to create an app where the user has the ability to create new pages > on their website > > the app should be called pages > > can someone give me an idea pease? > Seems that you need something like a CMS. Take a look at https://www.django-cms.o

Re: Alternative to django-registration (unmaintaned since September 2013)

2014-07-23 Thread Santiago L
El sábado, 19 de julio de 2014 02:17:24 UTC+2, Russell Keith-Magee escribió: > > > On Fri, Jul 18, 2014 at 8:31 PM, Santiago L > wrote: > >> Hi, >> >> Some weeks ago I noticed that django-registration is not longer >> maintained by >> its creator: &g

Alternative to django-registration (unmaintaned since September 2013)

2014-07-18 Thread Santiago L
question, but relevant anyway)[2] [2] https://code.djangoproject.com/ticket/13164 Thanks! Best regards, Santiago -- 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: Self referencing models initialization

2014-03-13 Thread Santiago Palacio Gómez
I see, nice tip. Thanks! El jueves, 13 de marzo de 2014 12:35:48 UTC-5, Shawn Milochik escribió: > > On Thu, Mar 13, 2014 at 1:07 PM, Santiago Palacio Gómez > > > wrote: > >> Ok, just did that and it worked (had to delete and re-create the db). >> Thank you

Re: Self referencing models initialization

2014-03-13 Thread Santiago Palacio Gómez
escribió: > > Den 13/03/2014 kl. 06.34 skrev Santiago Palacio Gómez > >: > > > > Hi everyone, > > > > I'm a Django newbie, and I was following the tutorial for 1.6, creating > a new app where one of the models is self-referencing. They ask to, in > m

Self referencing models initialization

2014-03-12 Thread Santiago Palacio Gómez
Hi everyone, I'm a Django newbie, and I was following the tutorial for 1.6, creating a new app where one of the models is self-referencing. They ask to, in manage.py shell, create an instance of the model. But, as my model has a self reference foreign key, I can't pass any object to the key. I

Re: App to engage users

2013-05-08 Thread Santiago Basulto
https://code.google.com/p/django-mailer/ On Tuesday, May 7, 2013 11:38:23 PM UTC-3, Santiago Basulto wrote: > > Hello guys. > > Do you know of any app to keep track of new users and engage with them? > These are roughly what I'm thinking of (requirements, for nice people): > >

App to engage users

2013-05-07 Thread Santiago Basulto
Hello guys. Do you know of any app to keep track of new users and engage with them? These are roughly what I'm thinking of (requirements, for nice people): * Keep track last users singed up. * Keep track of contacts made to those users. I like to send a personal welcome email to everyuser that

Best ways and common practices to lock the Database before a new deploy

2013-02-21 Thread Santiago Basulto
sometimes we need to migrate some big tables. So, the questions are: * How should I lock my DB in the moment of the deployment? Should I use different DB users at that moment? * What other strategies do you use at the moment of the deployment you can recommend? Thank you very much! -- Santiag

Re: DatabaseError when running unit tests after upgrade to Django 1.3.1

2013-02-04 Thread Santiago Basulto
I've got the same problem guys, did you figure it out? On Wednesday, May 2, 2012 6:10:08 AM UTC-3, Simon Bächler wrote: > > Yes, exactly the same here. Even creating the table in setUp doesn't help. > > Regards > Simon > > >> Did anybody experience something similar? >> >> Cheers, >> Flo > > --

Questions about unicode

2012-11-23 Thread Santiago Basulto
Hey guys, i'm kind of confused here... If I get data from a request, say: request.GET.get("something") or request.POST.get("something") Is it automatically being encoded based on the Encoding of the request? Or I should take care of it explicitly? Thank you. -- Sa

Confusion with translations

2012-11-02 Thread Santiago Basulto
. I've got installed correctly. Also, how can I do to translate the strings contained in .py files. For example, check out forms module: https://github.com/pinax/django-user-accounts/blob/master/account/forms.py#L29 What am I missing? Thank you very much. -- Santiago Basulto.- -- You re

Re: Gunicorn vs Chaussette vs Meinheld

2012-10-23 Thread Santiago Basulto
2, 2012 at 8:28 AM, Tarek Ziadé wrote: > On Monday, October 22, 2012 1:09:56 PM UTC+2, Santiago Basulto wrote: >> >> Hello people. Reading about Circus[1] I ran into a couple of different >> "WSGI servers" that I haven't heard before (Chaussette[2] and Meinheld[3

Gunicorn vs Chaussette vs Meinheld

2012-10-22 Thread Santiago Basulto
Hello people. Reading about Circus[1] I ran into a couple of different "WSGI servers" that I haven't heard before (Chaussette[2] and Meinheld[3]). My question is if those are all similar to Gunicorn (and can be used instead of the last) or are just complementary servers. One thing that really

Security: How to destroy sessions for a user

2012-03-03 Thread Santiago Basulto
Hello people, trying to implement a simple "change password" view this came out. What's the best way to destroy session information for a user? For example consider when the user changes its password. All session data should be destroyed. Thanks! -- You received this message because you are s

Re: About managing dependencies in a collaborative development team and good practices.

2012-02-22 Thread Santiago Basulto
Thank you guys. I'm unsing virtualenvs and Pip. Seems great, is really easy that way. What about deployment? Will it be simple? Or should i care about the specific webserver? Thanks! On Feb 21, 1:21 pm, Tom Evans wrote: > On Tue, Feb 21, 2012 at 3:54 PM, Shawn Milochik wrote: > > On 02/21/201

About managing dependencies in a collaborative development team and good practices.

2012-02-20 Thread Santiago Basulto
Hello people, some time ago with a couple of friends started a project with Django. We are really getting into it now, and have made several progress in the last 3 months. But, as the code starts to grow up, everything start to get complicated. Right now we have our project hosted on Bitbucket, a

Django admin date and time picker not working

2012-01-07 Thread Santiago Ingold
I'm following the 4 part tutorial at djangoproject.com. In the 2nd part of it (https://docs.djangoproject.com/en/1.3/intro/ tutorial02/) im configuring the admin interface, it works fine, except for the fact that date and time javascript pickers does not appear. I've been following the tutorial s

Re: How to add extra fields to User table

2011-10-23 Thread Santiago Basulto
I'm new with Django, but i've used AUTH_PROFILE_MODULE = 'accounts.UserProfile' and works great to me. It's really simple to work with it, becouse everywhere you have a auth.User you can issue a get_profile() and get your UserProfile. On Oct 23, 4:52 am, Chen Xu wrote: > Hi, Every one: > I am tr

Question about Signals and Bootstrap

2011-10-08 Thread Santiago Basulto
connecting signals may be imported multiple times." This looks weird, and it's confusing me. So, before asking "where should i put my signals code not to duplicate it?" i ask for the django workflow. Thank you all! -- Santiago Basulto.- -- You received this message because you

Re: Best practices to create multiple users profiles using Auth

2011-09-28 Thread Santiago Basulto
Thank you Ryan. I'll read it. Seems interesting. On Sep 27, 10:30 am, ryan west wrote: > I actually just wrote a blog post about why I think extending > contrib.auth.models.User is a better solution to using a OneToOneField > (or a ForeignKey), you can find it here: > > http://ryanwest.info/blog/

Best practices to create multiple users profiles using Auth

2011-09-27 Thread Santiago Basulto
Hello friends, i'm new with django. I've something to ask you. I'm building a website similar to eBay where i've different "kinds" of users. These are: CustomerUser and SellerUser. Both of them has different data to be saved. While reading docs and django book i noted the UserProfile "trick" (ht

django-admin.py startproject mysite

2011-04-04 Thread Santiago Caracol
go tutorial still match reality? Santiago -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegr

'NoneType' object has no attribute 'set_cookie'

2011-03-31 Thread Santiago Caracol
of course, have made some changes to the system. When I try to add a new object, regardless of which type, in the admin interface, I get the error messages given below. (I had to shorten the error message for Google Groups to allow me to post it.) Any ideas what I could do?

reimport module every n seconds in main process

2011-02-16 Thread Santiago Caracol
ata module every n (e.g. 10) seconds. How could this be done? Santiago -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to d

Re: compiled regex as attribute

2011-02-11 Thread Santiago Caracol
> Since the pickled value is a string, it should work in fixtures. There is no point in storing the regex strings in a pickle field. I already have the regex strings in ordinary django fields. What I want to store is *compiled* regular expressions in order to be able to use them without having to

Re: compiled regex as attribute

2011-02-11 Thread Santiago Caracol
> http://pypi.python.org/pypi/django-picklefield/0.1 Thanks for the tip. This works, but it has one great disadvantage: The regexes can't be stored in fixtures. They are stored in the database directly. So it seems I would have to insert all my several thousand products manually again. And if I ch

compiled regex as attribute

2011-02-11 Thread Santiago Caracol
could use it in the product model. Any tips how to store the compiled regex? Santiago -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this grou

Re: blank ModelMultipleChoiceField, sort a ManyToManyField that is allowed to be blank

2011-02-01 Thread Santiago Caracol
Ah, now there is a new problem. Before, my ManyToManyField was unsorted, but it was possible to add new items by clicking on the "+" button. Now my items are sorted thanks to a ModelMultipleChoiceFormField (with "order_by('...')" and "required=False"), but the "+" button is gone. Is there a way t

Re: blank ModelMultipleChoiceField, sort a ManyToManyField that is allowed to be blank

2011-02-01 Thread Santiago Caracol
lates to "required" of form fields? Santiago -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsu

blank ModelMultipleChoiceField, sort a ManyToManyField that is allowed to be blank

2011-02-01 Thread Santiago Caracol
;TypeError: __init__() got an unexpected keyword argument 'blank'.) Is there another way to sort a models.ManyToManyField that has the property "blank=True"? Santiago -- You received this message because you are subscribed to the Google Groups "Django users" group.

use variable that is bound at an object's creation time at the object's creation time

2011-01-28 Thread Santiago Caracol
lf.spelling_variants. How can I make sure that self.spelling_variants has a value when self.variants() is executed? Santiago -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups

slight model change makes app unusable

2011-01-19 Thread Santiago Caracol
Hello, I have got a model MobilePhone that has a producer, such as "alcatel", a canonical name, such as "b-500 s" and a paraphrase type, such as "a-341 i". Each instance of MobilePhone is supposed to calculate all its variants (such as alcatel b-500 s, alcatel b 500 s, alcatel b-500- s, b-500 s,

Re: override save()

2011-01-17 Thread Santiago Caracol
> Since these attributes > are "ordinary" attributes, they aren't saved to the database, so they > aren't loaded from it neither. It seems that this was the problem. Thank you. Santiago -- You received this message because you are subscribed to the Google Groups

Re: override save()

2011-01-17 Thread Santiago Caracol
Sorry the formatting of the code went wrong. Here it is again: # class ContentClassifier(models.Model): # def save(self, *args, **kwargs): self.compile() super(ContentClassifier, self).save(*args, **kwargs) #

override save()

2011-01-17 Thread Santiago Caracol
Hello, I have got a model called ContentClassifier which uses regular expressions to classify the content of messages. It has a method compile() that compiles an instance's regular expressions into self.posrx. When the classify method calls compile, i.e. when each ContentClassifier compiles its re

Re: compiled methods

2011-01-16 Thread Santiago Caracol
Thank you very much! The term "memoize" was exactly what I was looking for. Santiago -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from th

compiled methods

2011-01-16 Thread Santiago Caracol
341 i, a 341 i, a341 i, a-341-i, a 341-i, a341-i, a-341i, a 341i, a341i Obviously it is very bad for speed to calculate the variants of each phone object every time the object is needed for some action. Santiago -- You received this message because you are subscribed to the Google Groups &quo

build application from admin code

2011-01-04 Thread Santiago Caracol
hat Juan allows them to. And Juan can only view and manipulate the pages that the admin of example.org allows him to. Has anyone done something of this kind? Is there example code? Santiago -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: filter users by full name

2010-07-22 Thread Santiago Perez
If you're using MySQL then this should work: models.User.objects.extra(where=["concat(first_name, ' ', last_name)=%s"], params=["John Test"]) Not sure how portable the concat function is or what alternatives are there in other backends but shouldn't be very hard to find out. On Fri, Jul 23, 2010

Re: using the update() method

2010-07-21 Thread Santiago Perez
I think that what you want can be accomplished by: from django.db.models import F readers = Readers.objects.filter(status=active) readers.update(sorter=(F('library') + F('book')) On Wed, Jul 21, 2010 at 19:40, Nick wrote: > > I am trying to loop through a queryset and assign values to a field

Re: Inspect a Model in Django

2010-07-21 Thread Santiago Perez
from looking at the fields_for_model(...) method in django.forms.model, it doas opts = model._meta for f in opts.fields + opts.many_to_many: # for each field it ends up calling f.formfield() which in CharField is implemented as: def formfield(self, **kwargs): de

Re: How interate over just a slice of form fields in template? (I tried {% for e in form|slice:":5" %} )

2010-07-05 Thread Santiago Romero
oping-over-hidden-and-visible-fields Good luck, Santiago. On Mon, Jul 5, 2010 at 4:07 PM, Chris Seberino wrote: > How interate over just a slice of form fields in template? > > I tried {% for e in form|slice:":5" %} but it appears the slice part > is just ignored. > &

Re: buildout and django

2010-03-13 Thread Santiago Videla
t; To post to this group, send email to django-us...@googlegroups.com. > To 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. > > -- Santiago Videla

Re: extending the django admin site

2009-01-31 Thread Santiago
in lines: 2009/2/1 alexander lind : > > How do I add a custom field to the a model rendered as a form by > django admin site? > Use custom widgets > My model has a 'choices' field with 4 possible choices: png, gif, jpg > and 'none'. As you can guess this describes the format of an image. > Wh

Re: Need URL help

2009-01-13 Thread Santiago
data... so you sould change some code: change the following lines: (r'^(?P\d+)/commodity_detail/$', 'commodity'), by (r'/commodity_detail/$', 'commodity'), tho... i guess that would work like this (i aint an expert :P) > Thank you for any help yo

Re: Need URL help

2009-01-13 Thread Santiago
replace in your url.py: (r'^(?P\d+)$/commodity_detail/', 'commodity'), by (r'^(?P\d+)/commodity_detail/$', 'commodity'), this _should_ work 2009/1/14 May : > > My error is not being able to get the ID passed to the next > template. > > The code: > > http://dpaste.com/108580/ > > Thank you, >

Re: {{shop_url}}

2009-01-12 Thread Santiago
try checking this: http://docs.djangoproject.com/en/dev/ref/models/instances/#django.db.models.Model.get_absolute_url 2009/1/13 Alessandro Ronchi : > Is there a template tag with show_url like {{shop_name}} ? > > -- > Alessandro Ronchi > Skype: aronchi > http://www.alessandroronchi.net > > SOASI

Re: Your IDE of choice

2009-01-08 Thread Santiago
kdevelop its a great ide... but i dont see it for python in general... 2009/1/9 raj : > > what about kdevelop in linux? > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

Re: Your IDE of choice

2009-01-06 Thread Santiago
i recently switched to screen + vim with omnicomplete for python and html... komodo edit its pretty good too 2009/1/7 martyn : > > Hi > > http://pyrox.utp.edu.co/ > > Regards > > Bye. > > On Jan 6, 9:34 am, roberto wrote: >> I tried them all (almost ... I think... at least the free ones). >

Re: Templates dir exception

2009-01-04 Thread Santiago
I tend to use: TEMPLATE_DIRS = ( os.getcwd()+'/static/templates' ) so when using generic views it goes to os.getcwd()+'/static/templates/' this lets me have my proyect live in different folders and run fine... in your case it is specting a directory tree like this: /

Re: It's Django for bussines/financial apps??

2007-09-26 Thread Santiago Videla
mplating > system (I'm using mako), but it's rather independent of the rest of > the framework. > > > > > > > > -- Santiago Videla www.revolucionesweb.com.ar Sigue la mata dando de que hablar siempre abajo y a la izquierda donde el pensa