Using localflavor with admin?

2010-10-27 Thread Victor Hooi
as per the rules setup in localflavor? Cheers, Victor -- 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 from this group, send email to django-users+unsubscr

Converting Django to Desktop App? (Multiple Instances)

2010-10-29 Thread Victor Hooi
lar issues we need to be aware of if we decided to go down this path? In particular, I wasn't sure how multiple instances of Django would handle concurrency if they were communicating with a single database. Any advice there? Any other possible drawbacks/roadblocks? Cheers, Victor -- Yo

Re: Using localflavor with admin?

2010-11-01 Thread Victor Hooi
ustralia: http://code.djangoproject.com/browser/django/trunk/django/contrib/localflavor/au Is there a particular reason for this? Or any way of achieving the same effect? Cheers, Victor On Oct 29, 5:48 am, Frank Wiles wrote: > On Thu, Oct 28, 2010 at 12:23 AM, Victor Hooi wrote: > > Hi, > >

Reverse Query Name Clash?

2010-11-01 Thread Victor Hooi
a related_name argument to the definition for 'minister'. Now, if I change the name of the "church" field under Person, it will validate - however, I'm still curious as to why this doesn't work? Any way to fix it? (I assume I could add a related_name argument, I&

Re: Using localflavor with admin?

2010-11-01 Thread Victor Hooi
heya, Thanks for your answer - I posted a reply (doesn't seem to work for non-US), however, it doesn't seem to have appeared on the web-version of Groups, so I thought I'd email you directly, just in case you missed it and happened to know. Thanks, Victor Hmm, I'm

ReportLab and Django - templates? ; FK object has no attribute split

2010-11-17 Thread Victor Hooi
7;]) story.append(subject) When I try to run this code, I get: 'Category' object has no attribute 'split' and the same error with subject, obviously, once it gets to that bit of the code. Any idea why this might be, or how to fix it? Any help is much appreciated. Che

Re: ReportLab and Django - templates? ; FK object has no attribute split

2010-11-18 Thread Victor Hooi
topdf) seem to require a lot more dependencies installed/setup - reportlab is just a single package to compile. But yeah, I'd still love if there was a separate template I could use to generate the PDF. It just feels very weird building up the PDF line by line in views.py. Cheers, Victor On

Serve different page to IE7/8?

2010-11-21 Thread Victor Hooi
but serving up a different template, based on user-agent - recommended way? Cheers, Victor -- 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 unsubscrib

Django - Alternative to using NULLs? (for integer and FK fields).

2010-11-29 Thread Victor Hooi
way of handling this case? (assuming I want to keep these fields as integers). What about in the case of optional foreign keys (spouse and children) - is there a better way of handling these, without using NULLs? Cheers, Victor -- You received this message because you are subscribed to the Googl

Re: Django - Alternative to using NULLs? (for integer and FK fields).

2010-11-29 Thread Victor Hooi
't that how it works in a normal DB? Why is there a separate Person_spouse table? Is there any way to make this optional without using NULLs, or should I make it a m2m field? (I suppose in theory you can have multiple spouses...well, not under my jurisdiction, I guess...lol). Cheers, Victor

Issues importing models in between apps

2010-11-29 Thread Victor Hooi
that all share models? The main reason I split it up was for logically separating all the different models, they still all need to import/relate to each other. Cheers, Victor -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Re: Django - Alternative to using NULLs? (for integer and FK fields).

2010-11-29 Thread Victor Hooi
can make sure I'm on the same page? Cheers, Victor On Nov 30, 5:02 pm, Mike Dewhirst wrote: > On 30/11/2010 4:26pm, Victor Hooi wrote: > > > heya, > > > Phone Number - Yup, you're both right, I'll be using CharField now, > > and model validation to make

Re: Issues importing models in between apps

2010-11-30 Thread Victor Hooi
-models-in-separate-files/ However, I'll need to add a Meta/app_label to each and every single model in that file - is that right? Or is there a better way of splitting up a models.py file across multiple files, or of somehow organising this? Cheers, Victor On Nov 30, 10:44 pm, bruno desth

Re: Issues importing models in between apps

2010-11-30 Thread Victor Hooi
recommend, to make the design more logical and the models.py less unwieldly/large? Cheers, Victor On Nov 30, 10:44 pm, bruno desthuilliers wrote: > On 30 nov, 07:01, Victor Hooi wrote: > > > Hi, > > > I had an application with a fairly large models.py file, which I split > &g

django-extensions - "Error: no module named django_extensions"

2010-12-08 Thread Victor Hooi
no error messages. Not sure what's going on here? I also tried with django-extensions from Github, same error. Cheers, Victor -- 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...@goo

Re: django-extensions - "Error: no module named django_extensions"

2010-12-08 Thread Victor Hooi
seems to act up within Django...*confused*. Cheers, Victor -- 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 from this group, send email

Re: about django model save

2009-12-25 Thread Victor Lima
Try deleting the table and then syncdb again... Att, Victor Lima Em 25/12/2009, às 00:02, chen gang escreveu: > Hi, > I am really new to this tool... and need you help about this issue, > thanks in advance! > > I create models.py like this, > > ... > class S

Re: AdminSite and Enterprise applications

2009-12-25 Thread Victor Lima
. Maybe its best to explain to us the actual usability challenges you will have, hopefully someone has already been there Att, Victor Lima Em 25/12/2009, às 09:13, Vehbi Sinan Tunalioglu escreveu: > Dear All, > > We use Django for more than two years. Our experience is much mo

Re: Using django only for request handling work

2009-12-27 Thread Victor Lima
Restful API? Att, Victor Lima Em 27/12/2009, às 18:58, Amit Sethi escreveu: > Hi ,I have a project that is in general written to work with wsgi > server except i wish to alter some of the environ variables provided > to the app. So I have a function: > > def __call_

Re: use of @vary_on_cookie decorator with URLconf based cache_page usage

2010-01-06 Thread Victor Lima
Off topic side note: beware if you use vary on cookie and google analytics, since analytics cookies changes a lot you are actually caching views per analytics cookie change... That bugged us for a while in our project. Att, Victor Lima Em 05/01/2010, às 21:32, Justin L escreveu: For

Generic Relations and Django Admin?

2010-01-18 Thread Victor Hooi
Address Inline as well (Nb: I'm using django-reversion with this site, hence the "VersionAdmin") class AddressAdmin(VersionAdmin): pass class AddressInline(generic.GenericTabularInline): model = Address ... class HospitalAdmin(admin.ModelAdmin): inlines = [ AddressInline, ] ... admin.

Re: Generic Relations and Django Admin?

2010-01-19 Thread Victor Hooi
dels.ForeignKey(UserProfile) but that doesn't work for hospitals, or say institutions, or anything else that needs an address. So I can't just pick one. Or is my design off? Cheers, Victor On Jan 19, 6:03 pm, greatlemer wrote: > On Jan 19, 5:25 am, Victor Hooi wrote: > > > > >

Re: Generic Relations and Django Admin?

2010-01-19 Thread Victor Hooi
filled. How do people normally do this sort of thing, with a polymorphic object that's referenced by multiple other objects? Cheers, Victor On Jan 19, 5:59 pm, Raffaele Salmaso wrote: > Victor Hooi wrote: > > class AddressAdmin(VersionAdmin): > >     pass > > class A

Re: Generic Relations and Django Admin?

2010-01-20 Thread Victor Hooi
admit I'm often confused by this part, so anybody that can shed light on the rationale for one way or another, please chime in). Cheers, Victor On Jan 20, 12:20 am, LostCruz wrote: > Hi Victor, > > You are trying to do this the wrong way around. It shouldn't be the > A

Re: Generic Relations and Django Admin?

2010-01-20 Thread Victor Hooi
this? (The traceback in the ticket is quite different to the traceback I'm getting). Cheers, Victor Cheers, Victor On Jan 19, 9:55 pm, Daniel Roseman wrote: > On Jan 19, 10:35 am, Victor Hooi wrote: > > > heya, > > > Thanks for the reply =). > > > I tried th

Fixtures Initial Data - Split Into Multiple Files?

2010-01-20 Thread Victor Hooi
ulate all the lookup tables - e.g. for category names). I couldn't find anything about this in the JSON spec, I'm not sure how other people are doing this in Django? Or do you just put everything in a single file? Cheers, Victor -- You received this message because you are subscribed to th

Scripting Import of CSV data?

2010-02-23 Thread Victor Hooi
etter off trying the approach here (http://docs.djangoproject.com/en/dev/howto/legacy-databases/). Or should I just import the data into a clean Django-originated database and leave it at that? Cheers, Victor -- You received this message because you are subscribed to the Google Groups "Django user

Tagging - Extending by adding a rating?

2010-03-21 Thread Victor Hooi
is there a better way of achieving what I want to do within Django? Cheers, Victor -- 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 from this group, s

Re: Tagging - Extending by adding a rating?

2010-03-21 Thread Victor Hooi
, tag-clouds etc. Is there any way to somehow leverage off django-tagging? Or am I better of starting from scratch on this? Cheers, Victor On Mar 22, 1:54 pm, Paulo Almeida wrote: > A possible solution would be to create a Many To Many relationship between > articles and companies, w

Re: Tagging - Extending by adding a rating?

2010-04-06 Thread Victor Hooi
Not sure if anything will become of this *crosses fingers*. Cheers, Victor On Mar 22, 9:19 pm, Paulo Almeida wrote: > I know django-tagging has the Tag model and the TaggedItem model. I wonder > if it would be possible to create the Many to Many relationship between your > Articles and t

DB Adapter for HTML5 Client Database Storage?

2010-04-07 Thread Victor Hooi
-side Storage wouldn't be too much of a stretch. Are there any large barriers to an effort like this? Cheers, Victor -- 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.

Inline and ForeignKeys - Weird ordering?

2010-04-14 Thread Victor Hooi
Also, I noticed that dajngo-command-extensions, using the graph_models command, it seems to ignore m2m relationships. It's really weird. http://github.com/django-extensions/django-extensions/issues#issue/6 Has anybody else noticed something similar? Were there any major changes to Django'

Re: Inline and ForeignKeys - Weird ordering?

2010-04-15 Thread Victor Hooi
ines here, and having the "Add Firm" embedded on that page (without having to open a new window), or should I reverse the way my FK is? Cheers, Victor On Apr 15, 3:58 pm, Victor Hooi wrote: > heya, > > We're creating a small app to manage data-entry of publicat article

Optimistic Locking Patch?

2007-07-31 Thread Victor Ng
Has anyone looked into implementing optimistic locking for the Django ORM? I didn't see anything logged into code.djangoproject.com or in the django-users list. Has anyone taken a stab at implementing this yet? vic -- "Never attribute to malice that which can be adequately explained by stupid

Re: cmemcached etc

2007-08-13 Thread Victor Ng
On 8/13/07, TheMaTrIx <[EMAIL PROTECTED]> wrote: > > No, its not reasonable to assume people know everything about python > from day 1. I really don't think this is an issue of knowing "everything about python". Rather - it's about knowing how to use Google: http://www.google.com/search?hl=en&q

generic views - newforms

2008-03-30 Thread Victor Quiroz
Hello, what is the difference (advantage) to use generic views or newforms Victor --~--~-~--~~~---~--~~ 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: ASP.Net GridView Equivalent in Django

2008-06-05 Thread Brian Victor
Ian wrote: > I have started looking at Django and was wondering if there is a > widget equivalent to ASP.Net's GridView in terms of richness of > functionality. I haven't seen anything like this implemented in django, and presumably the reason for that is django lacks anything like ASP.NET's View

Newforms SelectDateWidget does not generate ID

2007-04-22 Thread Brian Victor
I just noticed that the SelectDateWidget in newforms.extras does not generate an ID for the select elements. I'm using that widget as a model for my own, where I need IDs to be set. Although I can hard-code IDs for now, is there a way to make these composite widgets obey the form-related ID sett

Re: Preferred Schema Evolution Tool

2007-11-25 Thread Victor Ng
The other "schema-evolution-ng" code is very dead. I don't have time to maintain patches against Django anymore, and the patches I no longer even use my own schema evolution code - it's fallen far out of sync with Django's SVN head. FYI - it basically just did what Derek's schema evolution code

Re: django something wrong with many to many relationship

2006-11-30 Thread Victor Ng
Your error is in your logs: ProgrammingError: ERROR: null value in column "age" violates not-null constraint You need to specify an age value, or define age=models.IntegerField(null=True) vic On 11/30/06, gregor <[EMAIL PROTECTED]> wrote: > > Hello i have manytomany relations (database Postgr

Re: Why not Django

2006-11-30 Thread Victor Ng
I find this interesting too since the use of numeric instead of a float is the right decision most of the time. If you're dealing with money at all - you absolutely cannot use float, you *must* use fixed decimal types or you risk getting into all kinds of really terrible rounding errors. I'm fra

Re: Why not Django

2006-11-30 Thread Victor Ng
On 11/30/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > > Victor Ng wrote: > > > If you're dealing with money at all - you absolutely cannot use float, > > you *must* use fixed decimal types or you risk getting into all kinds > > of really terrible round

Re: Why not Django

2006-11-30 Thread Victor Ng
On 11/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Even if you are right and the use of numeric is the right decision, > still naming the fixed decimal type 'float' is, well, surprising ;-) Agreed. It *is* surprising. > I will really appreciate an example showing when SELECT FOR UPDA

Re: Why not Django

2006-11-30 Thread Victor Ng
On 11/30/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Victor Ng wrote: > > > If user A and user B are editting the same records and you enter a > > race where they do this: > > > > A) retrieve record > > Here you mean SELECT FOR UPDATE, ri

Newforms and composite widgets

2006-12-09 Thread Brian Victor
One of the things I was hoping for in newforms but haven't found is a way to do a composite form field that uses multiple elements that reduce to a single python object. E.g., >>> class MyForm(Form): ... postdate = CompositeField(ChoiceField(choices=['Jan', ...]), ...

Re: forcing UTF8 data inside django

2006-12-11 Thread Victor Ng
y doing content sniffing. So sometimes, IE guesses wrong - and you get garbage if you just use the Content-Type header. If you use the meta tag, it forces UTF8 in almost all browsers. victor "MSIE is a four letter word" ng On 12/11/06, Gábor Farkas <[EMAIL PROTECTED]> wrote: > wel

Re: forcing UTF8 data inside django

2006-12-11 Thread Victor Ng
countries and people from all over the world. vic On 12/11/06, mezhaka <[EMAIL PROTECTED]> wrote: > > On Dec 11, 6:02 am, "Victor Ng" <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > The unicode problem seems to creep up in this list a lot, so he

Re: forcing UTF8 data inside django

2006-12-12 Thread Victor Ng
Unfortunately, not all charsets will support all unicode characters, so really, the fact that DEFAULT_CHARSET configurable is mostly a moot point for me. For example, latin1 won't let me encode asian characters. I honestly can't think of a good reason to do anything other than UTF8 unless you've

Re: Re: Schema Evolution code

2006-12-14 Thread Victor Ng
If anyone wants to poke at our schema evolution code you should be able to apply this patch attached. It's mostly working. The bugs I know about are: 1) M2M fields can't be repointed at new tables properly 2) there's some weird quirk with modifying null and db_index at the same time. i have to

Re: Re: Schema Evolution code

2006-12-14 Thread Victor Ng
The patch I previous sent in mostly adds a couple functions to the psycopg2 backend in the introspection module. The only big changes that affect the mainline django code are in django.core.management. I'm using my patches, so that's been tested through 3 schema updates in production. As previo

Re: Schema Evolution code

2006-12-16 Thread Victor Ng
the tests against MySQL or SQLite. MySQL doesn't work because I haven't looked at it yet, and SQLite is probably going to be impossible to implement since sqlite doesn't implement a proper ALTER TABLE statement. > I see. It sounds like it may be a bit of moving target, due to c

Re: Newforms and composite widgets

2006-12-17 Thread Brian Victor
Adrian Holovaty wrote: > On 12/9/06, Brian Victor <[EMAIL PROTECTED]> wrote: >> One of the things I was hoping for in newforms but haven't found is a >> way to do a composite form field that uses multiple elements >> that reduce to a single python object. E

Re: Schema Evolution code

2006-12-22 Thread Victor Ng
eventually gets back to trunk. I won't be able to do too much until the new year though - so that said - can somebody open up the schema evolution branch, or better - open up a new branch from trunk so that we can start hacking away at this problem? victor "i hate parking lots at chris

Re: Unicode URLs

2006-12-24 Thread Victor Ng
n a request comes in, Django tries to match the URLconf patterns against > the requested URL, as a normal Python string (not as a Unicode string). Is there any way to accomplish what I want? On Trac and the mailing list I found some [efforts] [2] by Victor Ng to Unicode-ify things, but nothing see

newforms and dynamic choices

2007-01-13 Thread Brian Victor
Let's say there's a Room model. And let's say there's a ManyToMany relationship with User to specify which users can schedule certain rooms. How should a person in such a circumstance create a SelectField on a form with a user's rooms as choices? Or more generally, how should I go about changin

Install Django

2007-01-25 Thread Victor Quiroz
Is posible install django from egg file? Where download this egg file? PD. Excuseme not talk english --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

Re: save() called 2 times.

2006-05-05 Thread Victor Kropp
dade wrote: > In my model I have something like this : > > def Image(modes.Model): > ... > > def save(self): > print "I've been called" > ... > super(Image, self).save() > > I see in the console the print is executed 2 times when I upload the > image from the ad

Re: IN field lookup with empty list

2006-08-24 Thread Victor Ng
If you're talking about what I think you're talking about - I've posted a patch to this a while ago. http://code.djangoproject.com/ticket/2519 No unit test attached to it, anyone want to do the part that I was too lazy to do? :) vic On 8/24/06, Enrico <[EMAIL PROTECTED]> wrote: > > Hi Jacob,

Unicode, unicode, more unicode

2006-08-24 Thread Victor Ng
Hi all, I've been working on a django application which has to support unicode pretty much all the way through. We have to support multiple unicode scripts in the rendering of pages, in form submission, database layer, even URLs. >From my somewhat poor research for the last couple of weeks, the

Re: Google Authentication code

2022-07-26 Thread Victor Dickson
If I am clear about your question, then django-allauth should help you achieve that. NB: Template customization can be a drag when you just getting started. On Tuesday, 26 July 2022 at 02:11:31 UTC Ryan Nowakowski wrote: > Your question is a little unclear but I'm assuming that you are trying t

Re: Invite to join WhatsApp group

2022-08-07 Thread Bello Victor
Exactly what i wanted to say. The group has helped alot. On Sun, 7 Aug 2022, 1:48 am José Ícaro, wrote: > Hey Bro, this is not SPAM, it's Real Help Group. #no_Spam #only_Python > > Em sex., 5 de ago. de 2022 às 13:02, Dylan Reinhold > escreveu: > >> Please stop spaming this list. >> >> Thanks.

Unsubscribe

2023-01-15 Thread Victor Tumwecj
Dear Django Please unsubscribe me from your mailing list Thank you -- 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

Re: Django Admin

2023-03-11 Thread Victor Matthew
Show your cold pleased On Sat, 11 Mar 2023, 7:04 pm James Hunt, wrote: > Hi there. I am fairly new to Django but have had previous success with > creating an app and being able to access the Admin page. > Recently, if I attempt to access the admin page of a new Django app it > throws the CSRF e

Re: iNTRODUCTION

2023-07-22 Thread Victor Matthew
Your welcome On Sun, 9 Jul 2023, 3:54 pm Emmanuel Kasirivu Lugoloobi, < ema.kasir...@gmail.com> wrote: > Hello guys im studying network systems engineering in college and > intrested in becoming a full stack web developer. I am currenlty on break > will be openning in August,. I stumbled upon Dj

Re: Anyone want to take over maintaining Instant Django?

2012-02-26 Thread Victor Hooi
Hi, Whatever happened to this? @sidmitra - did you manage to take over maintainership of this project? If not, @cjl - do you still have the scripts for this? Cheers, Victor On Thursday, 15 July 2010 23:25:44 UTC+10, sidmitra wrote: > > > I would be willing to take it on or we can a

Bulk Creating Django Models from CSV File?

2012-04-01 Thread Victor Hooi
relationships to other models (for instance, Classification, Country and Operating System would be stored in a lookup table). What's the best way to look these up, and assign the appropriate FK, whilst still preserving good performance and using bulk inserts? Cheers, Victor -- You rec

Re: get_absolute_url returning empty string

2012-07-25 Thread Victor Rocha
Your get_absolute_url method is in the wrong format::: it should be: @models.permalink def get_absolute_url(self): return ("view_name", #view name ) On Tuesday, July 24, 2012 1:58:26 PM UTC-4, Jeff Green wrote: > > I am stuck in trying to figure out why the get_absolute_url call

Re: get_absolute_url returning empty string

2012-07-25 Thread Victor Rocha
your get absolute url method is in the wrong format:: if should be. @models.permalink def get_absolute_url(self): return ("view_name", #view name, (), #tuble of positional args {}, #dict of name kwargs ) In your case, this is what the method should look like:

Re: Automated updating of data across staging and production environments?

2012-07-26 Thread Victor Rocha
I partly agree with the above question. It's a solution, but you usually never want to use your production database on a development server. As for his problem, I would look into fabric. You can easily write a function that dumps data from one database and into another. On Thursday, July 26,

Re: Returning data belonging to a model (FK)

2012-07-27 Thread Victor Rocha
David, Django already comes with a built-in contenttypes application which does exactly what you trying to accomplish, i think. You should read the documentation: https://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/ On Friday, July 27, 2012 8:47:37 AM UTC-4, David wrote: > > Hi > >

Re: form.errors is not a dictionary?

2012-08-01 Thread Victor Rocha
Read the above reply. When you print form.error --> prints out a custom __unicode__ for you to use in your templates. However, you can iterate over form.errors and it will act as a normal dict. On Wednesday, August 1, 2012 1:56:28 AM UTC-4, vivek soundrapandi wrote: > > I too have the same pro

Re: How to override an attribute?

2012-08-05 Thread Victor Rocha
What about you do what the error is telling you to do? All you need to do its to add a related name to your field definitions and that will fix it. If you need me to fix it for you, post some real code. On Saturday, August 4, 2012 10:55:13 AM UTC-4, . wrote: > > Hello, > > I'm trying to do t

Re: Django user should not login on multiple machine with same username and passowrd when user already login on one machine

2012-08-10 Thread Victor Rocha
That would imply that the user needs to log out of the other machine before login into this one. For that reason you would also need to include another view to log an authenticated user out of any other machines. I said an authenticated user because you need to make sure that the user trying to

Python-requests seems to 404 with Django/Tasty-pie?

2012-10-02 Thread Victor Hooi
] "GET > http://localhost:8000/api/v1/host/?name__regex=&format=json HTTP/1.1" 404 > 161072 For some reason, when I use requests, runserver prints out the whole request URL, including localhost - but when I use the browser, or curl, it only prints out the part *after* the

Re: Python-requests seems to 404 with Django/Tasty-pie?

2012-10-02 Thread Victor Hooi
proxy variable, Python requests suddenly seems to start working again. I tried to set the no_proxy variable, and put in localhost and 127.0.0.1 in there - however, Python requests doesn't seem to respect that? Cheers, Victor On Tuesday, 2 October 2012 22:48:26 UTC+10, Cal Leeming [Simplicity

Re: Django Admin asks password every operation

2012-10-06 Thread Victor Rocha
Depending on what exactly you want to accomplish to match the root to a url, I do as follow: url(r'^$', 'earth.views.Home'), However, it is sometimes good to have a default page if a request didnt match the url requested (I would use this as the very last rule, otherwise it will catch every req

Re: Date widget not HTML5

2012-10-25 Thread Victor Rocha
You need to roll out your own widget. I assume django will have html5 support in the near future. On Wednesday, October 24, 2012 1:04:07 PM UTC-4, Juan Pablo Tamayo wrote: > > > > Is there any reason not to have the date widget input tag have the > attribute type="date" instead of just type="te

Re: Using Emails to authenticate

2012-11-04 Thread Victor Rocha
I haven't heard of a package that does what you need. I will try to help you as much as possible. I use django-registration to handle user registration. It provides a form named RegistrationFormUniqueEmail, this form, as its name suggests, will ensure that the email used is unique. For login:

set_test_cookie() on every page?

2011-09-29 Thread Victor Hooi
gain if the user needs to sets thesession variable again? Or should we not call delete_test_cookie() Cheers, Victor -- 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/

View decorator for common navigation elements?

2011-09-29 Thread Victor Hooi
ingle list() like this? What are other methods people are using to tackle this? Cheers, Victor -- 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/-/8

Re: set_test_cookie() on every page?

2011-09-30 Thread Victor Hooi
ke this call from any page with the dropdown. Or is there another way? How would people normally handle having an AJAX POST call like this to set a session variable? Or should I just (dangerously) assume that cookies will work automatically? Alternative? Cheers, Victor -- You received thi

Re: View decorator for common navigation elements?

2011-09-30 Thread Victor Hooi
heya, I do like the idea of just including a custom template tag =). Hmm, can custom template tags interact with models or query the database like that? Firstly, Is it possible, and secondly, is it considered good practice? Cheers, Victor -- You received this message because you are

__unicode__ and u'%s'?

2011-10-01 Thread Victor Hooi
#x27;%s'? Is it always needed, versus just return self.name? And should I be using .format() instead? Or using something else? Cheers, Victor -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: View decorator for common navigation elements?

2011-10-02 Thread Victor Hooi
st here (http://www.webmonkey.com/2010/02/use_templates_in_django/#Roll_your_own_template_tags). Also, as an aside, each link on our category dropdown is bound to a JS click event - not sure how this would tie in with the custom template tag - separate tag for that part of it? Cheers, Victor -- Yo

Using render() with Form?

2011-10-03 Thread Victor Hooi
django/core/context_processors.py" in debug 35. if settings.DEBUG and request.META.get('REMOTE_ADDR') in settings.INTERNAL_IPS: Exception Type: AttributeError at /upload/ Exception Value: 'str' object has no attribute 'META' Any idea from the above w

Re: Using render() with Form?

2011-10-03 Thread Victor Hooi
heya, Aha, thanks guys. I can confirm that works fine now. That'll teach me to read the API docs a bit better...lol, I just assumed it was a 1-to-1 swap with render_to_response, didn't check the arguments =). Cheers, Victor -- You received this message because you are subscri

Import CSV to create multiple Models - Model Manager or in View?

2011-10-03 Thread Victor Hooi
ay of passing ValidationErrors from the model.save() and passing them back to the view to display the user. What would be a good way of hooking that up? Cheers, Victor -- You received this message because you are subscribed to the Google Groups "Django users" group. To view

Re: Import CSV to create multiple Models - Model Manager or in View?

2011-10-03 Thread Victor Hooi
into a ModelForm? Also, the CSV file is for creating multiple models - one model per CSV line - how will that work with a single ModelForm? Do I just call it repeatedly? And how will I then capture the ValidationError and get them back in my form? Cheers, Victor -- You received this message

TemplateView compatible with permission_required decorator?

2011-10-05 Thread Victor Hooi
eed to do to make them work together. Cheers, Victor -- 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/-/BLrtdUAyciYJ. To post to this group, send email to

Permission_require decorator, and redirecting to Login Page

2011-10-05 Thread Victor Hooi
sions, as opposed to just redirecting to a blank login page again and again. Cheers, Victor -- 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/-/alIHHeQMVb4J. T

Re: Django - how to create a private subpage?

2011-10-11 Thread Victor Hooi
r, instead of using has_perm, check if the pagename matches the username. Cheers, Victor -- 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/-/CxrZ

Storing regex raw string literal in Django model?

2011-10-13 Thread Victor Hooi
n the backslashes are doubled-up? What I actually need is a way to store a regex raw string literal, so that I can retrieve it later and use it in a regex. Is there a better way of doing this? Cheers, Victor -- You received this message because you are subscribed to the Google Grou

Changes to default project layout?

2011-11-08 Thread Victor Hooi
o be adapted to be aware of the changes? Cheers, Victor -- 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/-/KW9CF_D0axoJ. To post to this group, se

Re: Changes to default project layout?

2011-11-08 Thread Victor Hooi
heya, Also, I noticed that there's no models.py file in the first app that startproject creates - I assume this is by design, right? Hmm, what's the rationale behind it? Cheers, Victor -- You received this message because you are subscribed to the Google Groups "Django u

Django

2011-12-01 Thread Victor Hooi
configuration files through a Django interface? Things I should be aware of? Cheers, Victor -- 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/-/iWVmP

Re: Django

2011-12-01 Thread Victor Hooi
heya, Damn, I didn't edit the subject - apologies - if there's a moderator, can you change it to "Using Django to edit XML configuration files" please? Thanks, Victor -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Django

2011-12-02 Thread Victor Hooi
not sure of the best way to do that. Cheers, Victor -- 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/-/s3td-Oy5jG8J. To post to this group, send em

Re: Bulk import of data

2011-12-05 Thread Victor Hooi
that in one call? How would you handle invalid lines or validation errors for individual rows? Cheers, Victor -- 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/dj

Django Forms and Twitter Bootstrap - Add fieldset, div wrapper and CSS labels to Django Forms?

2011-12-11 Thread Victor Hooi
27;d like to avoid hardcoding every form field in my template if possible). Cheers, Victor -- 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/-/BClad

Re: django/Data Base Advice

2012-01-02 Thread Victor Hooi
f learning database theory, I'd suggest either "Database Design for Mere Mortals" (http://www.amazon.com/Database-Design-Mere-Mortals-Hands/dp/0201694719), or "Database Design with UML and SQL" (http://www.tomjewett.com/dbdesign/). Cheers, Victor -- You received this

<    1   2   3   4   >