Hello everyone,
Firstly, I've been using Django for quiet sometime now and have
created a few projects and many of my websites run it. I am wanting
to take my Django management to the next level, and need to use the
os.fork() function, here's why.
I am planning on developing a web control pa
May be you can try database long connection.
On Fri, Aug 19, 2011 at 10:44 AM, Andre Terra wrote:
> I think a better solution would be to use a store rather than cache
> (protip: redis) and, if the calculations are lengthy, write a
> 'publish' function that writes them to the store and let the u
When I set DEBUG flag true, Django admin site works fine.
But when I change it to false, it throws me the page not found in
Django admin site (except main page of admin site, Groups page, and
Users page)
Anyone help?
--
You received this message because you are subscribed to the Google Groups
You can't map python processes to users. It's simply not how it works.
This is the web on the 21st century, rethink your concepts instead of
trying to fit them on to a completely different paradigm.
Change is good. Embrace it.
Cheers,
AT
On 8/18/11, michael kapelko wrote:
> I think about 50
I think a better solution would be to use a store rather than cache
(protip: redis) and, if the calculations are lengthy, write a
'publish' function that writes them to the store and let the user
choose when to see the changes in the results appear on the website.
Additionally, add a 'modified sin
Until you install some third party app that accesses
User.objects.all() and then suddenly nothing works as it's supposed
to.
You can access the User object from its related UserProfile instance
and do everything you say from there instead of breaking the
convention. Nobody's stopping you from writ
It seems that by definition, an M2M field is basically symettrical, at
least underneath. However, I'm having trouble figuring out how to
access and set M2M fields in the Django Admin via the Model that
doesn't declare the M2M.
Here is the example I've been working with to try to figure it out:
Hi, thank you for your response
It seems that there is an error when I asked for help in google
translation
i have
a form
two views: plot(request) who return an httpresponse and
showgraph(request) who return a template (affichage.html)
call the function plot(request)
in my views and return an ht
I think about 50 users, but Django for each sounds too much.
--
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
Lately, I have been looking at using subclasses of auth.User as a way of
segmenting users.
This appears (to me, at this stage, anyway) to have several advantages over
using the UserProfile approach.
* You can have extra attributes on the subclass. For instance, one set of
users belong to a Com
As defined your id field doesn't differ from Django's default. Just get
rid of your custom id field.
--
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 g
ok guys, no need any help, i have solved it. it was all about altering
the database with manage.py sql ... i did the procedure from
beginning, it automatically solved.
thanks
On Aug 19, 2:51 am, furiston wrote:
> i could not recognize the problem when i add a datetimefield to my
> model i can't
On 18-08-11 22:42, Shawn Milochik wrote:
This was actually discussed in a talk by Adam Baldwin at DjangoCon 2010:
http://www.ngenuity-is.com/blog/2010/sep/10/pony-pwning-djangocon-2010/
Ah, that's useful!
I don't believe it's a good idea at all to disregard something like
mod_security just be
In my model I have
id = models.AutoField(primary_key=True)
but upon saving a new record I get
null value in column "id" violates not-null constraint
I suspect this may be caused by my overriding save_model in admin.py to
populate timestamp fields:
def save_model(self, request, obj, form, cha
i could not recognize the problem when i add a datetimefield to my
model i can't get that model on admin page.
i use mysql. without datetimefield it works. but when comes to add
datetimefield to the model it stucks i get that error message. (ok. i
didn't create 500.html, but i will :))
Traceback (
Humm, I see, the second case I could make out of it somehow(just have
some doubts in 2.5: How am I supposed to do this?)
The first one I could't see how I'm not going to lose the changes,
done in cache.
My biggest problem is in altering some value in some models, since
this operation will be done m
My existing database schema has a primary key field named "id" in every
table. I want to have Django Admin automatically populate this field and
display it in read-only mode in both the change list and edit form.
Because the field name is "id", I understand that this will automatically be
included
How many different users are connected at the same time?
Would it be feasable to start one django prcoess for each connected user?
On 08/18/2011 11:55 AM, michael kapelko wrote:
> I think I have to emulate Delphi app with a server process, and make
> Django interact with the process. The process
Thanks Kev,
It was exactly what I needed.
Regards,
On Thu, Aug 18, 2011 at 10:45 PM, Kev Dwyer wrote:
> Andre Lopes wrote:
>
>> Hi,
>>
>> I am new to Django... I have made a logout link, but now I am in doubt
>> on which the best way to show/hide this template tag:
>>
>> [code]
>> Logout
>> [/
Andre Lopes wrote:
> Hi,
>
> I am new to Django... I have made a logout link, but now I am in doubt
> on which the best way to show/hide this template tag:
>
> [code]
> Logout
> [/code]
>
> Which is the best way of show/hide this link?
>
> Sorry if it is a basic question.
>
>
> Best Regards,
I have created the following TagBase and each category can have
subcategory... Will this work? How can I override its add function in the
TaggableManager?
class Category(TagBase):
parent = models.ForeignKey('self', blank=True, null=True,
related_nam
Hi,
I am new to Django... I have made a logout link, but now I am in doubt
on which the best way to show/hide this template tag:
[code]
Logout
[/code]
Which is the best way of show/hide this link?
Sorry if it is a basic question.
Best Regards,
--
You received this message because you are su
Hi. I bumped into a problem with djnago autoreloader (using standard
runserver command) recently - when i update my views.py file it does not
reload the server automatically. (while it does, if i update my project's
settings.py file)
Looking at the code (django/utils/autoreload.py) - i discovere
This was actually discussed in a talk by Adam Baldwin at DjangoCon 2010:
http://www.ngenuity-is.com/blog/2010/sep/10/pony-pwning-djangocon-2010/
I don't believe it's a good idea at all to disregard something like
mod_security just because we're using Django, because mod_security isn't
l
On 18-08-11 18:35, KC LEE wrote:
Hi,
I am running a website built with Django.
For security, I am going to install mod_security on my web server.
Anyone use mod_security with Django? Is mod_security useful?
I heard that Django can defend many attacks (like csrf, XSS, SQL
Injection..
On 08/18/2011 04:22 PM, Mike Seidle wrote:
When I started with Django, I ran into the same issue... seemed kind of silly
that we had this amazing framework that did so much but it had no way to
really alter tables... Enter South. South works pretty well, but if you roll
your own ModelFields it
On 18-08-11 17:44, MikeKJ wrote:
'dict' object has no attribute 'META'
...
▶ Local vars
/var/www/django/eco/django/core/context_processors.py in debug
if settings.DEBUG and request.META.get('REMOTE_ADDR') in
settings.INTERNAL_IPS: ...
Apparently the request is now a
On Thursday, August 18, 2011 12:03:00 pm smith jack wrote:
> at last, i use command python manage.py syncdb
>
> but was suprised to find that the schema of url table in the database
> is not changed
>
> so is there any method to change the shcema of table using django command?
When I started wi
On 17-08-11 21:32, smartaz wrote:
if I call this view for an url: (r $' ^plot / image.png ', 'contact ')
which comes from a form where I put
{% csrf_token %}
the graph is correctly displayed as picture in a page html
http: // 127.0.0.1:8000 / graphs / contact / image.png
That url doesn't see
On Thursday, 18 August 2011 16:44:51 UTC+1, MikeKJ wrote:
>
>
> I have this old site that was originally pre magic and got ported up 0.96
> where it still is and now have to make some alterations, this is a clone
> site to do something different but the same BUT on getting to the
> subsubcategory l
I am also looking for the same HELP ANYONE?
On Thu, Aug 18, 2011 at 10:05 PM, KC LEE wrote:
> Hi,
>
> I am running a website built with Django.
>
> For security, I am going to install mod_security on my web server.
>
> Anyone use mod_security with Django? Is mod_security useful?
>
> I heard
You probably don't want to cache changes. Or if you do, it would be
better done elsewhere (like a caching raid controller/w battery on
your database machine). The usual cache patterns I've seen are:
1) Fetch from database
2) Store in cache with a reasonable timeout to that changes are
reflected
As was mentioned previously, South is the best solution in Django at
this time.
south.aeracode.org
The docs are good, there's a Google Group you can join, and plenty of
people on this list use it all the time and can help with it.
Shawn
--
You received this message because you are subscribe
Ok, so I've read this topics(and also the django-cache-utils, although
I didn't understand this one much).
So I can serialize the objects and save them in cache, ok, but, when
the cache timesout I'll lose the data that was changed and saved in
the cache, isn't it?
Is there a way to to this in the c
Hi,
I am running a website built with Django.
For security, I am going to install mod_security on my web server.
Anyone use mod_security with Django? Is mod_security useful?
I heard that Django can defend many attacks (like csrf, XSS, SQL
Injection... and so on...)
--
You received this m
https://docs.djangoproject.com/en/dev/internals/contributing/translations/
On Thu, Aug 18, 2011 at 12:28 PM, Federico Capoano wrote:
> How can I contribute?
>
>
> On Aug 13, 6:50 am, Karen Tracey wrote:
> > On Thu, Aug 11, 2011 at 2:58 PM, Federico Capoano
> > wrote:
> >
> > > Hi all,
> >
> > >
Assuming I understood what you're trying to do, why not write a template tag
(more specifically, an inclusion tag)?
Cheers,
AT
On Thu, Aug 18, 2011 at 11:47 AM, samuele.mattiuzzo wrote:
> I'm not using haystack, since is strictly model-related. My solr
> instance isnt' bound to any model (since
Another alternative would be to access mysql from a shell and add the column
to the relevant table
mysql>> alter table x add column hits int(11) null; for example
thinke365 wrote:
>
> for example at first i have a model named url, the code is as follows:
>
> class url(models.Model):
>
I'm the developer of rpc4django. The package does support SMD
generation and it makes it available in the system.describe() method
by default. However, JSONRPC is not nearly as well defined as XMLRPC
and nobody seems to agree exactly how an SMD should look let alone
what SMD even stands for. I trie
What I do is remove the database and them run the syncdb command again.
Some people might recommend migrations using South.
Regards.
Sent from my BlackBerry wireless device from MTN
-Original Message-
From: smith jack
Sender: django-users@googlegroups.com
Date: Fri, 19 Aug 2011 00:03
for example at first i have a model named url, the code is as follows:
class url(models.Model):
link=models.URLField(unique=True)
then i change this class as follows:
class url(models.Model):
link=models.URLField(unique=True)
hits=models.IntegerField()
at last, i use command pyt
I have this old site that was originally pre magic and got ported up 0.96
where it still is and now have to make some alterations, this is a clone
site to do something different but the same BUT on getting to the
subsubcategory level (sorry my naming conventions back then really sucked) I
am getti
How can I contribute?
On Aug 13, 6:50 am, Karen Tracey wrote:
> On Thu, Aug 11, 2011 at 2:58 PM, Federico Capoano
> wrote:
>
> > Hi all,
>
> > i'm using the new GenericIPAddressField and validation errors are not
> > translated to the language of my project.
>
> > Pheraps this field hasn't been
I'm not using haystack, since is strictly model-related. My solr
instance isnt' bound to any model (since i don't use any backend DB to
store my data)
i need something like get_full_path or get_absolute_url, but not
modell-related in this case...
On 18 Ago, 16:37, Andre Terra wrote:
> Searchin
Searching with Django = http://haystacksearch.org/
Behold the power of pluggable apps.
Cheers,
AT
On Thu, Aug 18, 2011 at 11:34 AM, samuele.mattiuzzo wrote:
> Hi!
> I'm stuck with a problem... more confused than stuck, actually.
>
> I have a search engine i'm working on, and we're using GET me
You can use the cache framework for pretty much anything you want, including
saving serialized results of calculations, querysets and whatnot.
Please read:
https://docs.djangoproject.com/en/dev/topics/cache/
https://docs.djangoproject.com/en/dev/topics/cache/#the-low-level-cache-api
https://docs.d
Hi!
I'm stuck with a problem... more confused than stuck, actually.
I have a search engine i'm working on, and we're using GET method to
perform searches. In the listing page, i have my search results on the
left and some filters on the right, something like google's filter.
my filters are all bl
Thanks! This module didn't come across in my search.
I just skimmed through the files and it seems as if the module doesn't
support automatic SMD generation. Is this true?
On Aug 17, 5:43 pm, Gelonida N wrote:
> Hi Muhammad,
>
> On 08/17/2011 08:18 PM, MuhammadChoudrywrote:
>
>
>
>
>
>
>
> >
On 08/18/2011 09:24 AM, Andre Terra wrote:
Your instance is probably not yet saved to the database, so the
m2m-related objects don't know which instance to connect to. There's
problem something wrong in your save() method. I often use "assert
False, some_var" to check if at some point the variabl
The Django Book is a useful general introduction; but now more than 2
years old. In a framework like Django, which is under constant
development, such old information gets out-of-date very fast. Tom
correctly pointed you to the docs; and that is really the best place
to work from now that you are
Hi there, I was doing some project recently and faced a problem of
performance.
I need to be able to do a lot of access to some information on the DB,
almost all the time, and doing so seams to be taking too long.
Is it possible do do something like this:
Get the infos from the BD and put them in
Your instance is probably not yet saved to the database, so the m2m-related
objects don't know which instance to connect to. There's problem something
wrong in your save() method. I often use "assert False, some_var" to check
if at some point the variable is already set or not.
And I get the same
Do create a UserProfile with an FK to user, but add an FK to Group as well.
This way you can take advantage of the existing Permissions application
which would allow/deny users access to various parts of your application.
Just make sure your views take those permissions into consideration!
Cheer
Try using "Groups" that is part of the Django user authentication.
https://docs.djangoproject.com/en/dev/topics/auth/
On Aug 18, 6:56 am, Cameron wrote:
> Hi, I'm wondering if anyone can help shed some light on the best
> approach is too creating different Users. I'm trying to make a online
>
Hi, I'm wondering if anyone can help shed some light on the best
approach is too creating different Users. I'm trying to make a online
shop, that features two types of Users, "Customers" and "Merchants".
The power of each Users vary greatly, Customers can buy items from
Merchants and Merchants can
On 18 August 2011 11:55, michael kapelko wrote:
> I think I have to emulate Delphi app with a server process, and make
> Django interact with the process. The process can login to DB
> directly. That's not so easy, but I guess that's the only option here
> - move Delphi app from client machine to
I think I have to emulate Delphi app with a server process, and make
Django interact with the process. The process can login to DB
directly. That's not so easy, but I guess that's the only option here
- move Delphi app from client machine to server one.
--
You received this message because you ar
On 18 août, 08:15, Jirka Vejrazka wrote:
> I can't see how you could change Django easily. You could experiment
> with creating settings dynamically and closing DB connection just
> before user logs in (Django can open it again when it needs it) to use
> your "dynamic" DB connection,
The connecti
On Thu, Aug 18, 2011 at 4:44 AM, Shawn Milochik wrote:
> I have some code that modifies related items when a model is saved. I've
> tried this by both using a post_save signal and by putting the code directly
> in a save() override.
>
> When I save an instance in the Django admin, it never works.
On Wed, Aug 17, 2011 at 8:39 PM, Daniel Roseman wrote:
> On Wednesday, 17 August 2011 19:00:13 UTC+1, Adam Zedan wrote:
>>
>> Hi it seems I cant access data from local static paths such as
>> c:\\somefolder\somefile.gif in my templates when I enter the url
>> the code for my template is simplified
To answer my own question;
I performed some tests with the Apache benchmarking tool. I performed
5000 requests over 10 threads to a local server running lighttpd with
FastCGI, multiple passes over a few hours, with my middleware disabled
for one pass and disabled for another.
The passes were both
hi,
I had a same problem as you before, and I spent much of time on it, but
could not get it goal.
And the DATAVASES in settings.py is loaded when the server running.
If you can let the project reload the settings, you may resolve the problem.
Or you can use MySQLdb to do it.
Sometimes we can
62 matches
Mail list logo