On Oct 20, 7:15 pm, Sascha Brossmann <[EMAIL PROTECTED]>
wrote:
> > Is anyone
> > familiar with a django or python tutorial that shows how to implement
> > some kind of file upload progress bar?
>
> Sorry, but the main magic in those uploaders is done via flash, not
> via js or php. AFAIK there is
On Oct 7, 2:44 pm, Bobby Roberts <[EMAIL PROTECTED]> wrote:
> This code drops all selected fields into a temporary csv file named
> "contact.csv" so that it can be downloaded. However, the template
> HTML is being appended after the last record in the csv file.
>
> Is there any way to prevent th
> 2. Slicehost - for those that want COMPLETE control of their hosting
> environment. Only drawback (for some) is that everything needs to be
> installed from scratch.
>
> In the case of Slicehost, I am also curious if the 256 slice is
> sufficient for most Django apps.
>
I've got a Slicehost 25
On Oct 1, 11:25 am, David Hall <[EMAIL PROTECTED]> wrote:
> I've just released an open-source version control application for
> Django. It is available for download from Google code.
Neat idea! I installed it and while it works for rolling back, it does
not work bring back deleted items. I did a
On Sep 29, 12:06 pm, megrez80 <[EMAIL PROTECTED]> wrote:
> Regarding "repurposing" the PHP-generated HTML, do you mean
> statically, eg. copying the page source into a template?
>
> If not, how can this be accomplished dynamically? Is there a way to
> get the raw HTML output of a PHP-based URL pro
> I read that Django knows the difference between a new and a updated record,
> but it replicates the customer if I don't set the customer_id before a
> customer.save. Would somebody please shoot at my code and tell me where the
> room for improvement is hiding?
You're almost there, just make
> We welcome any ideas for improvements, corrections, or any other
> feedback.
Nice work, much appreciated. One thing did jump out at me though... In
the Model fields section, USStateField and PhoneNumberField have been
moved into localflavor:
http://code.djangoproject.com/wiki/BackwardsIncompat
On Jun 24, 3:35 pm, nobody <[EMAIL PROTECTED]> wrote:
> I'm sure this is very common knowledge but for the life of me I can't
> find it in the documentation or the djangobook.
>
> I have a ManyToManyField in my model. Categories to Articles.
>
> In my template I try to pull it out like so:
> {{art
On Jun 4, 5:42 pm, "Cliff Liang Xuan" <[EMAIL PROTECTED]> wrote:
> Basically I want to use a random 7 digit string as the primary key of table
> Foo, because this id is system generated I don't want to show it in the
> admin interface. How to achieve this, please?
You should only have trusted use
On Jun 1, 1:46 am, David Zhou <[EMAIL PROTECTED]> wrote:
> Why wouldn't that work, unless I'm misunderstanding something?
>
> From the docs:
>
> >>> p = Place.objects.filter(name="Bob's Cafe")
> # If Bob's Cafe is a Restaurant object, this will give the child class:
> >>> p.restaurant
>
> Howe
On May 30, 11:20 pm, "David.D" <[EMAIL PROTECTED]> wrote:
> If there are lots of child model, use hasattr() or capture exception
> will not be good?
> "add a type field to Person() and overide the save fields on Man and
> Woman to set the type field correctly. " will be better?
hasattr() doesn't
On May 30, 10:38 am, David Zhou <[EMAIL PROTECTED]> wrote:
> You can use also use hasattr().
>
> Something like
>
> if hasattr(person_obj, 'man'):
> #is man
> elif hassattr(person_obj, 'woman'):
> #is woman
> else:
> #is freakish mutated thing
>
How would that work exactly? It's a rev
On May 25, 4:46 pm, peter <[EMAIL PROTECTED]> wrote:
> Hello everyone. I've just begin my adventure with Django, and I have
> some problems. I want to add some custom functions to admin site. For
> example, I want to add method from not model class, which sends email
> to specify users, or somethi
On May 25, 7:54 pm, "Norman Harman" <[EMAIL PROTECTED]> wrote:
> Unless your site is very low traffic the thing you don't want to do is
> write to the database every view. That is anti-scalable.
>
Unless you cache the view. Just update it once an hour/day.
--~--~-~--~~~--
> _mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL
> server on 'lo
> calhost' (10061)")
It can't connect to MySQL. Make sure your settings are accurate and
that MySQL is running.
--~--~-~--~~~---~--~~
You received this message because you are subs
On May 21, 9:33 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> Well, newforms-admin is being written to make the HttpRequest object
> available as an argument to the various ModelAdmin methods, which
> means that when you set up your own custom admin you can do pretty
> much anything you want.
On May 22, 11:08 am, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
> I tried using select_related('categories') on the original book query,
> but that seemed to actually slow it down. Are there any other ways to
> slurp this up into something tidier?
>
> I don't have much experience with SQL, ma
On May 16, 12:52 pm, ydjango <[EMAIL PROTECTED]> wrote:
> I do not want to make it easy for some one who breaks in , either a
> outsider or may be an rougue hosting provider employee or contractor,
> to easily get access to all the information - data and code.
>
Your best bet is to ensure that do
On May 16, 6:02 am, ydjango <[EMAIL PROTECTED]> wrote:
> I have propriety commercial code and some formula/ algo
> implementations which I do not want to expose.
> Hence I do not want to upload .py source files
Expose to whom? Your files (even on shared hosting) are still just
your files. If you
On May 15, 6:17 pm, Alex <[EMAIL PROTECTED]> wrote:
> I'm working on my first Django project and I can't seem to get
> information printed out as I would like it. I'm trying to print out
> quotes to a page with the newlines turned into HTML tags (similar
> to PHP's nl2br function).
You're lookin
> I want to upload only .pyc and no source files. Whats the best way to
> make sure my .pyc works there.
Your best bet is to probably upload the .py files, run the app and
then delete the .py files. That way you're sure that the .pyc files
are compatible. But unless you really need to get rid of
> I am not concerned if they can send the hash back. I dont want them to
> be able to access the underling value that the hash is based on.
>
> I am also not concerned about spam, but rather just dont want to expose
> raw database ids to the public.
Gotcha, I mis-understood your original questio
On May 15, 2:02 pm, Mike Chambers <[EMAIL PROTECTED]> wrote:
> Sorry for not being more specific.
>
> I am talking about data in hidden fields:
>
>
>
> I would like to encrypt the value.
>
> I could hash it using md5 or sha1 and a secret key, and then on the
> server, loop through the values in
> class Poll(models.Model):
> """docstring for Poll"""
> question = models.CharField(maxlength=200)
> pubdate = models.DateTimeField("date published")
> def __str__(self):
> """docstring for __unicode__"""
> return self.question
>
> Any thoughts on how to fix this?
It sounds like you already have it working, but I think the problem is
you're setting the MEDIA_URL with the 8000 port... Which won't hit
Apache (most likely running on 80), but instead the built-in Django
server. You could simply use 'http://localhost/media' in
> I was able to populate the table, but the admin interface was having
> problem, it was still expecting the old table columns. =/
Sounds like you need to update your Django models.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the G
> I tried deploying my django project on apache+modpython as the
> tutorial described... Everything works fine except that the admin
> website displays unformatted ... (could not manage to find the
> stylesheet somehow), can anyone tell me what went wrong?
See "Serving the admin files" in the mod
> Can anyone refer a nice tutorial or explain how to create custom
> user attributes and use the authentication/authorization app?
It would be just like a regular user registration form, only with
more
fields. In the view you would create the account using the data
that belongs to Auth and after
> Can anyone refer a nice tutorial or explain how to create custom
> user attributes and use the authentication/authorization app?
It would be just like a regular user registration form, only with more
fields. In the controller you would create the account using the data
that belongs to Auth and
> I think you may want to check out this post:
>
> http://blog.awarelabs.com/?p=48
>
> Specifically, steps 4 and 5.
That does indeed do the trick. At least for 10.5 Leopard.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gr
> I do wish it was easier to get Django running on MediaTemple. I'll
> probably give it one more go, as it really shouldn't be as hard as it
> seems and I'm not exactly a novice at this sort of thing... If I can
> get that working, a (dv) or several would definitely be one pretty
> easy way of get
> Look at the 'tables' and 'where' parameters to the extra() method on
> querysets.
>
I got very close with the tables parameter, but it always adds in a
comma between the existing INNER JOIN statements and the one I'm
trying to add (which leads to a MySQL error). That makes sense because
its mea
> I also get an error when I try 'parent.name'.
Try just 'parent'. It will display whatever is coming out of your
model by default (in the __str__() or __unicode__() method). That will
probably do it for you, but you can access the other information if
you write a method for it:
class Child(mode
I have four models that I want to combine into one report. The manual
SQL is pretty easy, three INNER JOINS. I just can't figure out how to
get the ORM to do it. I'm using the auth app with a custom profile
model and that seems to be the issue, since the User model doesn't
have a foreignkey to the
> I can't get a user object to return from authenticate. any
> suggestions?
>
Unless you imported Auth into the local namespace you need to call
auth.authenticate().
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"
You have to develop your apps specifically for GAE though, so it's not
really a Django host. You can't use large parts of Django, such as the
ORM. The template engine is nice and easy to use though.
On Apr 16, 2:58 pm, xet7 <[EMAIL PROTECTED]> wrote:
> Hi,
> you could sign in to Google App Engine
> I have never used it myself but there Google does offer an ajax search
> api athttp://code.google.com/apis/ajaxsearch/
> Not exactly django but you could probably still get it into a
> template.
> Josh
>
Yep, that's what replaced the old SOAP API. If you have a SOAP key it
still works, but you
37 matches
Mail list logo