Re: Problems creating django project in Windows 7

2012-03-08 Thread Matteius
I would like to weigh in on this discussion because I started out developing Django apps fairly platform agnostic in college, meaning that I worked on the apps on a variety of systems (although not too much on macs). My big project has been Django-Classcomm (http:// classcomm.googlecode.com/).

Re: Database connection closed after each request?

2012-01-15 Thread Matteius
practically negate such concerns as this one. -Matteius On Nov 20 2011, 8:45 am, Jonathan <jonathan.li...@gmail.com> wrote: > Does anyone know if this progressed anywhere since '09? -- You received this message because you are subscribed to the Google Groups "Django users&q

Re: Which IDE should I use for Django?

2011-12-22 Thread Matteius
PyCharm 2.0 has been released and I've been using PyCharm for over a year now with strong results. It is great to have an editor that can correct you and help auto-complete your code. -Matteius On Dec 19, 10:42 am, Masklinn <maskl...@masklinn.net> wrote: > On 2011-12-19, at 16:30 , An

Re: How to group models month by month.

2011-09-07 Thread Matteius
Post.objects.all().filter(pub_date__year=2005).select_related('model_name').order_by('- pub_date') # You could also order by count Post.objects.all().filter(pub_date__year=2011).order_by('count') Hope this helps, Matteius On Sep 6, 9:30 am, Yaşar Arabacı <yasar11...@gmail.com> wrote: > I alr

Re: Combining queries? A "join" in Python?

2011-08-27 Thread Matteius
straint2)) the_Bs = B.objects.all().filter(Q(constraint1) | Q(constraint2)) -Matteius Don't overlook how powerful this is because Django has Manager classes so you can make your constraints refer to both local properties and foreign key constraints as well as properties within the foreign key lookups.

Re: How to add CSRF to context when using test client???

2011-08-24 Thread Matteius
Thanks for both suggestions, I recently tried this approach and reached success when I ran my tests. So I think this is the correct approach and I'll include this CSRF style testing with my test suite now. -Matteius On Jul 7, 6:02 am, Craig Blaszczyk <masterja...@gmail.com> wrote: > c

Re: Django form validation.. does anyone else find it awkward??

2011-07-13 Thread Matteius
ch with form validation beyond what is default and beyond what I have included in my model definitions. Rendering forms and displaying any error messages is standard fare included in Django as far as I see it. -Matteius On Jul 12, 12:35 pm, Andre Terra <andrete...@gmail.com> wrot

Re: Possible interest in a webcast/presentation about Django site with 40mil+ rows of data??

2011-06-29 Thread Matteius
If I am unable to attend at the scheduled time I absolutely must watch the resulting recording. Thanks for your efforts. On Jun 22, 5:50 pm, "Cal Leeming [Simplicity Media Ltd]" wrote: > Nice! > > On Wed, Jun 22, 2011 at 11:39 PM, Thomas Weholt >

Re: How to add CSRF to context when using test client???

2011-06-10 Thread Matteius
go.test import Client > csrf_client = Client(enforce_csrf_checks=True) > > https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#testing > > 10.06.2011, 08:48, "Matteius" <matte...@gmail.com>: > > > > > Greetings, > > > I am writing unit test

Re: VERY cheap django hosting?

2011-06-09 Thread Matteius
I've been really happy with Valcato Hosting which has all that shell hosting shared goodness and a fast turn around on trouble tickets at excellent pricing: https://secure.valcato.com/aff.php?aff=070 -Matteius -- You received this message because you are subscribed to the Google Groups

How to add CSRF to context when using test client???

2011-06-09 Thread Matteius
Greetings, I am writing unit tests for my application, and I want to leave CSRF checks enabled in testing. This means on my POST I am getting 403 because I have not figured out how to add csrf to my context when using the test client. Please advise on how to most easily do this: #

Re: Our new startup site build on Django and GAE is now live!

2011-06-02 Thread Matteius
Yes I would appreciate a more integrated login approach or standard accounts. Facebook login is possible without having to give you access to post to my wall. Very restrictive in the current phase, but looks interesting underneath the login request. -Matteius On Jun 2, 4:05 am, Tom Evans

Re: Seeking a Django 1.3 and syslog configuration example

2011-06-02 Thread Matteius
# Configure Project Logging using Django Logging setting and specifying # Dict-Config to Python 1.6 LOGGING = { 'version': 1, 'formatters': { 'simple': { 'format': '%(asctime)s %(levelname)s %(module)s [%(name)s] - %(message)s \n', }, 'verbose': {

Re: Is there an HTML editor that's Django-aware

2011-05-25 Thread Matteius
I am pycharmed by pycharm. It is a very good way to edit Django models, views and templates. On May 24, 1:47 pm, shofty wrote: > why not use a python ide that is html aware? > pycharm by jetbrains is good. > > On May 24, 6:49 pm, AJ wrote: > > > > >

Re: Johnny Cache on Django 1.3

2011-04-04 Thread Matteius
Please keep us updated when a new release is available, I've had this on my list of things to try for a while. On Apr 4, 3:24 am, Daniel Hilton wrote: > On 4 April 2011 08:16, Charlie Offenbacher > > > > > > wrote: > > Hi everyone! > > >

Re: Seeking Django Counsel when adding a new model using South and a custom field for my ProtectedFileField subclass

2011-03-27 Thread Matteius
model is showing up. -Matteius On Mar 27, 4:04 pm, Ian Clelland <clell...@gmail.com> wrote: > On Sun, Mar 27, 2011 at 1:47 PM, Matteius <matte...@gmail.com> wrote: > > add_introspection_rules([], ["^student_portal\.fields > > \.ProtectedFileField&quo

Seeking Django Counsel when adding a new model using South and a custom field for my ProtectedFileField subclass

2011-03-27 Thread Matteius
ile path with Auth_Token support.") I've added the south specific code to models.py, __init__.py and as mentioned fields.py. from south.modelsinspector import add_introspection_rules # We need to add introspection rules to our custom fields for south to function properly. add_introspe

Question regarding formfield_for_foreignkey in admin.py

2011-03-20 Thread Matteius
I have an Announcement class in my project that has an author field. I have a custom formfield_for_foreignkey which gets all staff users for any super user, and I do the same thing for other staff users. Ideally however we could set this to be only the existing author (if any) or the current user.

Django Deploy Updates App.

2011-03-16 Thread Matteius
One of the things I've considered lately that I would like for my Django project is a Word Press like internal update tool. Something that would tie into the contrib admin and work to update the app from either a repository or a deployment file. This tool app would need to add new files, update

Re: How to Auto fill fields on Save in Django Admin?

2011-02-17 Thread Matteius
or clean_fields to exclude author so we can fill in on save. """ super(Announcement, self).clean_fields(exclude) # EndDef The problem is that it doesn't seem to exclude this field and I still get the error: "This field is required." On Feb 17, 1:55 pm, Matte

Re: How to Auto fill fields on Save in Django Admin?

2011-02-17 Thread Matteius
.za> wrote: > Hi Matteius, > > You must set blank=True in the model so that the form can be returned to you > with those fields empty and then you fill it in the save(). > >     pub_date = models.DateTimeField(blank=True) >     author = models.ForeignKey(User, blank

How to Auto fill fields on Save in Django Admin?

2011-02-16 Thread Matteius
I have an Announcement model that has two fields I want to auto-fill in when they are left blank (they are required fields with normal defaults). I have the following Code (simplified data listing for this post) THe Problem is that when I go to save an Announement in the admin with either of

Slammed Hard on Django Admin Queries with Tabular Inlines

2011-02-16 Thread Matteius
So I've been implementing the new Django 1.2 and 1.3 methods such as queryset in my admin.py for my Classcomm student models. All is going well, in the case of an Add/Edit DDO page I went from having 82/87 to 6/10 queries which makes things now much more tolerable. However I still have a concern

Re: Setting session variable at the time of login

2011-02-09 Thread Matteius
You may be interested in this school system django-classcomm: http://classcomm.googlecode.com/ demoed at http://classcomm.net/ I am the primary developer on this and I have JIRA project management and product backlog etc. so perhaps you would be more interested in working off an existing

Re: Looking for IDE + FTP

2011-02-09 Thread Matteius
on the machine with nano vim or emacs. Good Coding, Matteius On Feb 8, 9:44 pm, broz <theb...@gmail.com> wrote: > I've been curious about workflow with Django sites (or other > frameworks for that matter). I LOVE being able to remote edit. I can > see where this request is coming from. If

Re: Installing Django on Linux-Derbian using virtualBox on Windows 7 Machine

2011-01-21 Thread Matteius
I want to let you know that I have written some documents that could really help with precisely what you are trying to do: http://code.google.com/p/classcomm/wiki/CreateFromScratch Then you can demo my application and learn about deploying a Django based project for prod use here:

Re: Query Set involving Model Method

2011-01-16 Thread Matteius
try: gs=DinnerHost.objects.all().filter(complete()=True objects by default doesn't select anything, so either use objects.get(pk=var_pk) or the a-typical case all(). -Matteius On Jan 16, 7:04 am, rmschne <rmsc...@gmail.com> wrote: > Following is an extract of a Model I'm using.

Re: OpenToken Spec & Single Sign On

2011-01-07 Thread Matteius
Well since that is the case, why even use Django? Why not just do this conversion/forwarding using the existing Perl OpenToken library and deploy it to a cgi-bin? -Matteo On Jan 7, 2:17 pm, Justin wrote: > Matteo, > > Thanks for the response. I wish I could just use the >

Re: OpenToken Spec & Single Sign On

2011-01-07 Thread Matteius
I don't understand why you would need to use this for server-side authentication in the Django environment? So this OpenToken Single Sign-on appears to be more similar to Django's own django.contrib.auth, and django.contrib.sessions packages, and possibly even less secure (and less documented)

Re: Django model question from a newbee

2010-12-16 Thread Matteius
quot;)) 3.) Encrypting the password before storing it to the database is easy by calling the right Django method: User.objects.create_user(username, email, password) Hope this helps, Matteius On Dec 16, 6:47 am, Tom Evans <tevans...@googlemail.com> wrote: > On Thu, Dec 16, 2010 at

Re: Django model question from a newbee

2010-12-16 Thread Matteius
OK So these are UI issues and how you are saving Users to the database. The database field itself is a CharField. 1.) To hide form elements add a tupple inside the FormField under class meta like so: class CasUserForm(ModelForm): exclude = [field1, field2] 2.) On Dec 16, 6:39 am, Reino

Re: Controlling File Downloads.

2010-12-15 Thread Matteius
the Internet. This is the best approach because the files are severed off the web server pretty much like any static overheard file. Then in your view code you check a User's permission to the file before generating them the time-sensitive URL. Cheers! Matteius On Dec 15, 5:16 am, "euan

Re: how to do Query profiling of views called from AJAX calls?

2010-11-26 Thread Matteius
Have you tried using Firebug Firefox Add-on? On Nov 25, 3:46 pm, ydjango wrote: > Django debug and django debug tool bar are not capturing the django > ORM calls made from the views which are called via AJAX calls in the > page . Is there any way to profile these sqls and

Re: Trying to determine the duplicate SQL queries from my view code

2010-11-02 Thread Matteius
requested course and set the course_id course = enrollment.course.id course_id = course.id which reduces the number of SQL queries by 1 each page request or shaves off about .4ms per page view. -Matteius On Nov 1, 1:24 pm, Matteius <matte...@gmail.com> wrote: > In

Trying to determine the duplicate SQL queries from my view code

2010-11-01 Thread Matteius
In this case there is no form POST data so that code gets skipped. I started profiling with the django_debugger_toolbar and my SQL data results are at the bottom. There are duplicate SQL select statements for handin_course and auth_user which doesn't make sense to me as I understand how views

Re: how to develop cms on django

2010-10-30 Thread Matteius
Please try out Live Demo for Django CMS Classcomm ... http://code.google.com/p/classcomm/ and http://classcomm.geekshack.net/handin/ On Oct 29, 1:47 pm, Oivvio Polite wrote: > > i dont have time i need to start development within  a month.. > > > plz tell me all those crucial