you should have a backup of your data in the case
where is no way to get the data back
On Jan 17, 10:18 am, gintare wrote:
> Is it possible to undo model.filter( field_gte = datemin ).delete()
> if it was the action, which happened from function in views.py, by
>
what happens if you set fail_silently to True?
On May 19, 12:05 am, Nick wrote:
> I am having an issue with an authentication app I am writing. The app
> saves the form appropriately but doesn't send the confirmation email.
> I am using the same email_host settings as with
install MySQLdb :)
On May 5, 1:23 pm, Etienne Python wrote:
> On May 5, 12:42 pm, Daniel Roseman wrote:
>
>
>
> > On May 5, 11:06 am, Etienne Python wrote:
>
> > > Hey all,
>
> > > I'm a real beginner at both Django and
sure, simplejson is your helper
On May 4, 4:34 pm, zweb wrote:
> Is there a django or python equivalent of php json_encode?
>
> the data I am converting to json has text fields that have quotes,
> double quotes, newlines and html tags. Creating json manually in my
>
if you don't use django-registration, when listen on signal post_save
for User, check if is_active == True and do something.
On May 4, 2:45 pm, Sander wrote:
> someone got an answer to this one?
> is there some kind of is_activated signal?
>
> Sander
>
> On Apr 3,
i would use reverse and redirect to a "success" page
def my_view(request):
#do stufff
#save info in session
return HttpResponseRedirect(reverse('success_url'))
def my_success_view(request):
#access the session and get the data
return render_to_response('success.html',
QL "select distinct(year) from project" it works
> fine, but I dont think its very elegant...
>
> On 3 maio, 07:31, "ge...@aquarianhouse.com" <ge...@aquarianhouse.com>
> wrote:
>
>
>
> > To use distinct in this context is not a good idea.
>
>
To use distinct in this context is not a good idea.
Better use aggregate and count the years.
http://docs.djangoproject.com/en/dev/topics/db/aggregation/#generating-aggregates-over-a-queryset
On May 3, 12:27 pm, Thales wrote:
> Hi everybody,
>
> I have a model called
d_python currently not WSGI.
>
> On Thu, Apr 29, 2010 at 9:57 PM, ge...@aquarianhouse.com <
>
>
>
> ge...@aquarianhouse.com> wrote:
> > Sure, with WSGI script reload
>
> > On Apr 29, 6:51 pm, Kashif Ali <kashi.az...@gmail.com> wrote:
> > > Hi,
Sure, with WSGI script reload
On Apr 29, 6:51 pm, Kashif Ali wrote:
> Hi,
>
> Is it possible to refresh changes to apache (webserver) without restart it?
> Actually i have multiple databases that i need to change while the webserver
> is running. Is it possible?
>
> Or any
http://docs.djangoproject.com/en/dev/howto/custom-file-storage/
On Apr 29, 6:48 pm, xRobot <ciaosonoanto...@gmail.com> wrote:
> No I am newbie and I don't know how to overwrite storage... could you
> help me ^_^ ?
>
>
>
> On 29 Apr, 12:46, "
Did you try to overwrite the storage?
On Apr 29, 6:16 pm, xRobot wrote:
> I want to use str(uuid.uuid4()) instead of the name uploaded.
>
> For instance: I have this model:
>
> class foo(models.Model):
> pic = ThumbnailField(upload_to='pics', size=(200, 200))
>
> I
but when calling
> pisaDocument with the generated data it hangs and after a while it
> gives timeout.
>
> On Apr 22, 4:59 pm, "ge...@aquarianhouse.com"
>
>
>
> <ge...@aquarianhouse.com> wrote:
> > we say the whole thing takes 60 sec., how many
In this case it's the wrong place, you have to put the logic into the
form
class MyForm(models.ModelForm):
model = mdlcountry
def country_name(self):
#verify here and give an error
On Apr 22, 3:51 pm, Tom Evans wrote:
> On Thu, Apr 22, 2010 at 2:45 PM,
teps, I can see that the process hangs after the data
> is collected, at the line that calls the pisa.pisaDocument method to
> generate the pdf and write the generated bits in a buffer, which
> should then be sent to response.
> So the bottleneck is at pdf generation step.
>
> On Apr 22,
> On Apr 22, 3:14 pm, Javier Guerra Giraldez <jav...@guerrag.com> wrote:
>
>
>
> > On Thu, Apr 22, 2010 at 6:25 AM, ge...@aquarianhouse.com
>
> > <ge...@aquarianhouse.com> wrote:
> > > I your case i would put this task in queue or kind of a back pro
def save(self, *args, **kw):
if not
mdlcountry.objects.filter(country_name=self.country_name).exists():
super(mdlroomtypes, self).save(*args, **kw)
else:
#do something or do nothing
pass
On Apr 22, 3:14 pm, Radhikavk wrote:
> Model
>
> class
I think that would be a wrong approach.
I your case i would put this task in queue or kind of a back process.
For sure not on demand.
On Apr 22, 1:19 pm, Florin wrote:
> Hi!
>
> I use pisa to generate large pdf files, but it gives opage timeout
> when generating.
> It
did you try:
email = models.EmailField(max_length=60)
On Apr 20, 5:00 pm, CrabbyPete wrote:
> Where in the django.contrib is the models.EmailField defined? I have
> email address that are longer than 60 characters and I want to see if
> I can override it.
>
> --
> You
Did you try http://127.0.0.1:8000/ ?
On Apr 19, 8:51 pm, arpho wrote:
> some days ago after a not clean shut-down django stopped to work,
> after python manage.py runserver, it seems working normally, but when
> I try to connect tohttp://localhost:8000/adminwith
gt; my model has to override or define an "all" method?
>
> Thanks in advance!
>
> On Apr 17, 11:34 am, "ge...@aquarianhouse.com"
>
>
>
> <ge...@aquarianhouse.com> wrote:
> > try with:
>
> > class AddressForm(forms.Form):
>
s?
>
> On Apr 18, 3:14 am, "ge...@aquarianhouse.com"
>
>
>
> <ge...@aquarianhouse.com> wrote:
> > use commit=False
>
> > m = form.save(commit=False)
> > m.user = request.user
> > m.save()
>
> > On Apr 18, 6:06 am, David Lindquist <da
use commit=False
m = form.save(commit=False)
m.user = request.user
m.save()
On Apr 18, 6:06 am, David Lindquist wrote:
> Greetings,
>
> I am trying to solve what seems like an easy problem, but the solution
> eludes me even after many Google searches.
>
> I have a
something like:
f = open("file.mp3", "rb")
data = f.read()
f.close()
return HttpResponse(data, mimetype='audio/mp3')
On Apr 18, 6:34 am, The Danny Bos wrote:
> Heya,
>
> I'm trying to modify the content-type of a page to play an MP3.
>
> Basically, instead of pointing
leave HOST='' # empty
then it's unix sockets
On Apr 17, 10:04 pm, user4f <4fs...@gmail.com> wrote:
> What exaple settings in settings.py for connection to PostgreSQL via
> unix soket?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To
try with:
class AddressForm(forms.Form):
first_and_last_name = forms.CharField(128, 1)
street1 = forms.CharField(128, 1)
street2 = forms.CharField(128, 1)
city = forms.CharField(64, 1)
state = forms.ModelChoiceField(queryset=States.objects.all())
form =
http://www.djangoproject.com/
On Apr 17, 3:06 pm, codecub wrote:
> i want to create a website like whalesalad.com and ive read through
> the python documentation but it doesnt explain building a website out
> of scratch in python
>
> --
> You received this message because
when overwrite the auth module :)
On Apr 17, 12:08 pm, Marconi wrote:
> Hello, I've been googling and I can't find a solution to use email
> instead of username when logging-in that will work in Django 1.1 and
> should also work on the admin side.
>
> --
> You received this
def save(self):
#
Better:
don't overwrite save method
if form.is_valid():
form.save()
and you are fine
On Apr 17, 12:30 am, JoJo wrote:
> Hi all, i have created a site where users can leave messages, and
> their opinions on certain topics, i have the
As already mentioned, the best would be to use
render_to_string('email_template.txt', {'name':'John',
'msg':'message'}) and pass it through.
On Apr 15, 6:13 pm, Tim Shaffer wrote:
> Can't you just concatenate them like so?
>
> message = "Last Name: " + last_name + "
P?[-\w]+
to
?P[-\w]+
On Apr 15, 3:46 pm, Pankaj Singh
wrote:
> Page not found (404) Request Method: GET Request
> URL:http://10.115.4.61:1234/weblog/2010/apr/14/how-it-functions/
>
> Using the URLconf defined in django_project.urls, Django tried these URL
>
Full roadmap: http://code.djangoproject.com/wiki/Version1.2Roadmap
On Apr 15, 1:56 pm, Karen Tracey wrote:
> On Thu, Apr 15, 2010 at 7:51 AM, Sudhakar wrote:
>
> > When is the official release of Django 1.2?
>
>
It seems there is no such table "DatabaseError: no such table:
polls_choice "
./manage syncdb
would help :)
On Apr 15, 10:43 am, Vetc wrote:
> Hello,
>
> I am a new user of Django, i am following the instructions at this web
> page
Sure, use verbose_name='FOO'
On Apr 15, 11:15 am, Alfredo Alessandrini
wrote:
> Hi,
>
> I've this model:
>
> class Persone(models.Model):
> CV = models.TextField()
>
> Can I change the name "CV" when I display it in a formset?
>
> Thanks,
>
> Alfredo
--
You
In this case you should overwrite the auth class.
http://docs.djangoproject.com/en/dev/topics/auth/
On Apr 2, 1:40 pm, Derek wrote:
> I am running Django 1.1 and using the Admin framework with the "built-in"
> user registration functionality.
>
> I need to run some code
i think like this:
def delete_all(self):
Categories.objects.filter(parent_category=self).delete()
On Mar 29, 3:55 pm, mouadino wrote:
> hello everybody
>
> I have a model class where i m using a foreign key self-referencing
> here is my code :
>
> class
If it doesn't exist it would throw an exception.
On Mar 23, 3:21 pm, jrs <j...@framemedia.com> wrote:
> On Mar 23, 10:05 am, "ge...@aquarianhouse.com"
>
> <ge...@aquarianhouse.com> wrote:
> > Filter would be better :)
>
> > Container.objects.filter(
&
Filter would be better :)
Container.objects.filter(
pk=container_id
).delete()
On Mar 23, 2:55 pm, jrs wrote:
> I have a statement---
>
> Container.objects.get(
> pk=container_id
> ).delete()
>
> This seemingly trivial operation hammers the
like this is also fine:
os.path.join(os.path.dirname(__file__),'templates'),
On Mar 18, 3:16 pm, brooder wrote:
> http://docs.djangoproject.com/en/1.1/intro/tutorial01/#intro-tutorial01
>
> Tutorial 1 says: "When specifying the path, always use forward
> slashes, even on
':
form = ActionForm(request.POST)
#
return render_to_response('tmp.html', locals())#etc...
On Mar 18, 3:11 pm, Benedict Verheyen <benedict.verhe...@gmail.com>
wrote:
> ge...@aquarianhouse.com wrote:
> > Hi,
>
> > I hope I understood it right. You could set t
Hi,
I hope I understood it right. You could set the field to
editable=False, the rest Django will take care.
Btw, you have a typo "attachement" should be "attachment" I think.
On Mar 18, 2:47 pm, Benedict Verheyen
wrote:
> Hi,
>
> i have a problem when saving a
gt; DEBUG = True
> TEMPLATE_DEBUG = DEBUG
>
> I'll read up on setting up a 500 error page to see if that helps.
>
> On Mar 16, 11:32 am, "ge...@aquarianhouse.com"
>
> <ge...@aquarianhouse.com> wrote:
> > We need more infos.
>
> > Is it on the tes
We need more infos.
Is it on the test server or on the prodution server?
Is DEBUG on?
If debug is off and 500 is beeing showed when maybe django is trying
to find "500.html" and if it's not available when this error happen
like you have.
On Mar 16, 4:22 pm, Stodge wrote:
>
well, something is missing, like
def save(self, *args, **kwargs):
#your code
but in our case the form class should do the validation...
On Mar 15, 5:07 pm, When ideas fail wrote:
> Hello, I've been trying to create a save method which resizes an image
> if it is
{% with o.id as key %}{{ dictionary.key }}{% endwith %}
would be better, as in comments mentioned
On Mar 15, 3:14 pm, "pjrhar...@gmail.com" wrote:
> You'll need a custom template tag. Something like this will probably
> do:
>
>
it seem to me, it's in the template.
when it should work like this:
{{ request.META.REMOTE_ADDR }}
btw:
> 'request.METTA['REMOTE_ADDR']' <--- in META is one T to much
On Mar 15, 2:45 pm, Ken Lacey wrote:
> Hi
>
> I am trying to access the remote addr in a view.
>
> Using
it should work with:
body = unicode("Treść", 'utf-8')
On Mar 14, 3:49 pm, Michał Klich wrote:
> Hi,
> I do not fully understand how this works.
>
> I have
> subject = "Temat"
> body = "Treść"
> from = some.em...@dot.com
> to = some.em...@dot.com
>
> send_email(subject,
Hi
just use ./manage.py inspectdb ;)
--
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...@googlegroups.com.
Check it with regex?
re.compile("[a-z0-9]\.[a-z]{2,6}$", re.I)
--
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
maybe like this?:
def up(model, **kw):
m.objects.filter(pk=model.pk).update(**kw)
--
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
50 matches
Mail list logo