Re: Overriding admin save event

2012-10-15 Thread Lachlan Musicman
On Tue, Oct 16, 2012 at 1:44 PM, Lachlan Musicman wrote: >> Hola, >> >> I wanted to override the save event in the admin so that users were >> redirected to a different page. > > Of course, further reading has turned up signals. Is this the current > rec

Re: Overriding admin save event

2012-10-15 Thread Lachlan Musicman
On Tuesday, October 16, 2012, Lachlan Musicman wrote: > Hola, > > I wanted to override the save event in the admin so that users were > redirected to a different page. > > I found this page describing how to do it: > > http://www.ibm.com/developerworks/opensource

Re: Better feedback for admin users

2012-10-17 Thread Lachlan Musicman
On Thu, Oct 18, 2012 at 12:28 AM, Bill Freeman wrote: > On Tue, Oct 16, 2012 at 6:21 PM, Daniele Procida wrote: >> I am starting to customise the admin classes for my models so that I can >> provide extra feedback to the user. >> >> For example I want to report - in the admin page - useful infor

Re: Django Troubleshooting

2012-10-18 Thread Lachlan Musicman
On Fri, Oct 19, 2012 at 4:07 PM, Sun Simon wrote: > https://www.djangoproject.com/download/ > > I am installing Django for Python on Win XP and came across this problem > during installation: > > > tar xzvf Django-1.4.2.tar.gz > cd Django-1.4.2 > sudo python setup.py install > > > What does "cd" m

urls.py and default values...

2012-10-21 Thread Lachlan Musicman
Hola, I have data across multiple years. I want to run reports on a per year basis, so I have in my urls: url(r'^students/reports/(?P\d{4})/$', student_reports, name='student_reports'), etc. What I want to know though, is how to have this in the urls: url(r'^students/reports/$', student_reports

Re: urls.py and default values...

2012-10-22 Thread Lachlan Musicman
e passing extra option to you view function: > https://docs.djangoproject.com/en/1.4/topics/http/urls/#passing-extra-options-to-view-functions > > > Cheers, > Tom > > Dne Mon, 22 Oct 2012 15:24:51 +1200 > Lachlan Musicman napsal(a): > >> Hola, >> >> I have

Re: Modernizing the Tutorial

2012-10-25 Thread Lachlan Musicman
On Fri, Oct 26, 2012 at 2:00 AM, Tomas Neme wrote: > Now that function-based views are being deprecated, or at least that > class-based views are being favored, there should be a tutorial with > them in the docs, shouldn't it? > > I don't mean replacing the current one, because that'd raise the en

Re: Modernizing the Tutorial

2012-10-25 Thread Lachlan Musicman
On Fri, Oct 26, 2012 at 1:02 PM, Tomas Neme wrote: >> However, there is also scope for a focussed tutorial about class-based views >> in general. IMHO one of the biggest uptake problems around class-based > > This is what I meant. Something that brings in, easy and clearly, the > concept of mixins

Re: Installing Djando and tutor polls app

2012-10-25 Thread Lachlan Musicman
On Fri, Oct 26, 2012 at 10:39 AM, Rodrigo Morgado wrote: > Hi everybody, > > I'm new in Django framework. I installed version 1.3.1 over Python 2.7.3 in > Ubuntu. > I already did all steps but i have an error when i execute python manage.py > sql polls to create my table's project in mysql. > > Tr

Documentation Bug report

2012-10-28 Thread Lachlan Musicman
Hola, After the thread about improving the Class based View documentation someone pointed us to the dev docs, which I downloaded to read (low bandwidth area, plus intermittent network and power availability). I downloaded the zip from the HTML link on the front page. The new docs are great - the

Re: Documentation Bug report

2012-10-28 Thread Lachlan Musicman
od in the process)." Should have s/On/In/g cheers L. On Mon, Oct 29, 2012 at 10:05 AM, Ramiro Morales wrote: > On Sun, Oct 28, 2012 at 4:34 PM, Lachlan Musicman wrote: >> >> The funniest/worst part is the title: >> >> Django v1.3.2 documentation >> >&

Re: Django Development Model

2012-10-28 Thread Lachlan Musicman
On Mon, Oct 29, 2012 at 9:39 AM, Smriti Patodi wrote: > Hi Everyone, > I am a MSIS student at Santa Clara University, CA. My team has chosen Django > to work on for our Software Project Management course. > I was wondering if there is some place where I can find documentation > related to Django's

Re: Django Development Model

2012-10-28 Thread Lachlan Musicman
On Mon, Oct 29, 2012 at 2:00 PM, Lachlan Musicman wrote: > On Mon, Oct 29, 2012 at 9:39 AM, Smriti Patodi wrote: >> I was wondering if there is some place where I can find documentation >> related to Django's Software Development process/model. > > Spend time with th

Reverse and kwargs...

2012-10-29 Thread Lachlan Musicman
Hi, I'm struggling to get the syntax right for a url reverse function. I have a form that asks for a Model type (ChoiceField with strings) and a year (CharField). The logic then if/elifs the ChoiceField and then redirects to the appropriate report page (for statistics on the Model type), with an

Re: Reverse and kwargs...

2012-10-29 Thread Lachlan Musicman
lines: url(r'^students/reports/$', student_reports, name='student_reports'), url(r'^students/reports/(?P\d{4})/$', student_reports, name='student_reports'), and the view: def student_reports(request, year=None): year = year or datetime.date.today().

Re: Reverse and kwargs...

2012-10-29 Thread Lachlan Musicman
some way. Could you please expand on your answer for a beginner? Cheers L. > On Oct 29, 2012, at 4:38 PM, Lachlan Musicman wrote: > >> On Tue, Oct 30, 2012 at 11:14 AM, Nikolas Stevenson-Molnar >> wrote: >>> You're close. Your reverse calls should be: >>&

Re: Reverse and kwargs...

2012-10-29 Thread Lachlan Musicman
On Tue, Oct 30, 2012 at 1:03 PM, Christophe Pettus wrote: > > On Oct 29, 2012, at 4:52 PM, Lachlan Musicman wrote: >> Could you please expand on your answer for a beginner? GAH! Thanks. I've been thinking that there's got to be an easier way to get and generate these

Joining querysets?

2012-10-29 Thread Lachlan Musicman
Hola, So I've reached the point where I feel it necessary to join querysets. All the ref's I've read online are quite old and recommend using | or itertools.chain() Are these still the recommended method, or am I doing it wrong? cheers L. -- ...we look at the present day through a rear-view m

Re: Joining querysets?

2012-10-29 Thread Lachlan Musicman
On Tue, Oct 30, 2012 at 1:35 PM, Lachlan Musicman wrote: > Hola, > > So I've reached the point where I feel it necessary to join querysets. Don't bother with this - I just wrote a better Query to solve this issue L. > > All the ref's I've read online are

Re: Joining querysets?

2012-10-30 Thread Lachlan Musicman
On Wed, Oct 31, 2012 at 1:26 AM, Bill Freeman wrote: >>> >>> All the ref's I've read online are quite old and recommend using | or >>> itertools.chain() >>> >>> Are these still the recommended method, or am I doing it wrong? > > This depends on what you mean by "join" (just in case you need it > a

Re: Help me choose OS for django server

2012-10-30 Thread Lachlan Musicman
On Wed, Oct 31, 2012 at 2:04 PM, Chris Pagnutti wrote: > > @Nik: > Just following the django docs, it recommends Apache+mod_wsgi for the django > app, and either lighttpd or nginx to serve media. I liked the idea of > serving media separately because the app is heavy on video streaming. Is > you

Re: Problem with formset

2012-10-31 Thread Lachlan Musicman
On Thu, Nov 1, 2012 at 7:30 AM, Satinderpal Singh wrote: > I use formset in my views.py file for the forms. It saves the entries from > the form to the database but the problem is that it shows all the previous > forms along with the new form for the new entry. The code for my views file > is give

Re: Problem with formset

2012-11-01 Thread Lachlan Musicman
On Thu, Nov 1, 2012 at 6:32 PM, Satinderpal Singh < satinder.goray...@gmail.com> wrote: > On Thu, Nov 1, 2012 at 1:25 AM, Lachlan Musicman wrote: > >> On Thu, Nov 1, 2012 at 7:30 AM, Satinderpal Singh >> wrote: >> > I use formset in my views.py file for the fo

Re: Problem with formset

2012-11-04 Thread Lachlan Musicman
gt; > > On Fri, Nov 2, 2012 at 1:41 AM, Lachlan Musicman wrote: > >> On Thu, Nov 1, 2012 at 6:32 PM, Satinderpal Singh < >> satinder.goray...@gmail.com> wrote: >> >>> On Thu, Nov 1, 2012 at 1:25 AM, Lachlan Musicman wrote: >>> >>>> On

Re: initializing virtualenvwrapper on Mac (10.6.8) for Django

2012-11-05 Thread Lachlan Musicman
WORKON_HOME is a shell variable, which is why it's then called/accessed using the $ - $WORKON_HOME Export tells the shell to put it in it's local vars for the session, and to set the var to ~/Export the mkdir -p will create the directory ~/Envs (or whatever you chose to set WORKON_HOME to). It wi

Re: initializing virtualenvwrapper on Mac (10.6.8) for Django

2012-11-05 Thread Lachlan Musicman
I should add that you can see what any shell VAR is set to by using echo $VAR or see what they are all set to by using printenv And that by shell I'm generically referring to all shells: sh, csh, ksh, bash, dash, ash. Cheers L. On Tue, Nov 6, 2012 at 2:10 PM, Lachlan Musicman

Re: Norwegian Sorting

2011-09-10 Thread Lachlan Musicman
I don't know if this is the exact problem, but I've addressed this previously here: http://www.pineappledonut.org/2010/12/05/data-collations/ I've only worked with MySQL before, so I'm not sure about how collations work in POSTGres, but it may provide some pointers. cheers L. On Sat, Sep 10, 20

Re: django and unicode

2011-10-11 Thread Lachlan Musicman
On Wed, Oct 12, 2011 at 15:13, Elim Qiu wrote: > I just start try django 1.3.1, still in the step I of the tutorial, > but noticed that the tables created is in latin1 encoding while I > prefer utf8 for the entire app. This https://docs.djangoproject.com/en/dev/ref/unicode/ would suggest that ma

Re: Internationalization and localization

2011-12-06 Thread Lachlan Musicman
There's no official support for translation of what you have in your DB - but that's because it's not a core need of most projects, coupled with the fact that there are a number of ways to do it, none of which are more correct than the other. For example - do you have a mirror db per language, or i

Re: How many Django web pages does it take . . .

2012-01-08 Thread Lachlan Musicman
On Sat, Jan 7, 2012 at 16:10, Alec Taylor wrote: > What you are talking about is a form. > > Form: https://docs.djangoproject.com/en/dev/topics/forms/ > Autocomplete: https://code.djangoproject.com/wiki/AutoCompleteSolutions > Unique fields: https://docs.djangoproject.com/en/1.3/ref/forms/validati

Re: How many developers have moved to class-based views?

2012-11-11 Thread Lachlan Musicman
I'm about to start transferring a few function based views, but like you am using a mix as needed as it stands. Re documentation, the docs on the dev stream have significantly more useful and comprehensive info for class based views. I think that there will always be a use for function based view

Re: Exporting tuple/dictionary within django html template

2012-11-12 Thread Lachlan Musicman
On Monday, November 12, 2012, Daniel Roseman wrote: > On Sunday, 11 November 2012 23:51:44 UTC, HA wrote: > >> Hi Folks, >> >> I want to export data from my named tuple within my django html template. >> Can someone please point me to an example or let me know how to >> accomplish this? >> I know

Re: How many developers have moved to class-based views?

2012-11-12 Thread Lachlan Musicman
On Monday, November 12, 2012, Tom Christie wrote: > If you're working with the generic CBVs, I would strongly recommend taking > a look at the documentation provided by the Classy CBV project - > http://ccbv.co.uk/. Because of the way it's auto-generated it allows you > to see at a glance exactly

Re: How many developers have moved to class-based views?

2012-11-12 Thread Lachlan Musicman
On Tue, Nov 13, 2012 at 4:07 AM, John DeRosa wrote: > > I use only function-based views. I've yet to read a compelling argument for > switching. I think the best argument goes something like: - if you have previously developed sites that are now stable or only require minor changes, and wont h

Re: ModelForm displays invalid cohice error.

2012-11-12 Thread Lachlan Musicman
On Tue, Nov 13, 2012 at 6:37 AM, Josue Balandrano wrote: > Hi, I am trying to create a very basic ratings and comments app. I have this > model: > > class Ratings(models.Model): > user = models.ForeignKey(UserProfile) > product = models.ForeignKey(Product) > rate = models.PositiveInteg

Re: ModelForm displays invalid cohice error.

2012-11-12 Thread Lachlan Musicman
ll have more luck with Jill's suggestion :) cheers L. > > El lunes, 12 de noviembre de 2012 13:41:01 UTC-6, Lachlan Musicman escribió: >> >> On Tue, Nov 13, 2012 at 6:37 AM, Josue Balandrano >> wrote: >> > Hi, I am trying to create a very basic ratings and

Re: Obtaining field name in template

2012-11-12 Thread Lachlan Musicman
On Tue, Nov 13, 2012 at 9:51 AM, Axel Rau wrote: > 1st trial with generic views: > > url.py: > url(r'^account/(?P\d+)/$', AccountDetailView.as_view(), > name='account-detail'), > > views.py: > class AccountDetailView(DetailView): > model = Account > > In the template, I get the data s

Re: Obtaining field name in template

2012-11-13 Thread Lachlan Musicman
On Wed, Nov 14, 2012 at 1:23 AM, Axel Rau wrote: > Am 12.11.2012 um 22:59 schrieb Lachlan Musicman: > >> On Tue, Nov 13, 2012 at 9:51 AM, Axel Rau wrote: >>> 1st trial with generic views: >>> >>> url.py: >>>url(r'^account/(?P\d+)/$

Re: Whats the point of having dicts in templates if one cannot access them by key?

2012-11-13 Thread Lachlan Musicman
I used the SortedDict datastructure :) https://docs.djangoproject.com/en/dev/ref/utils or /path/django-docs/ref/utils.html#django.utils.datastructures.SortedDict On Wed, Nov 14, 2012 at 4:40 PM, Juan Pablo Tamayo wrote: > Let me explain, I have a nested dictionary like: > > agenda = {'3': {'201

Re: Request for inspiration on business system

2012-11-20 Thread Lachlan Musicman
On Wed, Nov 21, 2012 at 8:37 AM, Peter Edström wrote: > Hello, Hi! > A company's internal business database system pretty much, and nothing new > under the sun. Perhaps accompanied by an external website further on. > Now on to the questions. > > Do you think Django would be suitable for this?

Re: Request for inspiration on business system

2012-11-21 Thread Lachlan Musicman
On Thursday, November 22, 2012, Peter Edström wrote: > *Lachlan Musicman:* > You recommend using virtualenv. Why and in what scenarios? If I understand > it correctly, virtualenv sets up a virtual python environment galvanically > isolated from the rest of the system and I see how thi

Re: Creating a torrent file & associated tracker through a django web app

2012-11-21 Thread Lachlan Musicman
On Wednesday, November 21, 2012, ashish makani wrote: > Hi Folks > > Following is a description of what i am trying to achieve : > > The user should log into a web app, select a file & be able to create a > torrent & a private tracker(http://IP_ADDRESS:PORT/announce) gets created > for that torren

SimpleListFilter is giving "NotImplementedError"

2012-11-22 Thread Lachlan Musicman
Hola, After successfully implementing two range based filters using the admin's list_filter docs: PATH/ref/contrib/admin/index.html#django.contrib.admin.ModelAdmin.list_filter I've added one more filter, but now I'm getting a NotImplementedError and I can't see what I've done wrong. The model ha

Re: SimpleListFilter is giving "NotImplementedError"

2012-11-22 Thread Lachlan Musicman
On Fri, Nov 23, 2012 at 12:06 PM, Tom Evans wrote: > On Thu, Nov 22, 2012 at 11:21 PM, Lachlan Musicman wrote: >> Hola, >> >> After successfully implementing two range based filters using the admin's >> list_filter docs: >

Re: SimpleListFilter is giving "NotImplementedError"

2012-11-22 Thread Lachlan Musicman
On Fri, Nov 23, 2012 at 12:17 PM, Lachlan Musicman wrote: >>> Hola, >>> >>> After successfully implementing two range based filters using the admin's >>> list_filter docs: >>> PATH/ref/contrib/admin/index.html#django.contrib.admin.ModelAdmin.list_

SimpleListFilter not returning expected list

2012-11-22 Thread Lachlan Musicman
Hola, Still with the same code base - now it's rendering, but I'm not getting the results I expect from the filter. A model with an 'island' field that's a choice list. I want to distinguish between one island in particular (Tarawa) and the rest (the Outer Islands). The results I'm expecting are

Comment user field

2012-11-22 Thread Lachlan Musicman
It should be obvious, but I can't quite grok how to set the comment user to request.user in the comments/form.html I have a copy of comments/form.html in my templates folder in which I've removed the email and the url fields, but now I want to either set the default and auto fill to the user name

Re: django 1.6.0: admin pages not using unicode methods declared in my model

2012-11-24 Thread Lachlan Musicman
I don't think you want unicode, I think you want: class Meta: verbose_name="Company" verbose_name_plural = "Companies" On Sun, Nov 25, 2012 at 8:27 AM, ajendrex wrote: > Hello, > > I following the tutorial and realized that the admin pages are not using the > __unicode__() methods declared

Re: Comment user field

2012-11-25 Thread Lachlan Musicman
On Friday, November 23, 2012, Lachlan Musicman wrote: > It should be obvious, but I can't quite grok how to set the comment > user to request.user in the comments/form.html > > I have a copy of comments/form.html in my templates folder in which > I've removed the email an

Confused about model save/update

2012-11-26 Thread Lachlan Musicman
Hi I have the following model: class Applicant(model.Models): ... successful = NullBooleanField() ... def mark_successful(self): self.successful = 0 self.last_change_by = request.user self.save(force_update=True) -- ...we look at the present day through a rear-view mirror. This is somet

Confused about model save/update

2012-11-26 Thread Lachlan Musicman
Hi Sorry about the last email - fat fingered it. For some reason I can't get the model.save() method to actually save the data I want it to. I have tried using both save() and save(force_update=True) without any joy. I have the following model: class Applicant(model.Models): ... successful = Nu

Re: Confused about model save/update

2012-11-26 Thread Lachlan Musicman
super(Applicant, self).save(*args, **kwargs) # Call the first save() method to get pk self.slug = slugify(str(self)) super(Applicant, self).save(*args, **kwargs) # Call the "real" save() method. Cheers L. > > Cheers > > Jirka > &g

Re: Confused about model save/update

2012-11-26 Thread Lachlan Musicman
ething new about Django and think I'm getting better, everyday it puts me back in my place :) cheers L. > > HTH > > Jirka > > -Original Message- > From: Lachlan Musicman > Sender: django-users@googlegroups.com > Date: Tue, 27 Nov 2012 11:07:42 > To:

Re: Can't undestrand Url pagination and template

2012-12-02 Thread Lachlan Musicman
On Sun, Dec 2, 2012 at 11:46 PM, joy wrote: > Hello, i'm new to Django and i'm still learning how to use it. I got a book > but somethings doesn't work, i cannot work with templates, and every advice > given from the book look not precise and obsolete (the book speaks about a > previous version of

Re: Help with manage.py sql

2012-12-02 Thread Lachlan Musicman
On Mon, Dec 3, 2012 at 1:43 PM, David Brotman wrote: > Hi: > > I am really new to django and I am going thru the online tutorial (polls) > app and I got to the point in the tutorial where I enter the command: > > python manage.py sql polls > > Nothing happens. No error message or anything else dis

Project path

2012-12-10 Thread Lachlan Musicman
Hola, I've got a split settings set up for my prod/dev sites, and in all the hints I've seen over the years, I've most appreciated the line at the top of the settings file that goes like this (there are variations to the theme): BASE_DIR = os.path.dirname(os.path.abspath(__file__)) But almost a

Re: Project path

2012-12-11 Thread Lachlan Musicman
I don't think I've ever got a more comprehensive and excellent response - cheers L. On Wed, Dec 12, 2012 at 4:25 AM, Bill Freeman wrote: > > > On Mon, Dec 10, 2012 at 8:59 PM, Lachlan Musicman wrote: >> >> Hola, >> >> I've got a split setti

Re: Django community, is it active?

2012-12-21 Thread Lachlan Musicman
On Thu, Dec 20, 2012 at 10:14 PM, peter wrote: > > There is no stupid questions. There are only stupid answers Hi, welcome to the Django community. Stupid answers is my role, I'm the stupid answers coordinator for the Django email list project. Nice to meet you! L. -- You received this message

Re:

2012-12-21 Thread Lachlan Musicman
Do you have the template_dirs setting in your settings.py pointing to project/app/templates/ ? On Sat, Dec 22, 2012 at 4:46 PM, vinoth kumar renganathan wrote: > i am new user to django .and i don't know how to add .html files > (template dirs ) to the apps folders .what are the things w

Re: Project Structure - Lots of scattered custom views

2013-01-07 Thread Lachlan Musicman
On Tue, Jan 8, 2013 at 9:52 AM, chad petzoldt wrote: > Right now my project only has 2 apps that use a database (*real* apps). The > rest of the website is composed of many custom views, scattered all over the > place. I am new to Django, and I havn't quite figured out how to structure > my projec

Re: Project Structure - Lots of scattered custom views

2013-01-07 Thread Lachlan Musicman
On Tue, Jan 8, 2013 at 10:30 AM, Lachlan Musicman wrote: > On Tue, Jan 8, 2013 at 9:52 AM, chad petzoldt wrote: >> Right now my project only has 2 apps that use a database (*real* apps). The >> rest of the website is composed of many custom views, scattered all over the >&g

Re: Project Structure - Lots of scattered custom views

2013-01-07 Thread Lachlan Musicman
> > There are some cases where they send me Indesign, but when I export to HTML > some of the layouts break. So then I have to manually rig it until I feel > its close enough (but then it turns out it wasn't, so I mod again). Some > imagemaps made from sliced up Photoshops with some cute rollover e

Re: Project Structure - Lots of scattered custom views

2013-01-13 Thread Lachlan Musicman
It had occurred to me that Django wasn't the right tool for this job - not everything is a nail :) cheers L. On Sun, Jan 13, 2013 at 10:21 PM, Amirouche wrote: > I don't see where Django makes things easier for you at all. Why no just use > static files and include a menu via Javascript and serv

Re: Status of open sourced Django Book?

2013-01-14 Thread Lachlan Musicman
On Tue, Jan 15, 2013 at 5:55 AM, Skip Montanaro wrote: > book (or tutorials). I'm rummage through the release notes and see what I > come up with. > > Or are new useful features more likely to be found in contributed > apps/modules? If so, how do I browse that environment? Is there some sort >

Re: print shop framework

2013-01-15 Thread Lachlan Musicman
It's just an online shop right? There are plenty of FLOSS frameworks and apps already written for online shops. http://www.satchmoproject.com/ or https://www.django-shop.org/ecosystem/ for instance. The hard work isn't in the construction of the site logic, it's the data entry (all the items, all

Re: print shop framework

2013-01-15 Thread Lachlan Musicman
ome numbers, depending on whether the entire order should have one design or not. IE the diff between 100 mugs having 1 design, or 100 mugs, 20 with design A, 50 with design B, 30 with design C. How to do it depends on exact needs, but I would extend something already developed. On Tue, Jan 15,

Re: ManyToOne or ManyToMany Confusion

2013-01-16 Thread Lachlan Musicman
Does Field.unique address your needs? ManyToOne may be the better solution...but without models to look at, it may require a validity check at save to confirm that each Pizza only had one of each type of Topping. Cheers L. On Thu, Jan 17, 2013 at 10:46 AM, acat...@gmail.com wrote: > I'm trying t

Documentation error report

2013-02-05 Thread Lachlan Musicman
Hola, I was just reading up on inlineformsets et al here: https://docs.djangoproject.com/en/dev/ref/forms/models/#django.forms.models.inlineformset_factory And noted that the modelformset_factory and inlineformset_factory both mention changes in Django 1.6 with a link to the release notes. Ther

Re: def __unicode__(self) in models.py is not working

2013-02-12 Thread Lachlan Musicman
On Wed, Feb 13, 2013 at 9:45 AM, David wrote: > I am working through the tutorial and find that the *def > __unicode__(self):* command to give an object a readable name in admin is > not working. I am cutting code from the tutorial. When I access the > detail screen in /admin/ all I see is [tab

RSS combinator

2013-03-07 Thread Lachlan Musicman
Hola, Does anyone know of a django app that would take a number of rss feeds >1 and turn it into a single blog feed/stream? Note, I don't want to create an rss feed of local content - I want to create an amalgam of other feeds. eg: take https://www.djangoproject.com/rss/community/blogs/ https:/

Re: RSS combinator

2013-03-07 Thread Lachlan Musicman
I think feedparser is what I'm after - then it's just a matter of wrapping a template around the results. It could be done with any template really... https://pypi.python.org/pypi/feedparser https://code.google.com/p/feedparser/ Cheers L. On 8 March 2013 14:50, Shawn Milochik wrote: > I doubt t

Re: Problems install/download Django 1.5

2013-03-14 Thread Lachlan Musicman
On 15 March 2013 06:51, wrote: > Sorry can't find a message from you in this newsgroup with any virtualinv > instructions. > > Or do you mean this link?: > https://pypi.python.org/pypi/virtualenv > > This text _is_ detailed with regard to virtualenv, but the combination with > apache/wsgi on debi

Changing User model

2013-03-17 Thread Lachlan Musicman
Hola, For a new project, I will be creating a separate Profile class for all information about my Users that isn't covered by User. One thing I did want though, was to change the login username to the email address. >From what I've read in the code and docs, am I right in presuming that I can s

Re: Changing User model

2013-03-18 Thread Lachlan Musicman
18 March 2013 22:59, Sanjay Bhangar wrote: > Hey L, > > On Mon, Mar 18, 2013 at 9:13 AM, Lachlan Musicman wrote: >> Hola, >> >> For a new project, I will be creating a separate Profile class for all >> information about my Users that isn't covered by User. &

Re: PostgresSQL or MySql with django?

2013-03-18 Thread Lachlan Musicman
On 19 March 2013 10:50, Russell Keith-Magee wrote: > On Tue, Mar 19, 2013 at 12:07 AM, Philip Goh >> In the end, if you're asking this question you can't go far wrong if you >> toss a coin and pick one. > > Much of a muchness? They *really* aren't. One of them is an actual database. > One of them

Re: Changing User model

2013-03-18 Thread Lachlan Musicman
On 18 March 2013 22:59, Sanjay Bhangar wrote: > Hey L, > > On Mon, Mar 18, 2013 at 9:13 AM, Lachlan Musicman wrote: >> Hola, >> >> For a new project, I will be creating a separate Profile class for all >> information about my Users that isn't covered by U

Re: Authentication with Email

2013-03-19 Thread Lachlan Musicman
On 20 March 2013 11:09, fire_water wrote: > Hi, > > I am fairly new to Django and have started building a website that will > require users to create an account with a username, email address, and > password. Users will log in with their email address and password, not > username. > > There has be

Re: Changing User model

2013-03-20 Thread Lachlan Musicman
Hey, since I've got this working, I was going to explain it. BUT, in teh intervening period, http://django-userena.org/ was bought to my attention - I will read that coe first and potentially use. cheers L. On 19 March 2013 12:29, Lachlan Musicman wrote: > On 18 March 2013 22:59

Re: PostgresSQL or MySql with django?

2013-03-21 Thread Lachlan Musicman
Frocco, No, he's saying you can have two databases set up at the same time. You can have X databases (I presume). Cheers L. On 22 March 2013 01:13, frocco wrote: > Hi Alan, > > so you are saying I should connect django to mysql first and then generate > the script. > Then connect django to post

Re: Data Structure - Orders and multiple items

2013-03-31 Thread Lachlan Musicman
On 1 April 2013 15:07, Eric Lovrien wrote: > I am not sure of how or the best way to structure my data in models.py. I > would like to have an order and allow multiple items / products to be added > to an order. I know I can do a ManyToMany field but not sure how I would > connect a qty to that. I

Re: question on howt to run phpadmin on my Django web app server.

2013-04-03 Thread Lachlan Musicman
It's an apache thing - it (vaguely, when distilled, my language may be incorrect) looks like this: browser - web server(apache/nginx) - app server (django/phpmyadmin) - database server I presume you are using some sort of Debian as you are on the RPI, in which case apt-get phpmyadmin should be a

New to testing

2013-04-10 Thread Lachlan Musicman
Hi I'm new to testing. Not to Django. To my shame. I'm trying to test some m2m signals connections, so I have a def test_parent_account_creation(self): jack = MaleAccountFactory() jill = FemaleAccountFactory() jack.parents.add(jill) self.assertIn(jill, jack.parents.all()) #w

Re: New to testing

2013-04-10 Thread Lachlan Musicman
On 11 April 2013 14:23, Mike Dewhirst wrote: > On 11/04/2013 2:02pm, Lachlan Musicman wrote: > > Inside your test class before writing tests you can have ... > > def setUp(self): > > jack = MaleAccountFactory() > jill = FemaleAccountFactory() &

Re: New to testing

2013-04-10 Thread Lachlan Musicman
On 11 April 2013 14:42, Lachlan Musicman wrote: > On 11 April 2013 14:23, Mike Dewhirst wrote: >> On 11/04/2013 2:02pm, Lachlan Musicman wrote: >> >> Inside your test class before writing tests you can have ... >> >> def setUp(self): >> >>

Re: New to testing

2013-04-10 Thread Lachlan Musicman
On 11 April 2013 14:48, Lachlan Musicman wrote: >>> On 11/04/2013 2:02pm, Lachlan Musicman wrote: >>> >>> Inside your test class before writing tests you can have ... >>> >>> def setUp(self): >>> >>> jack = MaleAccountFact

m2m symmetry confusion

2013-04-10 Thread Lachlan Musicman
Hi, I'm trying to implement a simple family tree type structure. I'm expanding on this example code base: https://github.com/mieows/familytree-django/blob/master/models.py (please ignore any errors in that models.py, I've addressed many of them) Ok, simply I have: class Account(models.Model)

Re: m2m symmetry confusion

2013-04-10 Thread Lachlan Musicman
On 11 April 2013 16:19, Lachlan Musicman wrote: > Hi, > > I'm trying to implement a simple family tree type structure. I'm > expanding on this example code base: > > https://github.com/mieows/familytree-django/blob/master/models.py > > (please ignore any errors

Re: m2m symmetry confusion

2013-04-11 Thread Lachlan Musicman
I tried reading the code in django/db/models/fields/related.py but quickly realised it was beyond me groking in a half hour. BUT, for some reason I felt compelled to test through the admin interface and it is working. ie, I can create and remove siblings and partners from each other, error free (s

Re: m2m symmetry confusion

2013-04-11 Thread Lachlan Musicman
Mike, thanks for your reply. On 11 April 2013 17:55, Mike Dewhirst wrote: > On 11/04/2013 4:41pm, Lachlan Musicman wrote: >> >> At the moment I have tables on the database: >> >> account_account >> account_account_parents >> account_accou

Re: m2m symmetry confusion

2013-04-11 Thread Lachlan Musicman
Sanjay! On 11 April 2013 18:00, Sanjay Bhangar wrote: > Lachlan, > > Not sure if I grokked your problem exactly, but just from personal > experience when I found my brain turned to jelly with a similar-sounding > issue before, I believe I found the answer in the "symmetrical=False" option > .. I

Re: m2m symmetry confusion

2013-04-11 Thread Lachlan Musicman
On 12 April 2013 08:43, Dennis Lee Bieber wrote: > On Thu, 11 Apr 2013 16:41:37 +1000, Lachlan Musicman > declaimed the following in gmane.comp.python.django.user: > >> # Relations >> parents = models.ManyToManyField("self", related_name='p', >>

Re: m2m symmetry confusion

2013-04-11 Thread Lachlan Musicman
On 12 April 2013 10:47, Matt Schinckel wrote: > > But a partner relationship is not at all related to a parent-child > relationship. Ah! But if you look at my original spec, I had the desire to track partners - I know it's not part of the parent-child relationship, but I did have the desire to tr

Re: What is Model Manager?

2013-04-17 Thread Lachlan Musicman
On 18 April 2013 10:10, cha wrote: > Hello how are you Great, thanks for asking! > I want to explain to me what is **"Model Managers"** in django ??? and What > are the useful ? They are a different way of collecting querysets of objects. Have you read the documentation to this end? https://d

Re: How to check for a specific field change in a model?

2013-04-18 Thread Lachlan Musicman
There is actually, via a third party app that makes it all dead simple, it's called django-model-utils and is available here: https://github.com/carljm/django-model-utils Credit where it's due, I discovered this wonderful module via PyDanny and Audrey's Two Scoops book. Cheers L. On 19 April 20

Django 1.6 doesn't install via pip

2013-06-30 Thread Lachlan Musicman
Hola, I read the release notes, and tried to install 1.6. I encountered this error: $ pip install Django==1.6b1 Downloading/unpacking Django==1.6b1 Could not find a version that satisfies the requirement Django==1.6b1 (from versions: 1.2.6, 1.3.6, 1.2.7, 1.2.3, 1.2.4, 1.4.4, 1.3.3, 1.2.1, 1.3.4

django-extra-views, NamedFormsetsMixin template syntax?

2013-07-21 Thread Lachlan Musicman
Hola, django-extra-views is a really good app for CBVs with FormSets (after I wasted hours on another solution). While reading the docs, I came across the NamedFormsetsMixin https://github.com/AndrewIngram/django-extra-views#other-bits-of-functionality which I thought looked nice, and implemente

Re: Any good books for learning django?

2013-07-26 Thread Lachlan Musicman
Ah, PyDanny and Audrey's Two Scoops is a great primer once you've done the excellent tutorial that is on the Django site https://django.2scoops.org/ I'm a very happy owner. L. On 27 July 2013 12:43, Yinka wrote: > Is there any hope that we'll ever get an up-to-date book for learning > Django?

Re: Where is CBV & Formset docs

2013-08-02 Thread Lachlan Musicman
You want Andrew Ingram's django-extra-views https://github.com/AndrewIngram/django-extra-views I did extensive research (ie, no coding) and django-extra-views looks to be the best of the options. Django core doesn't deal with teh cbv/formset problem very well (yet) - there are ways they can be ma

For those that do i18n and L10n

2013-08-04 Thread Lachlan Musicman
Here is an interesting paper on the use of FOSS in translation (in English, about Spanish) http://www.trans-int.org/index.php/transint/article/view/205/127 cheers L. -- We are like a drunk blundering through a crowd of pickpockets. That we are not poor and naked already is a testament to eithe

Re: upgrading to 1.5.1

2013-08-18 Thread Lachlan Musicman
Also, you should be upgrading to 1.5.2 - there's a serious security update. cheers L. On 18 August 2013 17:08, Mike Dewhirst wrote: > On 18/08/2013 4:51pm, Harjot Mann wrote: >> >> Hello Everyone >> Currently I am using django version 1.4.5 and I want to upgrade it to >> 1.5.1, I have an app in

<    1   2   3   4   5   >