Re: update_or_create() always creates (or recreates)

2015-11-06 Thread Dan Tagg
f you get to the end of processing your scraped data and the modified flag has not been set to True. Dan On 6 November 2015 at 16:12, Yunti <bkga...@gmail.com> wrote: > Hi Dan, > > Thanks for the suggestion, it's a web scraper (run as a django management > command) which then saves t

Re: update_or_create() always creates (or recreates)

2015-11-06 Thread Dan Tagg
set in the form or your model, compares it to the instance's data in the database and only saves if there has been some kind of change. Dan On 6 November 2015 at 13:47, Yunti <bkga...@gmail.com> wrote: > Jani, > > Thanks for your reply - you explained it much more conci

Re: custom managers and migrations

2015-10-05 Thread Dan Tagg
Obviously a difficult question... On Saturday, 3 October 2015 23:54:24 UTC+1, Dan Tagg wrote: > > Hi, > > I'm using django 1.8.4. > > 1. I have added a field "deleted" to a couple of models so that when the > delete button is pressed, to all intents and purpos

custom managers and migrations

2015-10-03 Thread Dan Tagg
deep_deconstruct path, args, kwargs = deconstructed ValueError: too many values to unpack (expected 3) The 5 deconstructed values that are causing the problem are False conciliation_resources_db.managers.AllAnnotationManager None () {} The object whose deconstruct method is causing the problem is

Re: Oracle XMLType and AES_Encrypt() field

2015-09-15 Thread Dan Davis
Indeed. That works. On Tuesday, September 15, 2015 at 2:49:06 PM UTC-4, Carl Meyer wrote: > > On 09/15/2015 12:44 PM, Dan Davis wrote: > > I'm wondering how I would get python to run an interactive shell similar > > to what I'd get from running ./manage.py shell. &g

Re: Oracle XMLType and AES_Encrypt() field

2015-09-15 Thread Dan Davis
On Saturday, September 12, 2015 at 2:23:15 PM UTC-4, Carl Meyer wrote: > > Hi Dan, > > ... ... Yes, this is possible, and not even that hard (at least in Django 1.8, > where Field classes gained more control over SQL generation; I suspect > it would be quite a bit more dif

Oracle XMLType and AES_Encrypt() field

2015-09-12 Thread Dan Davis
I'm working on a Django project template to be used by a sub-department of my employer. We are an Oracle shop, and make reasonably heavy use of Oracle's XMLType.Another issue that has come up is encryption. It is trivial to create an EncryptedTextField field type. What I want to do is

Downloading Django

2015-07-24 Thread Dan Elbert
I am having some trouble installing Django. The installation documentation is great and I have downloaded Python version 3.4.3 for OS X but can't seem to complete the download. I am new to programming so most likely its user error. Any help or direction would be great. Thanks Dan -- You

Re: Two Things: (1)-ModelChoiceField with a searchbox and (2)-Related Dropboxes

2015-07-15 Thread Dan Tagg
Select2 can do this https://select2.github.io. Other alternatives are available too. Dan On 13 Jul 2015 4:27 pm, "Miguel Pereira Legal" <legal.mig...@gmail.com> wrote: > I have this two questions: > > I am trying to write a small stock management system, and I am findi

Re: Why sqlite time is different from my settings.py TIME_ZONE?

2015-06-02 Thread Dan Tagg
database you are using, Django always stores datetimes as UTC. What version of Django are you using as timezone awareness is different for different versions. Dan On 2 June 2015 at 07:23, Hyunseo Yang <hsinh...@gmail.com> wrote: > > I'm using Sqlite for my project database. > I need date

Re: Using multiple form in Class Base View (CBV)

2015-04-09 Thread Dan Gentry
To modify the generic CBVs to handle two forms would mean changes in many of the base classes and mixins, including ProcessFormView, FormMixin, and BaseFormView. It would make more sense to start with the View base class and roll your own methods. If this is a one-off, I would probably keep

Re: How to supply parameters to "python manage.py syncdb" from a script?

2015-03-23 Thread Dan Dong
Thanks Russell, that's clear now. Cheers, Dan 在 2015年3月20日星期五 UTC-5下午6:27:12,Russell Keith-Magee写道: > > > On Sat, Mar 21, 2015 at 5:25 AM, Dan Dong <dong...@gmail.com > > wrote: > >> Hi, >> Does anybody know how to supply the input parameters to "pyth

Supply parameters to "manage.py syncdb" from a script?

2015-03-20 Thread Dan Dong
x Password: x Password (again): x Cheers, Dan -- 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, send an email to django-users+unsubscr...@googlegroups.com. T

How to supply parameters to "python manage.py syncdb" from a script?

2015-03-20 Thread Dan Dong
ord (again): xx Cheers, Dan -- 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, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send e

Re: Fixing a poorly written Django website (no unit tests)

2015-03-04 Thread Dan Gentry
No need to test the Django provided logic, but I like to write a few tests for each view that check the permissions, urls, updates, etc. More of a functional test than a unit test. I find that when these tests fail it is usually something changed somewhere else in the app. For example, a

Re: ListView and Deleteview

2015-02-02 Thread Dan Gentry
This is a bit of a stumper! I don't see any big glaring issues. A couple of housekeeping things: Is there data in the table? Are you certain that you are using the correct template? -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Django Class-Based CreateView and UpdateView with multiple inline formsets

2015-01-10 Thread Dan Gentry
I would suggest that in the UpdateView you should set the object to the master record being updated rather than to none for both get() and post(). On Saturday, January 10, 2015 at 8:08:47 AM UTC-5, Ranjith Kumar wrote: > > Hello all, > I have been trying to do Django class-based CreateView

Re: CBV with inline formset

2014-12-15 Thread Dan Gentry
I created a couple of mixins for a project that might help you. See this gist: https://gist.github.com/dashdrum/03858d79ddfd9bba44d6 Pretty easy to use. Here's an example Create view: class RegistrationView(FormsetCreateMixin,CreateView): template_name =

How can I add an attribute to each option in a django model form containing a foreign key?

2014-12-15 Thread Jonathan Dan
/27474719/1011154 ) Best regards Jonathan Dan -- 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, send an email to django-users+unsubscr...@googlegroups.com. To post to this g

Re: modelformst save

2014-12-11 Thread Dan Gentry
While your form_invalid method is looking for reference_form as a parameter, the post method by default passes the form from get_form(form_class). I would recommend overriding post to pass both form and reference form to form_invalid and form_valid. Best of luck, Dan -- You received

Re: Django Project Website inaccesible

2014-10-27 Thread Dan
Thanks for all the replies. I have no problems connecting to anything else, only the Django Project site. At least I know now it's on my end. -- Dan -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

Django Project Website inaccesible

2014-10-27 Thread Dan
to fix it? -- Dan -- 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, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to dj

Backwards migrations on a single app (Django 1.7)

2014-10-05 Thread Dan
I am trying to migrate backwards on 1 app using: ./manage.py migrate app_name 0001 But it it is migrating all apps back to 0001 Am using django 1.7 am i doing something wrong? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

import django fails, what should I look at?

2014-07-19 Thread Dan Bikle
Hello World, I'm curious about working with the dev-version of Django. I want to get skilled at using Django, Python 2.7.8, and virtualenv together. I see this page: https://github.com/django/django/blob/master/INSTALL I installed python and then virtualenv: d...@cen113.dan ~ $ which python

I solved it...

2014-07-19 Thread Dan Bikle
irectory to Python's site-packages directory. The "django" directory is INSIDE the django repository. The "django" directory is NOT the django repository. " Dan -- You received this message because you are subscribed to the Google Groups "Django users" group.

Application Generators Comparison and Benefits list

2014-07-07 Thread Dan Cancro
. Thanks, Dan -- 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, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to dj

Re: UpdateView, ModelForm - form not redirecting problem

2014-06-01 Thread Dan Gentry
What does it do instead? > -- 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, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to

Re: Importing Existing Oracle Databases

2014-05-18 Thread Dan Gentry
I would suggest the managed option in the Meta class of the model. Setting this to false will stop Django from trying to create the table, and it will instead expect it to already be available. Also, the db_table option can be used if the name of your model is different than the existing

Re: How would you do this cleanly in Django (remembering the states of check boxes in multiple pages)

2014-05-09 Thread Dan Gentry
I would setup a data structure keyed off the session ID (or maybe a logged in user ID) that stored the transaction in progress for the user. As the user went through the pages this data would be used to display what has already been selected and be updated for each screen. I suppose that one

Referring to the page -- https://docs.djangoproject.com/en/1.6/intro/tutorial01/

2014-03-26 Thread Dan Sveaver
https://docs.djangoproject.com/en/1.6/intro/tutorial01/ I've looked at this several times, and I was hoping to get the proverbial set of extra eyes. I made it almost to the bottom of the page, but while I'm in the Python shell, I type the following: >>> p = Poll.objects.get(pk=1) >>>

Re: Dreamhost for Django hosting.

2014-03-09 Thread Dan Gentry
I've had good luck hosting an app with a Dreamhost shared hosting account. I even wrote a post about it a couple of years ago. (Maybe I should update it for 2014) http://dashdrum.com/blog/2011/08/django-on-dreamhost/ On Saturday, March 8, 2014 11:53:54 PM UTC-5, Chen Xu wrote: > > I am

Re: installing django trunk

2014-03-08 Thread Dan Gentry
Malik, in order to install within your virtualenv, you should activate it first /bin/activate . Then run the pip install command. Cheers! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: saving to two models from one class view

2014-01-14 Thread Dan Gentry
With a formset, like your application form, the template could look like one of these examples: {{ formset.management_form }} {% for form in formset %} {{ form }} {% endfor %} {{ formset }} (found on

Problem detecting language selection

2013-12-18 Thread Dan Sellars
is the first entry on my accept-language header. Have anyone else faced this problem? Cheers, Dan. -- 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, send an email to django-user

new project: django-mini-lean. no more excuses for not split testing!

2013-10-02 Thread Dan Ancona
term contract work. My ideal role isn't just writing code: I like a little evangelism, customer or product development, UX or even tech sales along with it. Hope this isn't against list protocols. Thanks, enjoy and please let me know if you have any questions or feedback about mini lean! Dan

Re: What is the best way to have multiple admin users with there own models?

2013-09-06 Thread Dan Gentry
I would write views for the client to access their tables rather than using the built-in admin. Your situation is not really what the admin was designed to do. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group

Re: verify before make changes?

2013-09-01 Thread Dan Gentry
Seems to me your call to get_object_or_404() would effectively check for the object's existence. > > -- 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, send an email to

Re: I really about to give up Django

2013-08-30 Thread Dan Gentry
Just my opinion, but I see no reason to use English names in models. Use whatever you wish. English speaking programmers have been using cryptic variable names for decades. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: Script to move django 1.4.3 to 1.5.1

2013-08-30 Thread Dan Gentry
I've been using Django since v1.0, and when each major version is released, I run through the release notes to see what I need to change. Russell is correct that most things will work from one version to the next, but I like to keep as up to date as possible to minimize my risk of hitting a

Re: OperationalError: unable to open database file

2013-08-30 Thread Dan Gentry
When using sqlite3, one has to provide a full path to the database file. For my projects I use something like this on my development machines (for a database file named 'db'): import os PROJECT_DIR = os.path.dirname(__file__) DATABASES = { 'default': { 'ENGINE':

Re: Iterating over fields in Formset

2013-08-11 Thread Dan Gentry
What is the purpose of checking test.id for a value of 3 or 6? -- 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, send an email to django-users+unsubscr...@googlegroups.com. To

Testing with legacy data

2013-08-08 Thread Dan Gentry
I'm not a fan of testing with actual data, except maybe as a final run to make sure no existing data breaks something or for stress testing with large amounts of data. Your legacy DB will not cover all of the possible cases that need to be tested in your code. Instead, write quality unit

Re: more testing questions

2013-07-09 Thread Dan Gentry
1) I've been using Factory Boy to create test data rather than fixtures. It is so much easier to ensure that I know exactly what data is available for a given test. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: Class Based CreateView with foreign key question

2013-06-13 Thread Dan Gentry
I use the same pattern in my application, and it works just fine. def dispatch(self, *args, **kwargs): self.tc = get_object_or_404(TrainingClass, pk=kwargs.get('class_id', None)) return super(TrainingScheduleCreateView, self).dispatch(*args, **kwargs) def

Re: Handling delete and ability to support undo

2013-05-15 Thread Dan Gentry
A couple of thoughts: Override the delete() method in your model to set the flag to True rather than delete the record. Write a manager that filters out the 'deleted' records. Use it for every query, except those used to retrieve or undo. On Monday, May 13, 2013 3:07:16 PM UTC-4, Subodh

Re: Multi-tenant database model with new user model?

2013-05-01 Thread Dan Gentry
Something I'm looking forward to learning as well. My app uses the older user_profile approach. -- 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, send an email to

Re: Aggregate on part of a date field?

2013-04-21 Thread dan
Please do not license your code with GPL. On Thursday, September 9, 2010 12:38:19 AM UTC+2, sebastien piquemal wrote: > > I created a library to address this kind of problems : > http://code.google.com/p/django-cube/ > > It bases the aggregation on a multidimensional view of your data (a >

Re: Adding context data to a TemplateView?

2013-04-04 Thread Dan Gentry
Roy, I agree with Fallen that a subclass of TemplateView is required here. I have used this technique often. Dan class MyTemplateView(TemplateView): template_name = 'my_template.html' def get_context_data(self, **kwargs): context = super(MyTemplateView, self).get_context_data

Re: Django throws ImproperlyConfigured error when loading URLconf on startup

2013-03-24 Thread Dan Gentry
Andrei, I once received this error when the problem was actually in another python module being imported - in my case views.py. Hope this helps, Dan -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

Re: Django 1.5 CBV - DeleteView - CustomQuery

2013-03-24 Thread Dan Gentry
Agree with Tom that ccbv is a great resource for help with CBVs. In fact, I used it to help me with this comment. I would probably override the delete() method in DeleteView to do what you want to do. The original justs deletes the record and redirects to the supplied URL: 1. def

Re: My Data dont be updated with my forms

2013-03-16 Thread Dan Gentry
the error. Just to check, add {{form.errors}} to your template and give it a try. Best of luck, Dan -- 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, send an email

Re: Django & Oracle connection problem

2013-01-25 Thread Dan Gentry
You've probably already tried the simple things: - Confirm that the server name and port are correct. - Ensure that firewall/routing rules will allow the connection. - Try a simple connection on the same box with sqlplus. Walking through this list has helped me a number of times.

Re: debugging issues with settings.py and database (postgres) and syncdb

2012-12-27 Thread Dan Richards
Yes indeed! That was it. I am following a tutorial for getting things running on a Heroku platform and that seems to be something special for that environment. Thank you!! On Thursday, December 27, 2012 12:52:57 PM UTC-5, donarb wrote: > > On Thursday, December 27, 2012 8:51:11 AM UTC-

Re: debugging issues with settings.py and database (postgres) and syncdb

2012-12-27 Thread Dan Richards
Yeah, psycopg2 is definitely installed... On Thursday, December 27, 2012 9:03:31 AM UTC-5, ke1g wrote: > > > > On Thu, Dec 27, 2012 at 8:26 AM, Dan Richards <roda...@gmail.com > > wrote: > >> Hmmm...well that isn't working either - same error. My method for

Re: debugging issues with settings.py and database (postgres) and syncdb

2012-12-27 Thread Dan Richards
cess problem with the DB. > > > On 26 December 2012 13:18, Dan Richards <roda...@gmail.com > >wrote: > >> NO, just me messing around that it made no difference. I have the db >> access to all and trust and the error doesn't change no matter what I use >> ther

Re: debugging issues with settings.py and database (postgres) and syncdb

2012-12-26 Thread Dan Richards
which I can do... On Wednesday, December 26, 2012 12:40:28 PM UTC-5, Dan Richards wrote: > > First off, I am a newbie to django, python and postgres - so I suspect I > am missing something obvious, but I am stumped. Any ideas will be > gratefully accepted... > > I get the p

debugging issues with settings.py and database (postgres) and syncdb

2012-12-26 Thread Dan Richards
First off, I am a newbie to django, python and postgres - so I suspect I am missing something obvious, but I am stumped. Any ideas will be gratefully accepted... I get the popular "Improperly configured settings.DATABASES" error message when I run syncdb on my test app. I am running: django

Re: memory leak? Am I taking crazy pills?

2012-11-26 Thread Dan Ancona
omponent we're using (mainly pymongo and BigML), but any other thoughts on how I could track this sucker down? I'd love to have complete confidence that it's not leaking running locally at least. Thanks! Dan On Nov 23, 2012, at 12:30 PM, akaariai wrote: > > > On 22 marras, 0

Re: memory leak? Am I taking crazy pills?

2012-11-23 Thread Dan Ancona
Sorry, forgot to mention. Debug is definitely set to False! On Nov 22, 2012, at 7:44 AM, Tom Evans wrote: > On Thu, Nov 22, 2012 at 6:27 AM, Dan Ancona <afightingfa...@gmail.com> wrote: >> python 2.7.3, django 1.4.2 >> >> Our app (a fairly simple tastypie API that run

memory leak? Am I taking crazy pills?

2012-11-22 Thread Dan Ancona
rbage", gc.garbage return HttpResponse('hi') And even that, after a couple reloads, dumps a huge mess, the beginning of which is below. Looks like the whole heap. Any idea what might be going on here or what my next steps are? Thanks! Dan Uncollectab

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

2012-11-12 Thread Dan Gentry
It took me a few months to warm up to using class based views, and it was the pending decommissioning of the generic function based views that first caused me to take a look. Now, I have converted all but the most complicated views to the class format (why change what works?). Any new work I

Re: tutorial first step. -ImportError: No module named django.core-

2012-11-09 Thread Dan Gentry
Quick note: when using virutalenv on Windows, one runs the activate script to use the environment. \Scripts\activate.bat Same function as the source command in Linux. Dan Gentry >> -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Reverse of admin:jsi18n

2012-11-08 Thread Dan Gentry
Correction: My URL tag does not include the quotes. Should be: {% url admin:jsi18n %} -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/ifbpxbJtw_wJ.

Reverse of admin:jsi18n

2012-11-08 Thread Dan Gentry
. Thanks, Dan Gentry -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/WUsQvc_QxKAJ. To post to this group, send email to django-users@google

Re: Django testing strategy

2012-10-05 Thread Dan Gentry
I've been using factory-boy as of late, and have found it to be a great way to setup each test exactly as I need it. Fixtures aren't bad either, but working with a large amount of data can make it difficult to predict the proper output for a test, and changes to this data to accommodate a new

Re: save() got an unexpected keyword argument 'force_insert'

2012-09-25 Thread Dan Gentry
To address the original question, I saw a similar error when overriding the save() function of a model. The solution was to include *args and **kwargs in the function definition: def save(self,*args, **kwargs): # your custom code here # super(MyModel, self).save(*args,

Re: Alternatives to CBVs (class based views)

2012-09-13 Thread Dan Gentry
It would be helpful to see some more complex examples with these classes. One thing I like about the CBVs is that they include all of the necessary code for common functions. I have used them extensively (once I figured them out). On Wednesday, September 12, 2012 12:59:12 PM UTC-4, Cal

Re: complicated permissions

2012-09-10 Thread Dan Gentry
> > Complicated indeed! > I once worked on a similar project that tackled the first 2 requirements as part of a multi-tenant application, storing both the userID and company ID for each detail record (content). Plus, the user profile was extended to tie a User record to one or more

Re: Issue Deploying Django

2012-08-03 Thread Dan Gentry
Agreed that virtualenv will allow you to install python packages - however not any linux/unix packages. I have no problems using Django on Dreamhost. http://dashdrum.com/blog/2011/08/django-on-dreamhost/ On Thursday, August 2, 2012 10:34:35 PM UTC-4, trevorj wrote: > > You are trying to

Re: form.save() fails silently - how to debug?

2012-07-27 Thread Dan Gentry
I too am a little confused by the clean() method and the data_set field. It seems that the data_set would contain a copy of the ID value for a change operation, and be None for an add. What purpose does that serve? Perhaps comment the clean() method just to see if the other fields can be

Re: I can not install Django on Windows7

2012-07-18 Thread Dan Gentry
Do you have the proper level of security on the machine to install software? On Wednesday, July 18, 2012 8:50:48 AM UTC-4, Владислав Иванов wrote: > > when I run the installation of Django python setup.py install - comes at > the end of an error that can not be put Django in C: \ Python27 \ Lib

Re: Catching Oracle Errors

2012-07-11 Thread Dan Gentry
Thanks Ian. I'll see what I can do. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/EYbdNNR4bS8J. To post to this group, send email to

Catching Oracle Errors

2012-07-10 Thread Dan Gentry
My Django app runs on an Oracle database. A few times a year, the database is unavailable because of a scheduled process or unplanned downtime. However, I can't see how to catch the error and give a useful message back to the requester. Instead, a 500 error is triggered, and I get an email

Re: setting up django with virtualenv on windows7

2012-06-25 Thread Dan Johnson
On 06/25/2012 03:12 PM, mymlyn wrote: i started a topic on stackoverflow, analysing responses on SO, on similar topics, im not really sure wether ill get any feedback there so im gonna try here :) described my problem here:

Re: How to setup Python 2.7 and Virtualenv on a shared host with no root access?

2012-06-15 Thread Dan Santos
commands so I can compile my chosen Python version. And then continue with running your procedure. //Dan On 5/25/12, darwin31 <luizc...@gmail.com> wrote: > I forgot to say something important. In order to make such changes > permanent you will need to insert in the END of you ~/.

Re: How do you install Django on a shared hosting without root access?

2012-05-17 Thread Dan Santos
0 sh-3.2$ On Thu, May 17, 2012 at 10:27 AM, Alec Taylor <alec.tayl...@gmail.com>wrote: > You could wget/curl over a version of > http://code.google.com/p/pts-mini-gpl/wiki/StaticPython > > On Thu, May 17, 2012 at 6:21 PM, Dan Santos <dansanto...@gmail.com> wrote: &

Re: How do you install Django on a shared hosting without root access?

2012-05-17 Thread Dan Santos
Klein wrote: > > What host? > > > thanks > > --jerry > > On Sun, May 13, 2012 at 2:49 PM, Dan Santos <dansanto...@gmail.com> wrote: > >> I forced my local web host (twisted their arm) and the day after they >> created a new procedure for s

Re: How do you install Django on a shared hosting without root access?

2012-05-13 Thread Dan Santos
I forced my local web host (twisted their arm) and the day after they created a new procedure for setting up Django without having to use root access. Problem solved :) On Saturday, May 12, 2012 8:39:27 PM UTC+2, Dan Santos wrote: > > Hi I'm confused about how to setup Django on my

How do you install Django on a shared hosting without root access?

2012-05-12 Thread Dan Santos
Hi I'm confused about how to setup Django on my shared hosting account without using root. They don't have Django or Python support so I will have to install everything from scratch I guess. Do I install things in this order for shared hosting, or have I messed up the order when not using

Re: How to setup Python 2.7 and Virtualenv on a shared host with no root access?

2012-05-12 Thread Dan Santos
Thanks for the tips they will come in handy in the future! :) It seems like my web host did a kernel update or something and then gcc disappeared because it worked before. But they have fixed that problem now. So here's my real problem. dan@debian:~$ *cat .bash_aliases * alias py27='/home

authentication/registration state of the art

2012-05-09 Thread Dan Ancona
and what else would you think about? Thanks so much! da Dan Ancona Founder Democracy Dashboard demdash.us/DanAncona m 415.373.8972 -- 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@google

Re: Django timezone doesn't show the right time?

2012-05-02 Thread Dan Santos
Thanks! I guess that I will see the light once I get to part 3 of the tutorial. Thanks for the pointer now I understand the big picture. On Monday, April 30, 2012 10:03:25 PM UTC+2, Dan Santos wrote: > > Hi I'm a total programming newbie! > > ### INTRO ### > I have

Re: Django timezone doesn't show the right time?

2012-05-01 Thread Dan Santos
finding if I have mis-configured something. http://www.python-forum.org/pythonforum/viewtopic.php?f=19=34082 On Tuesday, May 1, 2012 3:16:33 PM UTC+2, akaariai wrote: > > On Apr 30, 11:03 pm, Dan Santos <dansanto...@gmail.com> wrote: > > Hi I'm a total programmi

Django timezone doesn't show the right time?

2012-04-30 Thread Dan Santos
Hi I'm a total programming newbie! ### INTRO ### I have been following this tutorial and the timezone outputs confuses me. https://docs.djangoproject.com/en/1.4/intro/tutorial01/#playing-with-the-api And I'm still confused after reading these explanations, I basically need some really dumbed

Re: Why using Generic Views?

2012-04-04 Thread Dan Gentry
I use generic views - either function or class based - for the common functionality in my apps. As Serge mentioned, a list works pretty much the same in every application, so I just provide a few parameters to a generic view. More complicated forms still require custom code. On Apr 3, 1:07 am,

Re: where do you host your django app and how to you deploy it?!

2012-04-04 Thread Dan Gentry
Dreamhost shared account http://dashdrum.com/blog/2011/08/django-on-dreamhost/ -- 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

Re: Will Django run on z/linux?

2012-03-16 Thread Dan Poirier
On Fri. 2012-03-16 at 01:06 PM EDT, jc wrote: > We have a number of z/linux (z/vm s390) Linux servers and would like > to consider porting this application to one of the instances. Will it > run on z? It's Linux, so sure. (Now z/OS would be another story...) -- You

Re: auth groups puzzle

2012-02-04 Thread Dan Gentry
I've solved this problem in an app, but not with the built-in permissions system. Instead, I created a DB structure that links users to companies and stores the r/w status for each. On Feb 3, 12:58 am, Mike Dewhirst wrote: > I want to use the built-in auth_groups

Re: failing django install on dreamhost

2012-01-29 Thread Dan Gentry
I'm going to guess that maybe there is a syntax in one of the lines preceding this one. Could you share the entire DATABASE session of your settings file? FYI, I have written a more up to date procedure for running Django on Dreamhost - built on the great posts by Jeff Croft and others.

Re: Help with new version of django

2012-01-29 Thread Dan Gentry
I agree with Aaron. I upgraded 5 apps from v1.0.4 to 1.3 earlier this year, and it was pretty easy after reviewing the release notes. Moving to class based views (to replace generic views) was not required for 1.3, but I had fun and learned quite a bit. On Jan 28, 7:35 pm, Aaron Cannon

Re: Apache RewriteRule for django

2012-01-02 Thread Dan Poirier
On Mon. 2012-01-02 at 07:23 AM EST, Bob Kline wrote: > So, my .htaccess file looks just like that (with "mysite" replaced > with the real name of the script). The part I don't understand is the > slash between the script name and the placeholder $1. The way the > filesystem

Re: Constraints on a one-to-many relationship and related problems

2011-12-28 Thread Dan Gentry
: old_billing_address = Address.objects.filter(customer=self.customer).filter(billing_flag= True) for s in old_billing_address: s.billing_flag = False s.save() super(Address, self).save() Hope this helps, Dan On Dec 28, 6:02 am, Bart Nagel &l

Re: Django open source cashflow management app

2011-12-25 Thread Dan Poirier
On Thu. 2011-07-28 at 10:33 AM CDT, Derek wrote: > On Jul 28, 5:27 am, zodman wrote: >> the app is back :) > > Oops! Google Chrome could not find misgastos.zodman.com.mxits > > Looks like: > http://misgastos.zodman.com.mx/ > is the correct URL! I guess

Re: Redirect from get_queryset() in a class view?

2011-12-12 Thread Dan Gentry
filter(institution=self.kwargs['institution']) Hope this helps. Dan On Dec 10, 1:51 pm, Eli Criffield <elicriffi...@gmail.com> wrote: > So in a class based view inheriting generic.ListView I want to redirect on > a condition, The logical place to do it is get_queryset, but you can't go > r

Re: converting from function based views to class based views

2011-12-12 Thread Dan Gentry
I can't test this, but the code below may do what you want. (I learned this stuff from Reinout's blog posts) # urls.py (r'^tags/(?P[a-zA-Z0-9_.-]+)/$', djangoblog.tag_views.TagDetailListView.as_view()) # views.py from django.views.generic import ListView class TagDetailListView(ListView):

Saving a blank OneToOne inline in the admin

2011-12-09 Thread Dan Lipsitt
is created twice, it looks like). What can I do to make this scenario work whether the inline is touched or not? Thanks, Dan -- 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@google

Re: Massive import from CSV to Database

2011-11-12 Thread Dan Poirier
There are some ways to make large data imports much faster. See e.g. http://www.caktusgroup.com/blog/2011/09/20/bulk-inserts-django/ Dan -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: CAS and Django cache

2011-10-27 Thread Dan Julius
Couldn't that potentially overwrite a value set by a different thread? Dan On Thu, Oct 27, 2011 at 7:13 AM, Kurtis Mullins <kurtis.mull...@gmail.com>wrote: > umm, I'm not sure if "check-and-set" is some cache-specific lingo or not. > But if you want to see if a value i

Re: Getting into professional django development

2011-10-18 Thread Dan Gentry
With all due respect to Mr. Gonsalves, I do not care to work with the Django trunk unless I'm just playing around with something. My goal is always to produce a production quality application. Even the more stable than average Django trunk cannot provide the consistency needed to deliver an app

Re: TemplateView compatible with permission_required decorator?

2011-10-05 Thread Dan Gentry
Instead, you should decorate the dispatch method in the class-based view. See the docs here: https://docs.djangoproject.com/en/dev/topics/class-based-views/#decorating-the-class On Oct 5, 10:27 am, Victor Hooi wrote: > Hi, > > I'm attempting to use one of the new

<    1   2   3   4   5   >