Re: Anyone interested in reviewing code for a hobby project - BookMarker

2014-06-11 Thread trojactory
learn at the same time I > will lose the interest that keeps me going. I will consider making one the > proper way when I am more comfortable with these things and I have an idea > which is reusable. > > If there is anything else please let me know. I will try my best to >

Re: Anyone interested in reviewing code for a hobby project - BookMarker

2014-06-10 Thread trojactory
Aseem, I had a quick look at your Django app and here are some of my observations: 1. Most Django apps have a standard layout with the app in a directory named after itself. See django-taggit for instance. 2. You have made some

Re: __unicode__() addition not working in basic poll application.

2014-01-11 Thread trojactory
Juan, Are you entering double underscores like '__unicode__'? Cheers, Arun On Saturday, January 11, 2014 5:14:01 AM UTC+5:30, Juan Hu wrote: > > I have same problem with Django 1.6.1 and Python 2.7.5. I tried to restart > interactive interpreter by exit() but it still doesn't work :( >

Re: using success_url

2014-01-11 Thread trojactory
Hi Brad, If you are using FormView, then you can set the success_url as mentioned in the docs . Cheers, Arun On Saturday, January 11, 2014 1:06:56 AM UTC+5:30, Brad

Re: Anybody familiar with JavaScript: Page is empty

2014-01-10 Thread trojactory
Hi Igor, You can solve this in three ways: 1. Return a JSON object from Django as a string using dumps: This will keep your HTML file unchanged. The JSON file might not be exactly in the form you want. But if you know javascript then you

Re: saving to two models from one class view

2014-01-09 Thread trojactory
Hi Brad, At the moment, two models do not have any relationship. I think you made an error in Line 3: created_by = models.ForeignKey(User, unique=True) I think you meant "Applicant" instead of User. Regards, Arun On Friday, January 10, 2014 3:13:42 AM UTC+5:30, Brad Rice wrote: > > I

Re: Question about the __unicode__()

2014-01-09 Thread trojactory
Igor, Are you looking for a more meaningful label, say using string interpolation: def __unicode__(self): return "Manufacturer: %s, Serial no: %s" % (manufacturer, serial_number) On Thursday, 9 January 2014 12:10:07 UTC+5:30, Igor Korot wrote: > > Tundebabzy, > I understand that. > But

Re: referencing choices tuples

2014-01-09 Thread trojactory
Hi Phil, Do you mean dropdown box which allow choices as well as free text input? I think you should use a normal textfield and a javascript based autocomplete solution like https://github.com/yourlabs/django-autocomplete-light Cheers, Arun On Thursday, 9 January 2014 03:21:11 UTC+5:30, Phil

Re: Startproject failing on Django 1.6

2014-01-07 Thread trojactory
Hi Steve, This is usually due to a path issue or an environment variable being previously set. Did you try using virtualenv? It is designed for isolating one python installation from another. I recently documented my experience on installing Python 3 on Windows and running virtualenv here:

Re: Broken links even after change the site information

2014-01-07 Thread trojactory
Hi Carlos, The sites framework is used for storing a human readable name of a domain (in case you are serving your site from multiple domains). It does not change or modify the url structure of your site. There are only two places where you can actually change the URL structure. First option

Re: test driven development and mixin for views

2014-01-06 Thread trojactory
Hi sassman, Since you mentioned TDD, I assume you are talking about unit tests. As with any matter in quality control, the more you can test, the better! In my opinion, you would need to provide atleast one testcase for each of the four CBV views. It is better to create a derived class in

Re: Embedding images like on Quora

2014-01-06 Thread trojactory
Hi Vibhu, This works automatically for certain sites if they implement a standard called oEmbed (http://oembed.com/). Several sites like Flickr, Youtube etc support providing a thumbnail for a url within their domain. Django has several packages which support oEmbed, of which, I have used

Re: new to Django and Python

2013-12-26 Thread trojactory
Hi Brent, Did you try the suggestions in the PEP link? Try adding this line at the top of the file: # coding: utf-8 Cheers, Arun On Friday, 27 December 2013 02:14:24 UTC+5:30, Brent Register wrote: > > I get an error message when I run the > "$ python manage.py syncdb" > Command. > >

How to Structure Single App Projects

2013-10-29 Thread trojactory
Hi, Whenever I am working on small projects, it seems like an overkill to create an app usually with the same name as the website (and the project's name with a small modification). For instance, if I am creating a project for a small intranet application called Foo. I usually end up with a

Admin does not show icon_calendar.gif

2012-09-16 Thread trojactory
Hi, After deploying my admin site to production, which is configured to use S3 for static assets, some icons are missing in the admin site. For instance, icon_calendar.gif is missing which is the button for showing the calendar popup. I believe the bug is related to a django-storages bug