Is there any reason why this has to happen after saving? otherwise you
could use pre_save.
bg,
Johannes
On 14.08.2014 08:12, Neto wrote:
I'm using post_save but he is in loop:
@receiver(models.signals.post_save, sender=Cars)
def auto_num_on_save(sender, instance, **kwargs):
my code
I am working with a php guy in my office .
He is asking me how can we mix php and django?
Cos he want that when we have a project to do he should be able to
paticipate using php in building the project
can someone give me some tips
--
You received this message because you are subscribed to the
Den 14/08/2014 kl. 10.24 skrev ngangsia akumbo :
> I am working with a php guy in my office .
> He is asking me how can we mix php and django?
> Cos he want that when we have a project to do he should be able to paticipate
> using php in building the project
>
> can someone give me some tips
Th
can i have a link on how that works?
On Thursday, August 14, 2014 9:38:15 AM UTC+1, Erik Cederstrand wrote:
>
> Den 14/08/2014 kl. 10.24 skrev ngangsia akumbo >:
>
> > I am working with a php guy in my office .
> > He is asking me how can we mix php and django?
> > Cos he want that when we hav
Hi Guys,
I have a problem, i have url
like: http://127.0.0.1:8000/get-file?file_path=/home/domagoj/pcap/#1/test.txt
where file_path is path to the file
both
requestGET["file_path"] and
request.get_full_path()
ignore #1/test.txt part, how can i fix this? Is there some other way to get
full ur
Hi
The hash mark has a special meaning in URIs; this is not specific to
Django
If you must use it in an actual URL, it needs to be escaped as %23
The urlencode template tag might help
https://docs.djangoproject.com/en/dev/ref/templates/builtins/#urlencode
Notice that this URL uses a hash mark
I have two projects "djangotest" (from the django tutorial) and "cresta".
When I start the server with the "runserver" command in the cresta
directory and go to
http://127.0.0.1:8000/admin/
... I see "Polls Tutorial". I can't login with any users from the cresta
database.
How do I disable the Po
I want to parse an application URL just like Django does.
url = 'http://www.example.com/path/to/myview/123'
view, params = decompose(url)
# now view="MyView", params=('123',)
How can it be done?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
On 14/08/2014 8:38 PM, Daniel Grace wrote:
I have two projects "djangotest" (from the django tutorial) and "cresta".
When I start the server with the "runserver" command in the cresta
directory and go to
http://127.0.0.1:8000/admin/
... I see "Polls Tutorial". I can't login with any users from t
Is it possible to have a exteneded user profile in the 'User' part of the
admin. I have tried the following with a form
(UserProfileForm(forms.ModelForm)) with 2 fields 'something' and 'something
else'
class UserAdminCustom(UserAdmin):
form = UserProfileForm
fieldsets = (
(Non
I've personally used your approach with the following Inline:
class UserProfile2Inline(admin.StackedInline):
model = UserProfile2
can_delete = False
fk_name = 'user'
max_num = 1
Andrea
2014-08-14 5:57 GMT+02:00 Elliot :
> Is it possible to have a exteneded user profile in the '
Thanks - there are some great suggestions here. Much appreciated.
--
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 p
I've had good success with placing the import at the end of the models file.
On Tuesday, 12 August 2014 20:06:41 UTC-4, chedi toueiti wrote:
>
> Hi Neto,
>
> Just make sure that your callback is loaded, the most easy way to do it is
> to import the function in models.py if you have a single model
Hello,
I have following field in my model.
photo = models.ImageField(null=True,blank=True,upload_to="product_images")
I have defined the following layout in forms.py for this field, while
using crispy-form
self.fields['photo'].label = "Asset Image"
self.helper.layout = Layout(
'photo',
It can work any way you need it to. It really depends on what aspects he
needs to handle and which are yours.
If, for example, you create the back-end with the DB and models, then he
can communicate from the front-end, using JSON data via GET/PUT requests.
One way for you to handle this on th
Say to him to learn django.
On Thu, Aug 14, 2014 at 10:35 AM, Derek wrote:
> It can work any way you need it to. It really depends on what aspects he
> needs to handle and which are yours.
>
> If, for example, you create the back-end with the DB and models, then he
> can communicate from the f
If its just the two of you creating small web site projects then I doubt
its worth the cost in time, effort and money for the added complexity that
would be present with using two different server side languages. I'd
suggest working out some common ground personally, rather than going that
rout
@receiver(models.signals.post_save, sender=Cars)
def auto_num_on_save(sender, instance, **kwargs):
if hasattr(instance, '_already_ran'):
return
my code
instance._already_ran = True
instance.save()
--
You received this message because you are subscribed to the Google
from django.core import urlresolvers
match = urlresolvers.resolve(urlsplit(url).path)
view = match.func
params = math.args
https://docs.djangoproject.com/en/dev/ref/urlresolvers/#resolve
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsub
Do you have DJANGO_SETTINGS_MODULE="djangotest.settings" in your
environment?
in manage.py you could change the os.environ.setdefault() line to:
os.environ['DJANGO_SETTINGS_MODULE'] = 'cresta.settings'
--
You received this message because you are subscribed to the Google Groups
"Django users"
Hi Avraham
Thanks for the heads-up
On Wed, 13 Aug 2014 11:25:09 +0300
Avraham Serour wrote:
> just remember to change the headers of the response to reflect that you
> are serving a css file and not html
>
>
> On Wed, Aug 13, 2014 at 3:37 AM, Drew Ferguson
> wrote:
>
> > On Tue, 12 Aug 2014
Line
match = urlresolvers.resolve(urlsplit(url).path)
stops executing the script and redirects me to given URL.
--
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
It raises an Http404 if it doesn't exist. Is that what's going on?
--
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
Yes, I figured it out. Thank you.
--
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 email to
Well, there's always: http://animuchan.net/django_php/
_Nik
On 8/14/2014 1:24 AM, ngangsia akumbo wrote:
> I am working with a php guy in my office .
> He is asking me how can we mix php and django?
> Cos he want that when we have a project to do he should be able to
> paticipate using php in bui
Hi there. I'm running into some strange behavior when using `defer` with
`select_related` and I wanted to find out if I'm simply misunderstanding
what should be going on, or if indeed I have stumbled onto a bug.
Summary: Using `defer` on a table that has been re-included in a query via
`select_rel
I created a fixtures file called testdata.xml in a fixtures folder, but I
can't load the fixtures file into the database.
I placed an __init__.py file in the fixtures folder (not sure about this
step, is it needed?)
I put the fixtures directory in settings.py:
FIXTURE_DIRS = (
'/myapp/fixtur
I get an error after editing my admin.py file as follows:
from django.contrib import admin
from flow.models import Flow
admin.site.register(Flow)
... here is the error:
ImportError at /
cannot import name 'Flow'
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.6.5
Excepti
Hi,
you really didn't give good information as to why it failed and why you had
to populate it manually, perhaps you missed a step in the tutorial?
What is the specific error you are getting when you run the command to
initially populate the database.
On Wednesday, August 13, 2014 2:47:37 PM U
I recently met a business man in my community that was looking to hire
me to put together some school intranets.. long story short, I told
him no because he would not allow me to develop in Django/Python. I
don't need that in my life. :)
Mike
On Thu, Aug 14, 2014 at 12:28 PM, Nikolas Stevenson-Mo
For some reason we are having trouble with Django's templates and parent
folders. We uploaded a sitebase.html file into the parent folder but none
of the children folders can find the sitebase.html file. Is there a trick
for setting this up that we haven't been able to find?
--
You received
Type Error : 'ExtendedTag' instance expected, got
I had created m2m field (required false). When I tried to save form with
parent select (from multiple choice field), It rises type error. When I
tried to save it without selecting parent and category, it work fine. I
couldn't able to figure out
Are you saying you have templates/sitebase.html and
tempaltes/child/template.html, and you can't {% extends "sitebase.html" %}
in your child/template.html?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop
Could it be the issue with clashing id fields?
https://docs.djangoproject.com/en/dev/topics/db/models/#multiple-inheritance
--
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 a
Hello,
I'm following intructions in
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/apache-auth/,
but the wsgi.py script is giving the following error:
ImportError: Could not import settings 'uddo.settings' (Is it on sys.path?
Is there an import error in the settings file?): cannot
Does commenting out the check_password line in wsgi.py actually fix the
problem? Are you importing "auth" somewhere in your settings?
--
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
Upon reviewing the code in `django/db/models/sql/compiler.py` it seems
clear that the list of deferred fields is per-table instead of per-table
alias -- see `deferred_column_names`,
https://github.com/django/django/blob/f0b358880a6825d667c037757caac470bc526a1f/django/db/models/sql/compiler.py#L
If I set DEBUG=True this Django app runs fine. If I remove DEBUG=True I get
a "Bad Request (400)" and apache error logs show lots of this..
[Fri Aug 15 03:04:27.400567 2014] [core:warn] [pid 2011:tid
140575764432768] AH00045: child process 2015 still did not exit, sending a
SIGTERM
[Fri Aug 15
a quick thing to check: is your ALLOWED_HOSTS set correctly?
--
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 t
Ug!! That was it!! THanks!!!
cs
On Thursday, August 14, 2014 10:14:34 PM UTC-5, Collin Anderson wrote:
>
> a quick thing to check: is your ALLOWED_HOSTS set correctly?
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this
I'm looking for a DBA designer in Melbourne for some paid consulting.
I have a Django 1.6 prototype system working nicely with Postgres 9.1.
But it was designed as a proof-of-concept rather than a production
system. I figured the project wouldn't actually get off the ground
without funding and
'/myapps/fixtures' is treated as absolute path. Try removing leading slash
to make it relative. Either you can write full absolute path to the
directory.
thanks,
Eugene
On Thursday, August 14, 2014 9:05:30 PM UTC+4, Daniel Grace wrote:
>
> I created a fixtures file called testdata.xml in a fix
42 matches
Mail list logo