Re: Passing an image to the other url?

2015-06-23 Thread victor rocha
Jeremy, Extending a template do not magically gives you access to the context variables the other template has. The context is set in the view, what's the view for the homepage? You didn't include it in your post. Is the variable images set in there? I recommend using django debug toolbar to

Re: django1.5 pour rapidsms

2013-07-31 Thread Victor Rocha
can you post the traceback you are getting? On Wednesday, July 31, 2013 7:49:10 AM UTC-4, mimi89 wrote: > > depuis que j'ai rajouté l'application rapidsms-xforms à rapidsms, celui-ci > ne marche plus car la version de ce dernier est Django1.5 et que pour > rapidsms c'est un ancienne version! >

Re: html to pdf

2013-07-28 Thread Victor Rocha
Can you post the traceback? On Sunday, July 28, 2013 3:50:41 AM UTC-4, Harjot Mann wrote: > > Hello Everyone > > I am using Reportlaba nd pisa to convert the html template to pdf and > it is working but my question is that I want to convert the html > template directly to pdf. Right now it is

Re: html to pdf

2013-07-28 Thread Victor Rocha
Shameless plug but you could use this: https://github.com/rochapps/django-pdf -victor On Sunday, July 28, 2013 3:50:41 AM UTC-4, Harjot Mann wrote: > > Hello Everyone > > I am using Reportlaba nd pisa to convert the html template to pdf and > it is working but my question is that I want to

Re: 'SimpleLazyObject'

2013-07-13 Thread Victor Rocha
but there is no reference to it on your databases. The Bookmark foreign key expects to point to user instance on the users table. Thank you, Victor Rocha www.RochApps.com On Friday, July 12, 2013 2:45:00 PM UTC-4, Kakar wrote: > > I've got a TypeError: > > int() argument must be a string

Re: p.choice_set.all() error

2013-03-08 Thread Victor Rocha
The only thing I can think of it is that your database is not up-to-date with your models. You could drop the database and do a syncdb, otherwise using south to migrate your database schema could be an option. Good luck, Victor Rocha RochApps <http://www.rochapps.com> On Thursday, M

Re: admin - see detail inline

2013-02-06 Thread Victor Rocha
(Client) #Admin class Detail_Doc(admin.StackedInline): model = Docs class DocAdmin(admin.ModelAdmin): pass class ClientAdmin(admin.ModelAdmin): inlines = [Detail_Doc,] admin.site.register(Doc, DocAdmin) admin.site.register(Client, ClientAdmin) Thank you, Victor Rocha

Re: App-structure: how to have a bunch of data in all the pages.

2013-02-05 Thread Victor Rocha
I think template tags would be a good solution. Thank you, victor rocha www.rochapps.com On Tuesday, February 5, 2013 5:06:28 AM UTC-5, Stefano Tranquillini wrote: > > Hi all. > i've a conceptual problem that i would like to solve. > Let's take as example a blog. > In all the pa

Re: Problem with FilteredSelectMultiple widget

2013-02-01 Thread Victor Rocha
You are very welcome! On Sat, Feb 2, 2013 at 1:14 AM, KVR <kvr@gmail.com> wrote: > Thank you very much Victor Rocha !! > That resolved my issue. > > Regards, > kvr > > > On Saturday, February 2, 2013 11:06:29 AM UTC+5:30, Victor Rocha wrote: > >>

Re: Problem with FilteredSelectMultiple widget

2013-02-01 Thread Victor Rocha
do this Thank you, Victor Rocha rochapps.com On Sat, Feb 2, 2013 at 12:15 AM, KVR <kvr@gmail.com> wrote: > Yeah, it's throwing js error. Could you please tell me how to point that, > I am just newbie to Django. > I've tried adding the following to urls.py >

Re: Problem with FilteredSelectMultiple widget

2013-02-01 Thread Victor Rocha
I remember running into this problem quite sometime ago. What happens is that in order to access the file jsi18n you need to be logged in. What you need to do it's save a copy of the file and point to the file instead. thank you, Victor rocha rochapps.com On Fri, Feb 1, 2013 at 11:52 PM, KVR

Re: Problem with FilteredSelectMultiple widget

2013-01-31 Thread Victor Rocha
Can you post up your code? On Thursday, January 31, 2013 6:29:08 AM UTC-5, KVR wrote: > > Hi, > I am trying to reuse FilteredSelectMultiple widget from django admin > widgets. > > I've defined my form and media classes, and included form and media > contexts in my template also. > > But when I

Re: Get objects sorted by time of last comment

2013-01-05 Thread Victor Rocha
lifting behind the scenes. disclaimer: I am not really sure if you can employed any of the methods listed here on a Generic Model tho, use at your own risk... thank you, Victor Rocha RochApps <http://www.rochapps.com> On Wednesday, January 2, 2013 1:50:17 AM UTC-5, Vibhu Rishi wrote:

Re: Django 1.4 manage.py cannot find settings

2012-12-25 Thread Victor Rocha
Would you please describe all you have to do to resolve it, in case someone else stumbles upon the same issue? Thank you, Victor Rocha RochApps On Tue, Dec 25, 2012 at 5:51 PM, huw_at1 <huwdjo...@gmail.com> wrote: > [RESOLVED] > > > On Tuesday, 25 December 2012 17:28:15 UTC,

Re: Django 1.4 manage.py cannot find settings

2012-12-25 Thread Victor Rocha
change the project > directory setting in the IDE as you said. > > Thanks for the help. > > > On Tuesday, December 25, 2012 5:14:03 PM UTC, Victor Rocha wrote: > >> I don't think I can be of more help. Hopefully someone with experience >> with PyCharm can chime in. >

Re: Django 1.4 manage.py cannot find settings

2012-12-25 Thread Victor Rocha
I don't think I can be of more help. Hopefully someone with experience with PyCharm can chime in. This is probably not what you want to hear but ditch windows, ditch pycharm use windows and vim or at least gedit. One last comment, in your manage.py file i can see this 'pkadata.settings'; i didnt

Re: Django 1.4 manage.py cannot find settings

2012-12-25 Thread Victor Rocha
about this 'test.test.settings' it should only be 'test.settings' Thank you, Victor Rocha RochApps <http://www.rochapps.com/> On Tue, Dec 25, 2012 at 10:22 AM, huw_at1 <huwdjo...@gmail.com> wrote: > Thank you, > Victor Rocha > RochApps <http://www.rochapps.com> >

Re: Django 1.4 manage.py cannot find settings

2012-12-25 Thread Victor Rocha
your app using django 1.4 from the beginning, I don't see how this error could happen! Django lays out your project for you and sets everything correctly. Thank you, Victor Rocha RochApps <http://www.rochapps.com> On Tuesday, December 25, 2012 8:22:10 AM UTC-5, huw_at1 wrote: > > Hi,

Re: Editing model instance

2012-11-23 Thread Victor Rocha
=clientjob) return render_to_response('tcc/edit_job.html', {'jform': jform,'sform':sform},context_instance=RequestContext(request)) Thank you, Victor Rocha RochApps <http://RochApps.com> On Friday, November 23, 2012 8:55:06 AM UTC-5, Victor Rocha wrote: > > For starter

Re: Editing model instance

2012-11-23 Thread Victor Rocha
. Let me know if I was of any help, Victor Rocha RochApps <http://www.rochapps.com> On Thursday, November 22, 2012 5:59:11 AM UTC-5, sandy wrote: > > I edit value of a table using model instance, however after editing I > want the values to be saved in some other table with

Re: What used @models.permalink and get_absolute_url? Please an example to better understand this. An example of the documentation is not clear to me

2012-11-17 Thread Victor Rocha
In order to use get_absolute_url, first of all you need to have named urls. Lets imagine we have the following named url. url(r'^accounts/(P?d+)/$', DetailView.as_view( template_name='accounts/details.html', ), name='account_details') In order to referece this url in a

Re: TypeError:

2012-11-16 Thread Victor Rocha
ance with new django 1.4 specifications and you should be fine. Thank you, Victor Rocha RochApps.com On Thursday, November 15, 2012 3:05:02 PM UTC-5, Satinder Goraya wrote: > > I am using a custom field "SeparatedValuesField" for saving array > values in my

Re: Using Emails to authenticate

2012-11-04 Thread Victor Rocha
I haven't heard of a package that does what you need. I will try to help you as much as possible. I use django-registration to handle user registration. It provides a form named RegistrationFormUniqueEmail, this form, as its name suggests, will ensure that the email used is unique. For login:

Re: Date widget not HTML5

2012-10-25 Thread Victor Rocha
You need to roll out your own widget. I assume django will have html5 support in the near future. On Wednesday, October 24, 2012 1:04:07 PM UTC-4, Juan Pablo Tamayo wrote: > > > > Is there any reason not to have the date widget input tag have the > attribute type="date" instead of just

Re: Django Admin asks password every operation

2012-10-06 Thread Victor Rocha
Depending on what exactly you want to accomplish to match the root to a url, I do as follow: url(r'^$', 'earth.views.Home'), However, it is sometimes good to have a default page if a request didnt match the url requested (I would use this as the very last rule, otherwise it will catch every

Re: Django user should not login on multiple machine with same username and passowrd when user already login on one machine

2012-08-10 Thread Victor Rocha
That would imply that the user needs to log out of the other machine before login into this one. For that reason you would also need to include another view to log an authenticated user out of any other machines. I said an authenticated user because you need to make sure that the user trying to

Re: How to override an attribute?

2012-08-05 Thread Victor Rocha
What about you do what the error is telling you to do? All you need to do its to add a related name to your field definitions and that will fix it. If you need me to fix it for you, post some real code. On Saturday, August 4, 2012 10:55:13 AM UTC-4, . wrote: > > Hello, > > I'm trying to do

Re: form.errors is not a dictionary?

2012-08-01 Thread Victor Rocha
Read the above reply. When you print form.error --> prints out a custom __unicode__ for you to use in your templates. However, you can iterate over form.errors and it will act as a normal dict. On Wednesday, August 1, 2012 1:56:28 AM UTC-4, vivek soundrapandi wrote: > > I too have the same

Re: Returning data belonging to a model (FK)

2012-07-27 Thread Victor Rocha
David, Django already comes with a built-in contenttypes application which does exactly what you trying to accomplish, i think. You should read the documentation: https://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/ On Friday, July 27, 2012 8:47:37 AM UTC-4, David wrote: > > Hi >

Re: Automated updating of data across staging and production environments?

2012-07-26 Thread Victor Rocha
I partly agree with the above question. It's a solution, but you usually never want to use your production database on a development server. As for his problem, I would look into fabric. You can easily write a function that dumps data from one database and into another. On Thursday, July 26,

Re: get_absolute_url returning empty string

2012-07-25 Thread Victor Rocha
your get absolute url method is in the wrong format:: if should be. @models.permalink def get_absolute_url(self): return ("view_name", #view name, (), #tuble of positional args {}, #dict of name kwargs ) In your case, this is what the method should look like:

Re: get_absolute_url returning empty string

2012-07-25 Thread Victor Rocha
Your get_absolute_url method is in the wrong format::: it should be: @models.permalink def get_absolute_url(self): return ("view_name", #view name ) On Tuesday, July 24, 2012 1:58:26 PM UTC-4, Jeff Green wrote: > > I am stuck in trying to figure out why the get_absolute_url call