Django-admin has to be on your environments path. Find where your
Django-admin.oh file is and do the whole path. python
c:\...\Django-admin.python startproject myproject. Maybe you forgot to
activate your virtualenv?
Sorry about random capitalization. Typed on my phone.
--
You received
Just a guess, but have you tried putting it in a file not called models.py?
--
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
Wait-- Why aren't you using exists()? Don't even check the pk.
Model.query.exists() was made for this.
--
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, as far as the front-end is concerned, has little to do with
actually capturing the video. This is going to be on the frontend with
your browser. Depending on your audience, they might not have browser web
capture available and will have to use a browser plugin like flash or
If you ever want to know how the UserCreationForm works, the source is
always available not only on your machine but also on
https://github.com/django/django/blob/master/django/contrib/auth/models.py
On Wednesday, April 24, 2013 9:27:39 AM UTC-6, sachin wrote:
>
> Hello,
>
> I m extending my
For the problem with sorl-thumbnail not resizing to the same size as the
others-- Are you cropping the image at all or just resizing? If you crop,
I don't understand how the images wouldn't be all the same size. When I've
used sorl, if the image is bigger than the dimensions to which I'm
I recommend you take a look at
https://www.djangopackages.com/grids/g/ecommerce/. I've used satchmo a
couple times. I recall setting it up having a couple snags, but nothing
unmanageable. Overriding the templates isn't a big deal if you understand
the TEMPLATE_URLS setting. I haven't
I was looking for something like this for CBVs about a week ago! I'm glad
this guy posted this question more clearly than mine to get this response.
I might try this out! Thanks. This is a very common pattern, I've found,
and wasn't sure why it wasn't included in django's core!
On
What's the best practice for this? In my function based views, I'd check
if the form is_ajax() and if so, validate the form, render_to_string it to
a form template, and return that in a json dump along with a status code.
Then I check the status code to see if there are errors. If so, I
Yeah, for things like forms.py and views.py, it's best to use relative
imports for the models.py within the same app.
from .models import Object1
On Wednesday, February 6, 2013 7:22:19 PM UTC-7, frocco wrote:
>
> I found the answer.
> in my app directory called checkout, I also have a
Check out sorl-thumbnail. https://github.com/sorl/sorl-thumbnail . This
lets you specify the desired size in a template.and can deal with cropping.
It caches the results so it doesn't have to regenerate it each time.
On Saturday, February 2, 2013 1:33:36 PM UTC-7, nYmo wrote:
>
> Hi all,
>
If you're storing your images in your database (don't) then your db
migration should have done it. If you're storing the paths in the
database, let's hope they're relative paths to the images. You'll have to
copy the images to your new server using the same approaches listed above.
One
You can always use itertools.chain() if you want to do it in memory.
Instead of doing it in memory as you've suggested, perhaps you need to
index the account's PK so when your Items object manager queries for them,
it can be quick.
import itertools
list1 = [1,2,3,4]
list2 =
If you go HTML/JS, a phonegap alternative for cross-device compatibility
would be appcelerator.
On Tuesday, September 11, 2012 2:59:12 AM UTC-6, Sait Maraşlıoğlu wrote:
>
> How do you create iphone applications via django.
> Application logic will be django but what about user interface, do we
Did you add the app name in settings.py under the INSTALLED_APPS list?
On Friday, September 7, 2012 10:23:31 PM UTC-6, Kollin wrote:
>
> I create a project. I create app by name "app" in the project. The app
> that :
> app
> __init__.py
> models
> __init__.py
> a.py
>
It would be a travesty to not mention backbone.js.
On Tuesday, September 4, 2012 7:39:49 AM UTC-6, dotnetCarpenter wrote:
>
> Hi all.
>
> I'm new here and just took over a Django project for the first time. I'm
> still getting to grip with Django but as a front end dev for the past 5
> years,
It always just caches the files for me in a completely different directory.
On Saturday, April 28, 2012 1:06:12 PM UTC-6, Swaroop Shankar wrote:
>
> Hello All,
> I am using sorl-thumbnail extensively in my project. It works perfectly
> fine except for one issue which is regarding the storage.
Can't you get a queryset, like
print MyObject.objects.all().query
?
On Feb 21, 7:32 pm, diafygi wrote:
> There's a previous thread about this[1], but it was closed back in
> 2006 without resolution. So I'd like to check back in and see if there
> is a way to get a complete
And by "API" do you mean "ORM?"
On Feb 21, 10:45 pm, Kelly Nicholes <kelbolici...@gmail.com> wrote:
> errr--
>
> django.contrib.auth.models import User
>
> class YourModel(models.Model):
> user = models.ForeignKey(User)
>
> On Feb 21, 10:42
errr--
django.contrib.auth.models import User
class YourModel(models.Model):
user = models.ForeignKey(User)
On Feb 21, 10:42 pm, Kelly Nicholes <kelbolici...@gmail.com> wrote:
> Your YourModelForm is a modelform of a model. If you're setting a
> property of that model,
Your YourModelForm is a modelform of a model. If you're setting a
property of that model, AND YOU WANT IT TO PERSIST IN THE DATABASE,
you set the property equal to the request.user and save that object.
If you don't have a foreignkeyfield to User, there's no way you're
going to associate that
This is link holds the PERFECT answer for you:
http://bit.ly/wc0psc
If you want to do it differently, try:
First you'll have to send an XMLHttpRequest (jQuery post() or get())
to your server to post a form (create a modelform with a "Comment"
model with all of the required fields. You might
Isn't there a form.changed_data ?
On Jan 9, 6:39 pm, Jeff wrote:
> Hi all,
>
> I need to be able to determine, at .save() time (before I call the
> parent class' .save()), if a certain field on my model object was
> changed, and act on that via some custom code. How can I do
You need to set the name parameter. name="card_create_card". Once
you do that, reference it in the {% url %}.
On Aug 7, 6:34 pm, muhdazwa wrote:
> You can add name to the url in the urlpatterns:
>
> urlpatterns = patterns('',
> url(r'card/create$',
I think I had this error too when I was cloning a repo from WebFaction
to use on my local dev machine. I ended up having to replace
WebFaction's manage.py with the one from Django. Let me know if it
works for you! I wish I could explain why. Can't.
On Jan 23, 8:55 pm, Graham Dumpleton
I've found many books that demonstrate how Django can be used.
Django 1.0 Web Site Development
Practical Django Projects, Second Edition
and The Definitive Guide to Django: Web Development Done Right, Second
Edition are all pretty nice. I'd recommend checking these out.
On Dec 31 2010, 6:17 am,
26 matches
Mail list logo