PostgreSQL Schema support

2009-11-15 Thread Melvyn Sopacua
ific schema as read only, as the data is kept up-to-date by other means? -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe fro

Re: PostgreSQL Schema support

2009-11-15 Thread Melvyn Sopacua
On Sun, 15 Nov 2009 15:20:32 -0800, Christophe Pettus wrote: > On Nov 15, 2009, at 2:35 PM, Melvyn Sopacua wrote: >> Is it possible for a "Django appointments application" to understand >> and use >> the geographical information from the tables in the geo_reg

Re: Making the case for Django (vs. Drupal)

2009-11-16 Thread Melvyn Sopacua
ets exploited through one of these bugs lessens. Think of this as the difference between a cabin in the mountains, no locks on the door and a 5 mile steep hike to get there, versus a bank downtown. Obviously, the bank is more secure, yet it's much less likely that someone will try and rob the

Re: Making the case for Django (vs. Drupal)

2009-11-16 Thread Melvyn Sopacua
al attack vectors. 2) If something is used more, it becomes more of a target. This still doesn't exclude the possibility that an attacker will never find your machine. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users&qu

Re: Migration error

2012-06-11 Thread Melvyn Sopacua
complicated one is to run: # Create an sql dump of your app models python manage.py sqlall appname > appname.sql # Rename it to previous mv appname.sql appname.prev.sql # Make a new dump with your changes to the model python manage.py sqlall appname > appname.sql # View the changes using the s

Re: Django in shared production server

2012-06-14 Thread Melvyn Sopacua
he hostname to the uwsgi socket, and aliases for /media/ and /static/. It helps if you provide them with a copy and paste section. In the meantime, you can keep developing using django's builtin development server. -- Melvyn Sopacua -- You received this message because you are subscrib

Re: Stuck already on step one, django on windows

2012-06-14 Thread Melvyn Sopacua
sonably replicate your hosting environment. -- Melvyn Sopacua -- 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 django

Re: Accessing request.user in a ModelAdmin function

2012-06-14 Thread Melvyn Sopacua
w how to > pass self and obj. Suggestions? In 1.4 you have ModelAdmin.list_filter and can subclass SimpleListFilter. These get passed the request and the documentation provides a full example of what you're trying to do. -- Melvyn Sopacua -- You received this message because you are sub

Trying to implement "outlines"

2012-06-17 Thread Melvyn Sopacua
rm and cheating and ignoring that validation will get you in trouble down the line when the form needs to be saved. I'm still reading the source and trying to find the right entrypointss, but sure would appreciate some pointers or even "can't be done yet". -- Melvyn Sopacu

Re: Stuck already on step one, django on windows

2012-06-17 Thread Melvyn Sopacua
se, you need to alter the windows PATH variable. I totally forgot how to do that, something with My Computer and right-clicks. Maybe somebody else can chime in. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Re: Where are my posts?

2012-06-17 Thread Melvyn Sopacua
quot;feature" off as well. If anyone knows where that button is, let me know. ;) -- Melvyn Sopacua -- 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 unsubscri

Re: Various thoughts on authentication, registration and social logins

2012-06-18 Thread Melvyn Sopacua
ethod insecure. And the fact that it isn't time-limited. Even though, mailman does the same thing and even reminds you monthly, mailman does not claim to be a secure authentication system. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups &quo

Re: Trying to find something in multiple databases... Confused...

2012-06-18 Thread Melvyn Sopacua
ontinue -- I want to do something > like this# > #if student is defined# > return render_to_response('ta/student.html', student) Almost correct: if student is not None : # the student.html template will now have a variable named student # which is the studen

Re: Trying to find something in multiple databases... Confused...

2012-06-19 Thread Melvyn Sopacua
On 19-6-2012 9:46, Laurence MacNeill wrote: > On Monday, June 18, 2012, Melvyn Sopacua wrote: > >> On 18-6-2012 9:52, Laurence MacNeill wrote: >>> well -- I hit the wrong key and posted that before I was finished >> typing... >>> >>> here's

Custom model field as foreign key

2012-06-19 Thread Melvyn Sopacua
d attribute in forms/widgets.py, but having a really hard time figuring out what method sets the "value" argument to the Select.render() method and how it relates to my custom field. Help? -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups &q

Re: Custom model field as foreign key

2012-06-19 Thread Melvyn Sopacua
field gets used as Foreignkey. In fact, even that goes ok, cause I get the correct related object. It is *only* the Select widget where things go wrong. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this grou

Re: Writing or editing files using Django

2012-06-19 Thread Melvyn Sopacua
n the form data - write the file using standard python file methods - redirect the user It's similar to this: https://docs.djangoproject.com/en/1.4/howto/outputting-csv/ except don't call response.write() but write to a file. -- Melvyn Sopacua -- You received this message because you

Re: Oracle: blank, null, and empty_strings_allowed

2012-06-20 Thread Melvyn Sopacua
and form validation. Your real issue is with the SQL standards body and Oracle and whoever thought it was a good idea to make NULL and "value of zero length" different concepts. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Djan

Re: Custom model field as foreign key

2012-06-20 Thread Melvyn Sopacua
the ModelForm() getting passed an 'instance' dict that has the database representation for the primary key stored as the value. And now trying to figure out where that dictionary gets made. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Dj

Re: Oracle: blank, null, and empty_strings_allowed

2012-06-20 Thread Melvyn Sopacua
case, empty strings on NOT NULL columns will be consistent. And if the COMMENT syntax for fields/tables wasn't such a mess accross db's I'd say map help_text to COMMENT as well. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Group

Re: Oracle: blank, null, and empty_strings_allowed

2012-06-21 Thread Melvyn Sopacua
On 20-6-2012 21:38, André Pang wrote: > On 6/20/2012 11:46 AM, Melvyn Sopacua wrote: > >> On 20-6-2012 20:31, André Pang wrote: >>> Right. There's currently no way to enforce required=True at the database >>> level. >> >> So, your model clearly

Re: Custom model field as foreign key

2012-06-21 Thread Melvyn Sopacua
On 20-6-2012 19:38, Melvyn Sopacua wrote: > On 19-6-2012 17:02, Kurtis Mullins wrote: >> hmm, maybe you need a custom Select Widget for your custom field? Or check >> out the select widget and see if it's looking for any _meta information on >> the field that determines h

Re: custom db field as filter in admin

2012-06-22 Thread Melvyn Sopacua
h that doesn't call to_python properly, but let's rule out it's not the same as my issue: Is this field a foreign key for the model that's being displayed? -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: custom db field as filter in admin

2012-06-22 Thread Melvyn Sopacua
On 22-6-2012 12:58, Bram de Jong wrote: > On Fri, Jun 22, 2012 at 12:27 PM, Melvyn Sopacua > wrote: >> On 22-6-2012 12:09, Bram de Jong wrote: >> >>> However, when I turn this field into a filter in the admin, instead of >>> seeing the filter-versions as my

Re: Where I am wrong in loading static files ?

2012-06-22 Thread Melvyn Sopacua
ddme/" > ) > ## I JUST ADDED THOSE /MEDIA AND /CSS DIR IN IT > > The HTML source file contains: > > Image URL: src="../media/logo.png" > CSS URL : href="../css/twoColFixLtHdr.css" You're not using staticfiles, because they will always result in a

Re: Race and Locking? was Re: Duplicate rows with same key in DB?

2012-06-23 Thread Melvyn Sopacua
ck again before doing save(). > > or just thinking aloud, Is there a way to acquire a lock which can > serialize any other requests which have same "a" and "b" values? unique_together + transaction middleware. https://docs.djangoproject.com/en/1.4/topics/db/transactions

Re: Race and Locking? was Re: Duplicate rows with same key in DB?

2012-06-23 Thread Melvyn Sopacua
On 23-6-2012 9:52, Melvyn Sopacua wrote: > On 23-6-2012 0:02, ydjango wrote: >> >> Thank you, I also believe it is Race condition. I do not want to use >> get_or_create as I like to have control over DB writes and updates. I will >> try Unique_together and catch the i

Re: acces cleaned data from a dynamic form

2012-06-25 Thread Melvyn Sopacua
= AddressForm(request.POST) > formset = DishesFormset(request.POST) > if formset.is_valid(): > return render_to_response('test', { > 'form_data': formset.cleaned_data, >

Re: convert str to datetime

2012-06-25 Thread Melvyn Sopacua
date = item.delivery_date So, that's a string and you need it to be a date object. Where does the string come from and what does it look like? -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: 403 error when POSTing to a view with csrf protection

2012-06-25 Thread Melvyn Sopacua
l91ZDqVL5wirXlUwIYmu8ytTVES3nt', > 'HTTP_HOST': '127.0.0.1:8000', Since this all looks sane, what's the different with a 'real browser' (no disrespect to your desktop app :) )? I'm not seeing anything wrong here, so it must be something subtle. Or is a

Re: Render time

2012-06-25 Thread Melvyn Sopacua
ble in your template. And finally, you'd send the calculation back using Ajax requests, something you'll find plenty of howto's for on the web. [1] <http://stackoverflow.com/questions/799981/document-ready-equivalent-without-jquery> -- Melvyn Sopacua -- You received this mes

Re: 403 error when POSTing to a view with csrf protection

2012-06-25 Thread Melvyn Sopacua
with that lock - the formfield token is a key No key, no open door. Wrong key, no open door. -- Melvyn Sopacua -- 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 un

Re: base_url() in django

2012-06-25 Thread Melvyn Sopacua
On 25-6-2012 3:10, Raitucarp wrote: > http://example.com > or > https://example.com You also do this in your view functions, using the Site framework: <https://docs.djangoproject.com/en/1.4/ref/contrib/sites/#getting-the-current-domain-for-full-urls> Then pass it on to templ

Re: [tutorial] why doesn't my admin template overrule?

2012-06-25 Thread Melvyn Sopacua
On 24-6-2012 22:26, bunski wrote: > But cant figure out why my admin header is not changing. Can you see > instantly with my attached screenshot? "Don't forget to use absolute paths" And absolute paths start with forward slashes. Yours doesn't in TEMPLATE_DIRS. --

Re: 403 error when POSTing to a view with csrf protection

2012-06-25 Thread Melvyn Sopacua
On 25-6-2012 15:20, Mike wrote: > > > On Monday, June 25, 2012 3:06:28 PM UTC+2, Melvyn Sopacua wrote: >> >> On 25-6-2012 13:11, Mike wrote: >> >>> POST:>> [u'']}>, >> >> Wait a second... >> Where's your csr

Re: base_url() in django

2012-06-25 Thread Melvyn Sopacua
hat there's no difference between /doc/ and http://example.com/doc/ if the current server is http://example.com/? See here: https://docs.djangoproject.com/en/1.4/ref/templates/builtins/#url -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups &q

Re: admin page doesn't auto-refresh

2012-06-26 Thread Melvyn Sopacua
h an InlineAdminModel and have the foreign key available in admin model. Without seeing the model definitions and the admin model definitions, we can only guess. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: Render time

2012-06-26 Thread Melvyn Sopacua
w.html Wow, really nice. Can't believe I missed that. -- Melvyn Sopacua -- 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 grou

Re: Logout- Back Button

2012-06-26 Thread Melvyn Sopacua
On 26-6-2012 4:17, Sajja1260 wrote: > hi all, > i'm also facing the same problm... can any one help me What problem? Redirect after a get request? => document.replace(). -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups

Re: many "Broken INTERNAL link" with end string "/undefined/"

2012-06-28 Thread Melvyn Sopacua
^ That's javascript, not python doing that. Python would be 'None'. So check your javascript code for Google Chrome compliance. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users

Re: Avoiding code repetition in views

2012-06-29 Thread Melvyn Sopacua
ing, refactoring code duplication isn't limited to the django layer. -- Melvyn Sopacua -- 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 gro

Re: how to manage range of hours in models and forms in django1.4

2012-06-29 Thread Melvyn Sopacua
r entry in DaysOfWeek.objects.all() : return (entry.id, entry.name) class BusinessHours(models.Model) : day = models.CharField(max_length=32, choices=DaysOfWeek) start = models.TimeField() end = models.TimeField() -- Melvyn Sopacua -- You received this message because

Re: 'CSRF verification failed." from django.contrib.comments. can you help solve it? django 1.3

2012-07-03 Thread Melvyn Sopacua
orrectly? Do any sessions work at all? -- Melvyn Sopacua -- 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 django-users+unsubscr...

Re: Use regular expression to retrieve all image tags from a given content

2012-07-03 Thread Melvyn Sopacua
. This is simple stuff for regular expressions and what they're made for. -- Melvyn Sopacua -- 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

Re: admin addGroup similar layout

2012-07-03 Thread Melvyn Sopacua
ght side. <https://docs.djangoproject.com/en/1.4/ref/contrib/admin/#django.contrib.admin.ModelAdmin.filter_horizontal> If you need it outside the admin, trace down the filter_horizontal attribute to the widget. Not in a position to do that right now. -- Melvyn Sopacua -- You received this

Re: Use regular expression to retrieve all image tags from a given content

2012-07-03 Thread Melvyn Sopacua
On 3-7-2012 20:38, Tim Chase wrote: > On 07/03/12 12:57, Melvyn Sopacua wrote: >> On 30-6-2012 15:23, Sunny Nanda wrote: >> What you're looking for is: >> prog = re.compile(r'') >> matches = re.search(prog) >> for match in matches : >> pri

Re: UserProfile.user" must be a "User" instance. django-registration

2012-07-04 Thread Melvyn Sopacua
user = request.user,# here i am trying to add user from > request who is coming from RegistrationForm from django -registration ># I am getting the error in this above line If request.user.is_anonymous() is True you have your answer. If not, figure out what kind of s

Re: Unable to obtain c.poll

2012-07-04 Thread Melvyn Sopacua
er. c = p.choice_set.get(..) c.delete() # calls the delete method of the choice object -- Melvyn Sopacua -- 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 unsubscri

Re: many "Broken INTERNAL link" with end string "/undefined/"

2012-07-04 Thread Melvyn Sopacua
y where you generate links via javascript 2) Identify what javascript variable is passed to the link 3) Identify how it can be undefined If you don't see how it can be, undefined, use the appropriate javascript forums / documentation. -- Melvyn Sopacua -- You received this message because

Re: Use regular expression to retrieve all image tags from a given content

2012-07-04 Thread Melvyn Sopacua
98% of the code from that library is unused. Case in point, PIL to verify if a file is an image. But my rant alarm went off. :) >> It's a trade-off you should make a decision on, not just blatantly >> dismiss regular expressions when a document contains tags or call them >&g

Re: Deployment: Apache2, wsgi (Debian squeeze)

2012-07-04 Thread Melvyn Sopacua
sgi. If you're not set on Apache, then I suggest you read the uwsgi deployment guide in the manual. I (and others on the list) will gladly help you with the nginx bit, but I'd rather not confuse you more if you're set on Apache, so I'm holding off on the examples for now. --

Re: Inheriting template with a form into an existing template

2012-07-04 Thread Melvyn Sopacua
ide the content block. So this would be a base_notes.html which extends base.html and has an empty content block. -- Melvyn Sopacua -- 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@goo

Re: Raise 404

2012-07-04 Thread Melvyn Sopacua
intro/tutorial03/#write-a-404-page-not-found-view> In short: you don't have a 404 template, which causes a 500 error, which causes the default exception details page as with other errors. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups &qu

Re: Conditionals in Templates

2012-07-04 Thread Melvyn Sopacua
instance with an attribute giving the name of the type >> as a string... > > 3. write a template tag 4. Don't use polymorphic variables in templates. Handle it in the view by providing differently named variables (x and x_list for example). -- Melvyn Sopacua -- You recei

Re: how to save response 's render file to server or email using httpresponse

2012-07-04 Thread Melvyn Sopacua
uditing and/or tracing down elusive errors. -- Melvyn Sopacua -- 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 t

Re: Controlling access

2012-07-04 Thread Melvyn Sopacua
n Django admin? I know in the python code i can > check to see if they're the admin user or not and allow or disallow > access, but what they're saying makes it seem I can just do it admin. request.user.is_superuser -- Melvyn Sopacua -- You received this message because y

Re: Dumpdata and serialization issues

2012-07-04 Thread Melvyn Sopacua
> The table is defined as follows --> id: integer PRIMARY KEY > unipart_id: integer category_id: integer This misses a unique index on (unipart_id, category_id) but doesn't explain the issues you're seeing. Any chance we can see the actual models and one broken record as output

Re: Super slow authentication

2012-07-04 Thread Melvyn Sopacua
> authentication which was not happening before but is happening now. Again, authenticating against what? -- Melvyn Sopacua -- 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@goog

Re: custom500 page does not show up ?

2012-07-04 Thread Melvyn Sopacua
ned off, turn it back on and read the email sent to the admin address. -- Melvyn Sopacua -- 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 t

Re: custom500 page does not show up ?

2012-07-04 Thread Melvyn Sopacua
teresting part is everything is working properly in my local machine. [ ] Make sure that absolute paths in settings.py point to actual directories on the production server. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: cannot access admin

2012-07-04 Thread Melvyn Sopacua
directory too high. Could you show the directory layout, including the location of settings.py, admin.py for the app and views.py. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: cannot deploy due to wsgi error

2012-07-05 Thread Melvyn Sopacua
On 4-7-2012 21:17, Peter Zakin wrote: > [Wed Jul 04 02:29:15 2012] [error] [client 140.180.6.212] ImportError: /opt/ > bitnami/python/lib/python2.7/lib-dynload/_io.so: undefined symbol: > PyUnicodeUCS2_AsEncodedString There ya go. The python installation is flawed. -- Melvyn Sopacua

Re: mysqldb help! Can't connect to MySQL server error...

2012-07-05 Thread Melvyn Sopacua
On 4-7-2012 21:31, Matthew Piatkowski wrote: >> DATABASE_PORT = '3036' # Set to empty string for default. >> Not used with sqlite3. >> Typo that should probably 3306. -- Melvyn Sopacua -- You received this message because you are subscribed to the

Re: migration via south for inheritance change -> please help

2012-07-05 Thread Melvyn Sopacua
red data as they represent totally different concepts and can share names, but be totally different 'things' - like a 'cpu' category with description 'central processor and supporting hardware' and a 'cpu' device with description 'central processor dev

Re: Admin actions -- short_description as doc string?

2012-07-05 Thread Melvyn Sopacua
cause it doesn't show the short_description. -- Melvyn Sopacua -- 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,

Re: migration via south for inheritance change -> please help

2012-07-05 Thread Melvyn Sopacua
impossible to enforce uniqueness on shared attributes. So it's not just about creating an instance. > Very big apps, like, say django-blog-zinnia use abstract classes for > the ease of extension and share of information for VERY concrete > concepts like EntryBase, which defines al

Re: mysqldb help! Can't connect to MySQL server error...

2012-07-05 Thread Melvyn Sopacua
On 5-7-2012 15:45, Tom Evans wrote: > On Thu, Jul 5, 2012 at 1:53 PM, Melvyn Sopacua wrote: >> On 4-7-2012 21:31, Matthew Piatkowski wrote: >>>> DATABASE_PORT = '3036' # Set to empty string for default. >>>> Not used with sqlite3. >>

Re: internationalization on database with hard-coded data

2012-07-05 Thread Melvyn Sopacua
grow with time? Data from dynamic sources should be translated in the template. There's examples in the internationalization docs. And yes, they don't magically translate themselves and as such you need to run makemessages and friends. -- Melvyn Sopacua -- You received this message beca

Re: insert html into a form from Django code (not template)

2012-07-05 Thread Melvyn Sopacua
ant. [snip] Nice solution, but weren't formsets made for this type of thing? I'm trying to figure out why formsets couldn't be used here and coming up blank, unless the naming convention is somehow unchangeable. -- Melvyn Sopacua -- You received this message because you are subscri

Re: queryset caching - without caching middleware

2012-07-05 Thread Melvyn Sopacua
On 5-7-2012 14:28, hinnack wrote: > - can I disable or force a "refresh" of the cache? <http://stackoverflow.com/questions/3346124/how-do-i-force-django-to-ignore-any-caches-and-reload-data> -- Melvyn Sopacua -- You received this message because you are subscribed t

Re: insert html into a form from Django code (not template)

2012-07-05 Thread Melvyn Sopacua
o-many relationships of a model, then look at inline formsets: <https://docs.djangoproject.com/en/1.4/topics/forms/modelforms/#inline-formsets> -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to thi

Re: 1.4: Emails to BCC addresses not sent

2012-07-05 Thread Melvyn Sopacua
lready in the recipient list, it is not guaranteed they receive two copies and even more likely that they don't, so use addresses you know are good but not in the list already. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Djang

Re: Converting to Postgres database; error with UserProfile model

2012-07-05 Thread Melvyn Sopacua
e this model works? You use a one to one relationship but duplicate the fields of the parent. Try running with an empty database on your development machine and then run syncdb. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Acessing data on Model/Detail classes

2012-07-05 Thread Melvyn Sopacua
saction, do the validation in the post_save signal and roll back the transaction if the total is too low (not even sure this /can/ be done). Maybe others have more ideas. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Admin actions -- short_description as doc string?

2012-07-05 Thread Melvyn Sopacua
On 6-7-2012 0:59, Russell Keith-Magee wrote: > On Thu, Jul 5, 2012 at 9:22 PM, Melvyn Sopacua wrote: >> On 5-7-2012 2:02, Russell Keith-Magee wrote: >>> The short_description is a label that can be used for display purposes -- >>> a 'human readable' version of

Re: Model for ListView needed?

2012-07-06 Thread Melvyn Sopacua
ou should also understand that the DetailView wants a model and "something from which it can identify a single instance" - the pk (primary key) in the example. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group

Re: Admin actions -- short_description as doc string?

2012-07-06 Thread Melvyn Sopacua
On 6-7-2012 3:50, Russell Keith-Magee wrote: > On Fri, Jul 6, 2012 at 9:06 AM, Melvyn Sopacua wrote: >> https://docs.djangoproject.com/en/1.4/_images/article_actions.png >> >> Code above states: >> make_published.short_description = "Mark selected stories as publ

Re: 1.4: Emails to BCC addresses not sent

2012-07-06 Thread Melvyn Sopacua
s a ticket is in order, but like I said "works for me" (in version 1.4). If that doesn't fail, then make sure cco is filled. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: how to use HTTPS with django

2012-07-06 Thread Melvyn Sopacua
/#storing-additional-information-about-users> What do you think is missing? -- Melvyn Sopacua -- 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 fr

Re: Missing 'SITE_ID' breaks first Django app

2012-07-06 Thread Melvyn Sopacua
trib.sites', and SITE_ID is removed from settings (this wasn't > the case prior to deployment). But what is the error here? Site doesn't display? server errors? -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: ForeignKey problem

2012-07-06 Thread Melvyn Sopacua
= models.ForeignKey(Player) started = models.DateField() ended = models.DateField() -- Melvyn Sopacua -- 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 uns

Re: Highlighting Active Navigation Link - correct approach?

2012-07-06 Thread Melvyn Sopacua
this to have a double underscore separator, so the urlname for news/local would be news__local. Then again, it might be overkill. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Acessing data on Model/Detail classes

2012-07-06 Thread Melvyn Sopacua
imary key of the Master to make the relationship, the Master needs to be saved first. I would investigate the post_save signal. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-

Re: If using South, does it even matter what the underlying database is?

2012-07-06 Thread Melvyn Sopacua
on and backups. Once you got the administrative part figured out, start making some apps. This all takes time and willpower and doesn't combine with deadlines. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" grou

Re: how to use HTTPS with django

2012-07-07 Thread Melvyn Sopacua
the session is created on the HTTPS connection and only /valid/ on the HTTPS connection. In other words, if you set this flag the scenario of having an unencrypted site with an encrypted login procedure is impossible. -- Melvyn Sopacua -- You received this message because you are subscribed

Re: how to use HTTPS with django

2012-07-07 Thread Melvyn Sopacua
ogged out the minute the connection becomes unencrypted? -- Melvyn Sopacua -- 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, se

Re: submit parameters to py script

2012-07-07 Thread Melvyn Sopacua
different than a sh script or binary command, so you'll need to use python's subprocess or os module functions, pass arguments in proper shell syntax and read output. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django user

Re: submit parameters to py script

2012-07-07 Thread Melvyn Sopacua
pply your SQL knowledge to optimize what django's syncdb has created for you or even start working the other way around using inspectdb. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Model for ListView needed?

2012-07-08 Thread Melvyn Sopacua
corresponds to a record in that table. -- Melvyn Sopacua -- 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 django-users+u

Re: migration via south for inheritance change -> please help

2012-07-09 Thread Melvyn Sopacua
u want in the case of PlasticFruit, but in most cases you want to detect it. > def Apple.rott(): get_wrinkles() > def Orange.rott(): color=green > > and I do > for fruit in Fruit.objects.all(): fruit.rott() That would work for all fruits implementing the rott method. -- Melvyn Sopacua

Different authentication package

2012-07-09 Thread Melvyn Sopacua
different user object to the authentication middleware, because user retrieval methods are hardcoded to the module - No easy way to offload password hashing to the database server If at all possible, I'd rather not loose the admin, since it's a great help adding seed data during dev

Re: Different authentication package

2012-07-09 Thread Melvyn Sopacua
he web and other then some snippets not finding much. -- Melvyn Sopacua -- 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

Re: Extend user model: class inheritance or OneToOneField?

2012-07-14 Thread Melvyn Sopacua
then things get complex real fast. Having tried this exercise I've now decided to write my own auth package all together. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-

Re: Page not found (404)

2012-07-14 Thread Melvyn Sopacua
ill now be: <http://127.0.0.1/home/alessandro/Scrivinia/progretoo/media/photos/custodia/> What you want is: upload_to='/photos/custodia/' MEDIA_URL = '/media/' MEDIA_ROOT = ( '/home/alessandro/Scrivania/progetto/media/', ) -- Melvyn Sopacua -- You rece

Re: Catch or raise exception designissue

2012-07-14 Thread Melvyn Sopacua
h it before it goes into production. Masking or reducing errors that should not normally happen is not a good thing. This is exactly what exceptions are for. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: How to create a app inside a app

2012-07-20 Thread Melvyn Sopacua
o you cannot do: app1.newsapp app1.commentsapp app2.newsapp < same name Actually, you can do it, but you can't enable both in INSTALLED_APPS. I'm doing exactly this with an app that has geo support and doesn't. They provide identical models but only one can be enabled. -- Melvyn

Re: How to create a app inside a app

2012-07-21 Thread Melvyn Sopacua
bel).__file__), 'sql')) For this reason it was more beneficial to use sub applications when models.py grew rather big as no additional code was needed to populate the app registry and things just work out of the box at a small cost of having to register multiple apps in INSTALLED_APPS

Re: Set two fields to the same value

2012-07-21 Thread Melvyn Sopacua
kwargs['second'] = second super(Test, self).__init__(*args, **kwargs) For the admin, see <https://docs.djangoproject.com/en/1.4/ref/contrib/admin/#django.contrib.admin.ModelAdmin.prepopulated_fields> for an alternate solution. -- Melvyn Sopacua -- You received

Re: Query Distances from User

2012-07-24 Thread Melvyn Sopacua
ing-useless> [2] <http://www.mozilla.org/en-US/firefox/geolocation/> [3] <http://diveintohtml5.info/geolocation.html> -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send em

Re: Catch or raise exception designissue

2012-07-24 Thread Melvyn Sopacua
still a client error if she clicks a server generated link? ;) -- Melvyn Sopacua -- 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

  1   2   3   4   5   6   7   >