I have two tables as shown below.
class AlertTable(models.Model):
id = models.AutoField(primary_key=True)
alarm_text = models.CharField(max_length=800,blank=False,null=False)
event_type = models.SmallIntegerField(blank=False,null=False)
created = models.DateTimeField()
class Me
I downloaded the latest code from stable/1.7.x branch and this problem no
longer exists.
On Monday, August 4, 2014 8:06:00 AM UTC-7, Sam Contapay wrote:
>
> Hi,
>
> I tried adding a foreign key to a model in a Django app I'm building to
> learn 1.7. I am using Python 3.4 and Django 1.7c2
>
> #bl
>
> - does the product exist?
>
Yes,
- is the cart_item really not created? (or is the cart the thing not being
> created?)
>
The cartItem is created, but it shown if I request again the url
1) request: /cart/?add=productslug
2) response: without the new item
3) request : /cart/
4) response: th
database save is not async.
a few possibilities:
- does the product exist?
- is the cart_item really not created? (or is the cart the thing not being
created?)
- is the prefetch_related pre-caching the related cart items, so in the
template it doesn't see the new item? (hint: redirect to the sam
Hi Guys,
I've update my site from django 1.3 to 1.5
The site works fine, except for a view, the template renders before the
obj.save() in the view:
def cart(request):
try:
cart =
Cart.objects.prefetch_related('cartitem_set__product__category').get(id=request.session['cart_id'])
I've went through a few different ways. If your set on using apache,
Configure Apache with Mod-WSGI on a server.
Here's a Good Tutorial:
http://thecodeship.com/deployment/deploy-django-apache-virtualenv-and-mod_wsgi/
If you're having trouble with that and your app isn't too demanding you can
e
I have a Django app up and running and It's more mobile based than a web
app. I'm new to development with both Django and Android. I've setup an API
using Django-Tasty pie and I can get JSON data from my models,including the
user model that comes with Django. I've implemented logging in function
Collin, worked a charm - thankyou!
L.
On 1 August 2014 22:51, Lachlan Musicman wrote:
> Thanks Collin, I'll test on Monday
> L.
>
> On 1 August 2014 22:47, Collin Anderson wrote:
>> redirect is a django shortcut for an http redirect response, not a file/pipe
>> redirect. You need to use a python
Hi Clifford,
Thanks for your detailed answer.
Regards,
Zoli
> Hi Zoli,
>
> I'm assuming that you're not using virtualenv right now. The best way to
> do this is to use virtualenv, virtualenwrapper, and a revision control
> system like Mercurial. The workflow goes something like this.
>
> m
If you have no data that is important, I'd just delete the database and
start fresh. If you're using sqlite you can simply `rm db.sqlite3` and then
run python manage.py migrate again.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscr
Django-1.6.5
W dniu poniedziałek, 4 sierpnia 2014 13:34:41 UTC+1 użytkownik Collin
Anderson napisał:
>
> What version of django are you using?
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving
You are saying you have a div with id="loading" with the image in it that
is not being shown?
loading image here
--
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
Do you get an error if you wrap it in an if statement?
{% if object.sub_object %}{{ object.sub_object }}{% endif %}
--
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
Hi I'm trying to write a loading script that displays a loading image while
the django backend queries i have written are exectuting. This is to say i
have some very complicated sql queries i call mannually with python by
watching for specific post from the webpage to execute different queries.
Thanks for the clarification!
On Sunday, August 3, 2014 9:16:01 PM UTC-5, Lachlan Musicman wrote:
>
> Not really, it's a Nix thing (ie, OSX and BSD as well as linux).
>
> Basically, if you set the file to be executable (chmod +x) then
> ./filename is a way of executing using the default file ass
I have a model with numerous objects. However, some of these objects have
sub-objects and some do not. When calling up an object with sub-objects,
(linked by a foreign key) I’d like to display
Object
1.Sub object
2.Sub object
And when the user requests an object with no subs, they
Hi,
I tried adding a foreign key to a model in a Django app I'm building to
learn 1.7. I am using Python 3.4 and Django 1.7c2
#blog/models.py
from django.contrib.auth.models import User
from django.db import models
class Comment(models.Model):
user = models.ForeignKey(User, blank=True, nul
What version of django are you using?
--
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 post to this group, send emai
I'd start by reading the docs on deploying with apache and
mod_wsgi https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails fr
Or if you have a "latest" boolean, that would also work.
--
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 post to th
in the python shell try running:
import sys
sys.path
--
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 post to this
I recommend not messing with sys.modules. Does your huge package not have
any other way to override things? Is there a smaller package that you can
use instead?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and
Set MEDIA_URL to '/media/' or something.
Then add static() to your urls.py if you haven't.
https://docs.djangoproject.com/en/dev/howto/static-files/#serving-files-uploaded-by-a-user-during-development
--
You received this message because you are subscribed to the Google Groups
"Django users" g
Kinda worked. I deleted my Poll objects and created a new one. But then, a
few more lines into the tutorial, there are these commands one after
another:
p = Poll.objects.get(pk=1)
p.choice_set.all()
I get: *OperationalError: no such column: polls_choice.choice_text*
It should be simply:
[]
I have created a complete site,
i have configured it to run with mysql using wamp
i have also configured apache in wamp which is up and running
so i want to deploy the site to run as a life page on the internet using
apache
what should i do next
--
You received this message because you are
Hi Chen,
Check this post:
http://stackoverflow.com/questions/15985191/how-can-i-send-e-mail-from-django-using-the-google-smtp-server
I think you are missing the settings for secure SMTP (which google
requires).
Regards,
Andréas
2014-08-04 9:42 GMT+02:00 Chen Xu :
> Hi Everyone,
> I am trying
Hi Everyone,
I am trying to send emails from gmail, I know I can do it if I put the
following in settings.py:
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'exam...@gmail.com'
EMAIL_HOST_PASSWORD = 'password'
But I wonder if I dont specify them, and call it in the following
27 matches
Mail list logo