When I create the following model I get an index for field2 with syndb
or sqlindexes. Why doesn't it create an index for field3?
from django.db import models
class Entitat(models.Model):
field1 = models.CharField(max_length=4, unique=True)
field2 = models.CharField(max_length=4, db_index=T
Hi all,
I installed the django-avatar app in my project and, in a template, i have
the {% load avatar_tags %} and {% avatar user 65 %} template tags. When I
load the page and view source, the avatar's alt tag is correct but the image
src is wrong. It appears relative to the template's directory in
Update: I added AVATAR_STORAGE_DIR = MEDIA_ROOT to my settings.py file.
When I load the page, the avatar's src is
"C:/Websites/TPFRepository/projectname/media/username/image.jpg" - which is
correct. if i paste that into Windows Explorer, I do find the image.
Still, it is not displayed on the page
On Nov 5, 6:51 am, derek wrote:
> Fred
>
> This seems not related to the original topic; please start a new
> thread.
That seems to be a constant issue with Fred's posts: I think every one
of his that I've seen has been added onto the end of an existing
thread, while changing the subject.
Fred,
On Nov 3, 12:43 pm, octopusgrabbus wrote:
> Does anyone have samples for auto logging out a user?
What do you mean by 'auto logging out'?
--
DR,
--
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...@
ive built a mini shop as part of a project. im trying to drag content
in from csv, using one of the django snippets link:(http://
djangosnippets.org/snippets/788/)
so my models are Brand Category Product and product references both a
brand and a category.
python csvimport.py --csv dubkorps.csv --
Dear all,
I am just learning the ropes of django so please direct me to a better
place if my question has been asked a million times before or plain
ridiculous.
I am managing a website that uses the django platform -- I am not
responsible for building it from scratch so the basic functionality is
instead this:
MEDIA_URL = os.path.realpath(PROJECT_PATH + '/media/')
try:
MEDIA_URL = '/media/'
2010/11/5 Sithembewena Lloyd Dube
> Update: I added AVATAR_STORAGE_DIR = MEDIA_ROOT to my settings.py file.
>
> When I load the page, the avatar's src is
> "C:/Websites/TPFRepository/projectname/media
Mario, thank you very much! You just made my day.
Regards,
Lloyd
On Fri, Nov 5, 2010 at 1:23 PM, Mário Neto wrote:
> instead this:
> MEDIA_URL = os.path.realpath(PROJECT_PATH + '/media/')
> try:
> MEDIA_URL = '/media/'
>
> 2010/11/5 Sithembewena Lloyd Dube
>
>> Update: I added AVATAR_STORAGE_D
Thanks. I put back the {% block title %}, {% block head %}, and {%
block content %} directives, corrected the error in forms.py, but the
field still won't display. Any other ideas to try?
On Nov 4, 6:44 pm, Daniel Roseman wrote:
> On Nov 4, 10:32 pm, octopusgrabbus wrote:
>
>
>
> > I have a form
Hi Ellen,
Sounds like what you're looking to do is template inheritance. You can
most definitely add dynamic bits of code based on individual pages.
Some documentation on the topic can be found here:
http://docs.djangoproject.com/en/dev/topics/templates/
Basically what I think you'll need is to c
On Nov 5, 8:26 am, Ellen wrote:
> Dear all,
>
> I am just learning the ropes of django so please direct me to a better
> place if my question has been asked a million times before or plain
> ridiculous.
>
> I am managing a website that uses the django platform -- I am not
> responsible for buildin
On Nov 5, 12:10 pm, octopusgrabbus wrote:
> Thanks. I put back the {% block title %}, {% block head %}, and {%
> block content %} directives, corrected the error in forms.py, but the
> field still won't display. Any other ideas to try?
Not really. Do those blocks exist in the parent template? Can
In the middle of the night, I started getting a bunch of emails about
server errors on my Django app. I haven't touched it for over a
month.
I logged onto the server and restarted Apache.. the error continued
popping up for a couple of seconds, and then everything went back to
normal.
Any ideas
Maybe slightly "off topic" but does anyone have robust strategies for
readily switching between different DB-specific SQL code which is
(presumably) embedded in one's app/project? (As shown in the two
examples presented here)
On Nov 5, 1:10 am, David Zhou wrote:
> FWIW, on Postgres DBs, I've don
In "Live HTTPS headers", a FF plugin, I see this:
http://cstoolstest.tnc.org/search/search?q=conservation&collections=EAST%7CTEA&start=1
GET /search/search?q=conservation&collections=EAST%7CTEA&start=1 HTTP/
1.1
Host:
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:
1.9
I'll add my 2c here...
I don't think you need to create an app for this (not yet). Just
create a normal Django project and go from there. Apps are more meant
for very generic types of functionality that can be used in many, many
situations e.g. tagging.
Your design is still very broad and so ha
Its not clear exactly what you think the problem is. The system is
behaving correctly ito the way you have set it up.
1. You have specified that name and address are compulsory fields in
Place.
2. You have specifed that Restaurant must be linked to Place (i.e.
Place must be created before Restaur
Actually, I just realized that Python is crashing silently during one
of my method calls. But, this only happens when coming through Apache
and not when I hit Django's own server directly. :(
Thanks for the help!
On Nov 5, 9:31 am, Eric wrote:
> In "Live HTTPS headers", a FF plugin, I see this:
I'm not trying to create a Restaurant without a name and address. I'm
trying to turn an existing Place into a Restaurant.
On Nov 5, 9:42 am, derek wrote:
> Its not clear exactly what you think the problem is. The system is
> behaving correctly ito the way you have set it up.
>
> 1. You have spe
Thanks. I'm starting from the beginning and will eventually get back
to this level of template extraction.
On Nov 5, 9:00 am, Daniel Roseman wrote:
> On Nov 5, 12:10 pm, octopusgrabbus wrote:
>
> > Thanks. I put back the {% block title %}, {% block head %}, and {%
> > block content %} directives
I had a similar problem where I needed to get read-only access to a
Django model from a system script. I'm not sure what information
you're trying to pull, but in my own case I just wrote a view that
dumped the info I needed and write a simple authentication function
that tested the visitor's IP ad
Thanks for the advise, I had considers this option, and I really dose
seem that apps are move for generic features as you pointed out but I
have about 10 tables which are as depended in structure as the ones
noted above. I really don't what to have too much code in one view.py
or model.py file. For
You mean "trying to add a Restaurant which is linked to an existing place"
I am not familar with the syntax you are using for the **{} wrapper.
The original example shows:
r = Restaurant(place=p1, serves_hot_dogs=True, serves_pizza=False)
and the attached note says:
Pass the ID of the "parent"
Celery is exactly what I'm looking for! Thanks! :)
On 4 November 2010 13:41, Brian Bouterse wrote:
> I would look into django-celery to do asynchronous tasks. It can also be
> executed as a webhooks style, see here.
>
> Brian
> On Thu, Nov 4, 2010 at 3:31 AM, Elver Loho wrote:
>>
>> Hi,
>>
>> I
**{} is sort of the inverse of **kwargs in a function signature --
it's a way to use a dictionary in place of keyword arguments, and
should function identically.
Which "original example" are you referring to?
On Nov 5, 10:25 am, Derek wrote:
> You mean "trying to add a Restaurant which is link
Yep, that is what it was. Our SA did some Googling and found the
solution to the problem.
http://code.google.com/p/modwsgi/wiki/IssuesWithExpatLibrary
Thanks for the help and thoughts.
On Nov 5, 9:47 am, Eric wrote:
> Actually, I just realized that Python is crashing silently during one
> of m
Greetings!
I have installed the latest django on windows, and the current folder
structure here is :
clinicmanager\clinic - my app
clinicmanager\templates - template dir
i m using settings.py in clinicmanager\settings.py
TEMPLATE_DIRS = (
"C:/drives/workarea/Django/django/bin/clinicman
Thank you Sid! Early on there were no responses to my question, and I
hadn't looked recently. So just now I got back to this issue and
googled "django error email user" and what a suprise to find my own
question (with your response) came back near the top of my search!
Your response was so excell
I've been trying to split tests.py, but I've noticed that models
defined inside test module does not work. Normally one can define
models in tests.py like this:
class JSONFieldModel(models.Model):
json = JSONField()
class JSONFieldTest(TestCase):
def setUp(self):
pass
def tes
Hi,
Is there a way to combine a set of fields I have in a model class into
a different class without it having it's own separate table?
An example:
I want to implement the user profile model class, and in it I would
like to have the address of the user.
The address is group of fields (city, stree
I've stopped using a particular app in my project. I've used South
to remove its tables, but I still see those tables referenced by the
auth, content_type, and django_project_version tables.
Is this ok? Anyone know if it will cause me any problems down the
line?
Margie
--
You received this m
I need to sort results alphanumerically. Thanks to some code floating
around #postgres (http://www.rhodiumtoad.org.uk/junk/naturalsort.sql)
I now have some handy operators to do just that. The raw sql I'd issue
to ensure that the results are sorted correctly would be something
like "select * from f
Thank you very much Russ,
the missing comma was indeed the problem. Having corrected my syntax
it runs fine. :D
jt
On Nov 5, 12:25 am, Russell Keith-Magee
wrote:
> On Fri, Nov 5, 2010 at 11:59 AM, jt wrote:
> > Hi,
> > I'm just starting out. Things ran fine until I uncomment out:
> > (r'^admin
Margie,
I believe this may cause issues if for some reason that there is a call to
those tables and it still finds a reference to it. Remember to go and remove
them from the admin register that should get rid of all references to them.
Michael
I've stopped using a particular app in my
35 matches
Mail list logo