You can make one, but imagine having 12-15 apps and managin all of them in
one admin.py file, that would make debugging harder, the admin.py per app
approach helps you keep all of your app's login inside the app, makes it
easy to re-use it
On Sun Jan 25 2015 at 2:47:18 PM Aliane Abdelouahab
wrote
Hello, in Django 1.7+ you don't use syncdb you use a a mix of:
python manage.py makemigrations
And then use
python manage.py migrate
On Wed Jan 28 2015 at 11:03:06 AM Neto wrote:
> I'm using syncdb to the class CustomUser(AbstractUser), my Django is 1.7,
> how can I user migrate to a customuse
I think for this kind of questions you could benefit from checking
https://www.djangosites.org/
There you can see a list of sites built with Django and get and idea of the
kind of things you could do with it
On Wed Feb 18 2015 at 7:49:02 AM Mukul Sharma
wrote:
> I am new to Django. I want to bu
Hello Valéria,
That's Django's default, it doesn't handle media files by itself, if you
are in development you can add this line to urls.py
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Don't forget you need to import static and settings:
from django.conf import s
Hey, there is a python package you can install in Django called
django-smart-selects its documentation is pretty easy to follow
On Thu, Feb 26, 2015 at 7:23 AM Arumuga Odhuvar Sekkizhar <
vaariyar2...@gmail.com> wrote:
> Good Morning,
>
> Can I get the code or method
Check the git repo, the issues page, one of the issues (I think the 4th)
says that in the tittle, Can not import simple json.
You basically have to install it with pip but from the git branch, because
they haven't updated pypy yet
On Sun, Mar 1, 2015, 6:32 PM Michael Ackary wrote:
>
> Smart Sel
I love DRF, but if you want to check something else, there is also Tastypie!
Here you can find the docs:
https://django-tastypie.readthedocs.org/en/latest/
On Thu, Apr 9, 2015 at 7:54 AM Amit Prahesh wrote:
> Hi,
>
> while Django REST Framework seems wonderful to me, it is a heayweight
> opti
Are you using version control like GIT? I save the migration folder with
the __init__.py in GIT, nothing else, because al the migrations will be
diferent in the diferent servers.
On Sat, Apr 25, 2015, 7:45 AM Filipe Ximenes
wrote:
> You should keep all project migrations, they will be used to up
The easiest way is through pip, install python-dev and then just do in your
terminal a:
pip install MySQL-Python
2014-07-09 7:57 GMT-05:00 François Schiettecatte :
> Hi
>
> I am installing django on Ubuntu and have a question about installing
> MySQL-python?
>
> I know I can get install it on C
Hey, it can be done, it's something like this:
In the Model Class where you created the function you are going to add:
function_name.admin_order_field = 'The field to order'
2014-07-16 13:25 GMT-05:00 alghafli :
> Hello,
> I made a library application. I have books each with its own id numbe
Es más fácil a través de pip, 'pip instal django'
On Jul 26, 2014 4:19 PM, "juantonio v" wrote:
> hola tengo el Django-1.6.5.tar.gz de django, ahora como lo instalo?
>
>
> gracias!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsu
Actually it's not that hard, I followed this tutorial from Digital Ocean to
set up most of my Rackspace Cloud Servers
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-django-with-postgres-nginx-and-gunicorn
2014-08-13 14:41 GMT-05:00 darkman237 :
> I'm a newbie to t
After I did the tutorial I joined this list...
After that a friend needed a mobile app, so I told him I was gonna do it,
did the entire backend with Django and API REST (Django Rest Framework) and
a friend did the frontend with PhoneGap...
It was hard, but for me, doing is the best way of learnin
I actually use a text editor, I love Sublime Text 2 with the Djaneiro
Plugin.
As far as IDEs go, I used to work with NINJA IDE, it's a Python IDE and
it's pretty cool.
2014-09-24 4:36 GMT-05:00 anton :
> Hi,
>
> actually I use Aptana Studio 3.4.1 (http://www.aptana.com/)
> to develop Django apps
Do you have django installed?
pip install django
On Sep 25, 2014 6:08 AM, "nandita srivastava" wrote:
> Hi,
>
> I am new to django. I have installed django. I am trying to create new
> project using command "django-admin.py startproject mysite" but I am
> getting "django-admin.py is not recogniz
I've been checking out python-decouple and I have to say it's pretty easy,
it replaces django-dotenv, django-getenv and django-autoenv for those
working in a 12factorish way
2014-09-30 13:29 GMT-05:00 Arthur Alvim :
> There's a really nice project called python-decouple. (
> https://github.com/he
Hello guys,
I'm currently trying to add search functionality to an app, I'm looking for
something that works just like the admin's search_fields, but all of the
apps I've found seem to be an overkill for what I need.
There is something made for list_filter (
https://github.com/alex/django-filter)
I kept looking and I found one that works nice, I'll share it here if maybe
someone is needs something similar
http://gregbrown.co.nz/code/django-simple-search/
2014-10-02 16:38 GMT-05:00 Jorge Andrés Vergara Ebratt
:
> Hello guys,
>
> I'm currently trying to add search func
You can use something like http://www.downforeveryoneorjustme.com to see if
web pages are really down or you can't enter.
By the way, djangoproject.com is up & running
On Oct 27, 2014 1:14 PM, "Tom Christie" wrote:
> Seconding Larry. I don't see any issue.
>
> On Monday, 27 October 2014 18:06:17
Hello everyone,
I'm working with requests app so I can send post data in one of my views, I
need to sent it to an external url, I'm integrating with an online payment
provider.
I'm doing as the docs say:
import requests
def realizarPago(request):
parametros_payu = {I use my params here in a
Nope, no good.
I was looking to see if there was something like this posted in the group
before and there was, I found this answer from 2009:
"This is impossible to redirect a user to external site with post.
urllib and urllib2 can only help to fetch data, but not to redirect a
user."
Anyone kno
I checked, it's sending the POST data, but what I need is to redirect the
user to the external site WITH the post data... So I think I'm going with
the form + hidden fields solution
On Mon Nov 03 2014 at 8:13:08 AM Collin Anderson
wrote:
> Hello,
>
>
>> "This is impossible to redirect a user to
When you are in Python3 you don't use __unicode__ you use __str__
On Tue, Nov 11, 2014, 3:14 PM Arjan de Knegt
wrote:
> I am using Django 1.7.1 with python 3.4.0 for my latest project.
> I am working on a model called Song. In the admin site all object that I
> add show as "Song object" where I
Actually yo could do it with CSS alone...
You can have the 2 images on the server and add both in the html
And having the CSS like:
On Thu, Nov 20, 2014, 3:59 AM Andreas Kuhne
wrote:
> 2014-11-20 9:44 GMT+01:00 Alex Strickland :
>
>> On 2014-11-20 08:05 AM, ThomasTheDjangoFan wrote:
>>
>>
a media query for small screens
You can set the media query for the screen size you are going to make the
change and just swap display none to the big one
On Thu Nov 20 2014 at 7:26:27 AM Jorge Andrés Vergara Ebratt <
javebr...@gmail.com> wrote:
> Actually yo could do it with CSS alone...
Hello everyone,
Well, the tittle says it all:
I have a model X
class X(models.Model)
a = models.IntegerField()
b = models.IntegerField()
def getC(self):
return a + b
So, when I'm inside a template I can call {{x.getC}} and it gets the method
for the current instance it's in, but h
14-11-24 4:21 GMT+00:00 Ethan Blackburn :
>
>> related: https://groups.google.com/forum/#!topic/django-users/s9qgXC4TNrA
>>
>> Short answer: you can't. A raw query would be your best bet(i.e. "SELECT
>> SUM(a + b) AS sum FROM app_X")
>>
>>
&g
Hello everyone...
I'm using django-smart-selects for my dependent selects, you know, like if
you choose a Country only the cities from that country have to come up in
the second select. And it's working great, but now we've faced a problem..
We want to add search functionality to the selects, we
t; one of those features and coding the other one by hand.
>
> It might make sense to use the (select2, chosen, jQuery Autocomplete)
> library, and handle the dependent selects on your own using your own code.
> The dependent-selects seems easier to me.
>
> Collin
>
> On Thursda
I think the best way to start learning Django it's following the official
docs...
https://docs.djangoproject.com/en/1.7/
2014-12-14 16:49 GMT-05:00 Jorge Luis Callalle Torres
:
>
> how to learn django and I don't kill in the attempt,
> suggestions, recommendation.
> Do you know any resource, bo
Hi, did the column had previus non-integer data in it?
2014-12-30 8:52 GMT-05:00 Neto :
> I changed a CharField to IntegerField and when I did ./manage.py migrate,
> appeared the message on terminal:
>
> django.db.utils.ProgrammingError: column "rotulo" cannot be cast
> automatically to type inte
Depending on the project, I've done projects entirely made of the admin
On Apr 8, 2014 11:53 AM, "Andrew Pashkin" wrote:
> I'm thinking about using django.contrib.admin for public facing pages.
> On the one hand, seems like it is not recommended:
>
> It's not intended to be a *public* interface t
Did you register the app in settings.py?
2014-04-16 23:03 GMT-05:00 Xiaofeng Feng :
> I am now trying to set up my first app using django tutorial. However, I
> was stuck at adding the poll app in part 2. I think I followed all the
> steps and it goes well before this question. After I change ad
Check the models.py file, you might have a typo in Question
On May 4, 2014 7:44 PM, "Tim Fong" wrote:
> Hi,
> Here's my code:
>
>> from django.contrib import admin
>> # Register your models here
>> from django.contrib import admin
>> from polls.models import Question
>> admin.site.register(Questi
Look in the Django documentation, it has great examples for doing that. I
suggest you also follow the polls app tutorial.
On May 5, 2014 11:14 AM, "Neeta Jawale" wrote:
> Hi,
> I am new to Django framework. I have just started learning Django
> framework and I am new to web development .
> Can an
You can red online for free this one
http://chimera.labs.oreilly.com/books/123400754
2014-05-31 7:56 GMT-05:00 Jonathan Querubina :
> Guys,
>
> Could anyone send me a link for a good tutorial on django TDD?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Goog
MySQLdb module doesn't work in Django 3.X since you installed MySQL
connector for Python, or at least I think you did, you need to read on
their documentation to see what you need to do to make it work with Django
2014-06-09 20:57 GMT-05:00 Kelvin Wong :
> You better check that the MySQL connect
You need to import HoleImage in admin.py
On Jun 11, 2014 3:19 PM, "Patrick C" wrote:
> Hi All,
>
> New to Django / Python (coming from PHP).
>
> Trying to make a site for a golf course where there is a hole by hole
> guide, each hole has a number, name, description then multiple images for
> the
In admin.py you have
from hotels.models import Hole
Add HoleImage to that import
On Jun 11, 2014 3:19 PM, "Patrick C" wrote:
> Hi All,
>
> New to Django / Python (coming from PHP).
>
> Trying to make a site for a golf course where there is a hole by hole
> guide, each hole has a number, name, d
eInline(admin.TabularInline):
> model = HoleImage
>
> class HoleAdmin(admin.ModelAdmin):
> fields = ['hole_number', 'hole_name', 'hole_description']
> list_display = ['hole_number', 'hole_name', 'hole_description']
>
els import HoleImage
>
> class HoleImageInline(admin.TabularInline):
> model = HoleImage
>
> class HoleAdmin(admin.ModelAdmin):
> fields = ['hole_number', 'hole_name', 'hole_description']
> list_display = ['hole_number', 'hole_name',
You need the DB Backends, but that doesn't depend in the IDE you are
using...
If you are going to work with MySQL you need to have MySQL installed and
install MySQL-python (Only works on Python 2.x there is another one for 3.x
but I'm not familiar with it)
If you are going to work with PostgreSQL
I've been asking myself the same thing, I think I'm going to start with
Python3 and Django 1.7 :)
On Jun 22, 2014 8:20 AM, "pjotr" wrote:
> We are starting a new project and 1.7 is not far away according to
> information provided in the release plan etc. Do we "dare" to jump on 1.7
> already now
I thinks it depends a lot on the project, but for almost every project I
use South to manage my DB migrations, Pillow to handle images and rest
framework to make my APIs
On Jun 27, 2014 7:22 AM, "Greg Niewisiewicz" wrote:
> Hi,
>
> I'm working on a short guide about setting up a new Django projec
Hello everyone,
I'm trying to create a system that has 3 different user types:
Independent Agent, that basically is what it sounds like, and Django's User
Model works fine for this one.
But the catch comes from the other 2, because it also needs to support
agencies and agencies have sub-users...
ate Models as a good solution for these
> type of weird situations
>
>
> https://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships
>
> Cheers
> L.
>
> On 2 July 2014 12:20, Jorge Andrés Vergara Ebratt
> wrote:
> > Hell
The different versions of python do work, I have 2 current projects right
now running on the same machine and one uses Python 2.7.x and the otherone
uses Python 3.2
You just have to use the -p flag when creating the virtualenv:
virtualenv -p /usr/bin/pythonVersion venv
I use a venv folder to co
Def __str__ is a comment, you can ommit it
On Jul 3, 2014 2:37 PM, "Lian Tombing" wrote:
> When I tried to implement the example,
>
> class Poll(models.Model):
> # ...
> def __unicode__(self): # Python 3: def __str__(self):
> return self.question
>
> I get the error,
>
> Tab erro
48 matches
Mail list logo