Host a web application

2015-04-21 Thread Kishan Mehta
Hi , I have to show my web application project work to a potential employer. Is it possible to host the demo somewhere? Any guide on this? Thanks for help, Kishankumar Mehta -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from t

Re: uWsgi not seeing javascript

2015-04-21 Thread Carlos Aguilar
You don't want serve static files with uwsgi, but, you can configure Nginx or Apache2 to serve static files. Kindest Regards 2015-04-21 17:42 GMT-04:00 john : > OK I will - but where? > Johnf > > > On 04/21/2015 02:41 PM, Avraham Serour wrote: > > You probably are not serving the static files,

Re: Serving / out of static directory, /api for Django DRF services (development/runserver/DEBUG mode)

2015-04-21 Thread LiteWait
I have no clue why this works, but I added the /client directory (full path) to STATICFILE_DIRS and... from django.conf import settings if settings.DEBUG: urlpatterns += patterns( 'django.contrib.staticfiles.views', url(r'^(?:index.html)?$', 'serve', kwargs={'path': 'index.htm

Re: Form to create several objects with one-to-one relation

2015-04-21 Thread Vijay Khemlani
What about and old-school DetailView? def get_context_data -> Creates the two forms and puts them in the context def post -> Validates and process the forms On Tue, Apr 21, 2015 at 7:41 PM, Ilya Kazakevich wrote: > Hello, > > I have several models with one-to-one relation. For example > > cl

Re: Difficulty in passing positional arguments in url !!!

2015-04-21 Thread Vijay Khemlani
I think it's better to pass the email as a query parameter instead of in the path /acceptfriend/?email=hpenvy%40hp.com Or even better, use a POST request, since it seems the request will touch the DB and have side effects. On Tue, Apr 21, 2015 at 6:02 PM, Bill Freeman wrote: > The @ in the ema

Form to create several objects with one-to-one relation

2015-04-21 Thread Ilya Kazakevich
Hello, I have several models with one-to-one relation. For example class Task(models.Model): initial_comment = models.OneToOneField('Comment') # A pack of other fields class Comment(models.Model) body = RichTextField() # A pack of other fields I want to create "create view" based

static files and DEBUG = False

2015-04-21 Thread egon.frer...@gmx.de
Hi, settings.py contains ALLOWED_HOSTS with the host in the form ".example.com". With DEBUG = True I get the complete page. But if I set DEBUG = False the static files are not found so I get only the content. If DEBUG = True the apache access log the static files are shown with HTTP-code 200.

Re: uWsgi not seeing javascript

2015-04-21 Thread john
OK I will - but where? Johnf On 04/21/2015 02:41 PM, Avraham Serour wrote: You probably are not serving the static files, can you post your uwsgi ini ? On Apr 22, 2015 12:02 AM, "john" > wrote: Hi, When I use manage.py the javascript runs. When I use

Re: uWsgi not seeing javascript

2015-04-21 Thread Avraham Serour
You probably are not serving the static files, can you post your uwsgi ini ? On Apr 22, 2015 12:02 AM, "john" wrote: > Hi, > > When I use manage.py the javascript runs. When I use uWsgi the javascript > does not run. Of course this when I'm using the website. > > Is there something that is dif

Re: Difficulty in passing positional arguments in url !!!

2015-04-21 Thread Bill Freeman
The @ in the email address and the . in the domain name will cause \w+ to not match. You could either go looser with .+ or better [^/]+ or you could be explicit with [a-zA-Z0-9_@.]+( . inside brackets doesn't need to be backslashed) though that last won't be affected by local, so

uWsgi not seeing javascript

2015-04-21 Thread john
Hi, When I use manage.py the javascript runs. When I use uWsgi the javascript does not run. Of course this when I'm using the website. Is there something that is different between the two! Johnf -- You received this message because you are subscribed to the Google Groups "Django users" gr

Re: Difficulty in passing positional arguments in url !!!

2015-04-21 Thread Stephen J. Butler
"hello world" wouldn't match \w either. \w is letters, numbers, and the underscore. On Tue, Apr 21, 2015 at 3:58 PM, HIMANSHU RANJAN wrote: > Hello Stephen , > Even if I pass simple string like "hello world" instead of email address , > it doesn't work !! > > I don't know what's the pblm > Plzz h

Re: Difficulty in passing positional arguments in url !!!

2015-04-21 Thread HIMANSHU RANJAN
Hello Stephen , Even if I pass simple string like "hello world" instead of email address , it doesn't work !! I don't know what's the pblm Plzz help !! On Apr 22, 2015 2:16 AM, "Stephen J. Butler" wrote: > \w won't match emails addresses. It doesn't include the "." or "@" > characters. > > On Tu

Re: Difficulty in passing positional arguments in url !!!

2015-04-21 Thread Stephen J. Butler
\w won't match emails addresses. It doesn't include the "." or "@" characters. On Tue, Apr 21, 2015 at 3:41 PM, HIMANSHU RANJAN wrote: > Thanks for replying Bill :D > Ooops !! > i removed the question mark but it is till not working !! > The problem is that i dont have a form and i think form m

Re: Difficulty in passing positional arguments in url !!!

2015-04-21 Thread HIMANSHU RANJAN
Thanks for replying Bill :D Ooops !! i removed the question mark but it is till not working !! The problem is that i dont have a form and i think form maynot be suitable to for application !! MY requirements :- i have some list of items and clicking on any of it should go to the view and tell me

Re: Serving / out of static directory, /api for Django DRF services (development/runserver/DEBUG mode)

2015-04-21 Thread Bill Freeman
That may work for most static things. The question is whether the static server is happy with an empty path, assuming that you're trying to serve "/" this way. If not, you might add a separate (earlier) pattern of r'^$' that specifies a path in the extra parameters dictionary (where you have 'doc

Re: Runserver/DEBUG only, serve / from static directory

2015-04-21 Thread Bill Freeman
If I understand your needs, try r'^$', which will catch only the top of the site. (You might want r'^(?:index.html)?$' in case some old browser you deal with has that fiddle, but the browser really should try what you typed first.) On Tue, Apr 21, 2015 at 3:02 PM, LiteWait wrote: > I have the n

Re: Difficulty in passing positional arguments in url !!!

2015-04-21 Thread Bill Freeman
I think that it is the question mark in your url pattern that is causing the problem. In a real url, question mark separates the path from the query parameters. Parentheses in url patterns are for capturing parts of the path, and are not associated with query parameters. Just leave out the ? and

Difficulty in passing positional arguments in url !!!

2015-04-21 Thread livelikehimanshu12
Hello friends , I am trying to send a simple parameter to view from my template . But i am getting the error 'Reverse for acceptfriend with arguments ('hpe...@hp.com',) and keyword arguments {} not found. Plzz help me !! I am not much comfortable with url concepts !! > i need to pass hpe...@h

Runserver/DEBUG only, serve / from static directory

2015-04-21 Thread LiteWait
I have the need in runserver/debug mode to map http://127.0.0.1:8000/ out of a static /client directory. Django will only serve up pages from /api which a DRF REST services. I can't seem to find a way to create the URL mapping for this. It seems https://docs.djangoproject.com/en/dev/howto/st

Serving / out of static directory, /api for Django DRF services (development/runserver/DEBUG mode)

2015-04-21 Thread LiteWait
Planning to host the client side of our application in production from a proxy to an S3 site from Nginx. The problem is we'd like to mimic this behavior by serving / in Django runserver using a static directory url() entry. I've read over https://docs.djangoproject.com/en/1.4/howto/static-file

python / django demand

2015-04-21 Thread Jay
Just curious if any long time python / django developers have seen an increase in the demand/growth/popularity of these skills? I run a dev team of python/django/aws developers building an ecommerce website and was curious about what people think the future brings for this stack. Continued imp

Re: django contrib auth last_login cannot be "null"

2015-04-21 Thread Tim Graham
This seems to be a common point of confusion. I'll add a sentence to release notes under the "``AbstractUser.last_login`` allows null values" section -- if this makes sense: If you are using a custom user model, you'll need to run :djadmin:`makemigrations` and generate a migration for your app.

form.errors.as_json() returns a str - Django 1.8

2015-04-21 Thread George L.
I'm trying to return errors to an ajax call but as_json() form method generates a string of a dict instead of a dict. JsonResponse accepts only dicts and if I set safe=False, JsonResponse tries to serialize the data as a string, which results in a corrupted data. Is this a bug or expected resu

Re: moving from Django 1.6 and south to Django 1.8 -- auth migrations not applied

2015-04-21 Thread Scott Hostovich
I see, thank you. On Tuesday, April 21, 2015 at 12:16:31 PM UTC-4, Tim Graham wrote: > > Yes, you should generate and apply migrations for the app that contains > your custom user model. Since you skipped Django 1.7, you'll have to edit > the automatically generated initial migration for that ap

django contrib auth last_login cannot be "null"

2015-04-21 Thread aRkadeFR
Hello, I'm upgrading my systems to Django 1.8 and I'm facing this error: (1048, "Column 'last_login' cannot be null") so I describe my table in DB: +-+--+--+-+-++ | Field | Type | Null | Key | Default |

Re: moving from Django 1.6 and south to Django 1.8 -- auth migrations not applied

2015-04-21 Thread Tim Graham
Yes, you should generate and apply migrations for the app that contains your custom user model. Since you skipped Django 1.7, you'll have to edit the automatically generated initial migration for that app and change EmailField max_length to 75 since that matches your schema. Then you can auto-g

Re: moving from Django 1.6 and south to Django 1.8 -- auth migrations not applied

2015-04-21 Thread Scott Hostovich
I'm using a custom user model, so it seems that migration operations like the following are ignored silently: migrations.AlterField( model_name='user', name='email', field=models.EmailField(max_length=254, verbose_name='email address', blank=True), ), On Monday, April 20, 2015 at 4:

Re: Version

2015-04-21 Thread Timothy W. Cook
I really doubt a new user wants to install 1.4 After getting your virtualenv setup then use: pip install django to install the latest version. On Tue, Apr 21, 2015 at 9:12 AM, Andreas Kuhne wrote: > Hi, > > First of all, don't use apt-get to install django, you will never get the > version

Re: Create models table from exists database?

2015-04-21 Thread Dario Concilio
Great! Thank you! Il giorno martedì 21 aprile 2015 11:00:16 UTC+2, Dario Concilio ha scritto: > Hi to all! > I'm new of django, I've a question for you: Can I create a new project > using an exists database? > > I've a domotic system on Ubuntu Server, with a Postgres database that has > several

Re: Serialize QuerySet Q (not the result)

2015-04-21 Thread Vijay Khemlani
Do you only need to serialize Q objects? No aggregation / annotations? On Tue, Apr 21, 2015 at 8:00 AM, guettli wrote: > > > Am Montag, 20. April 2015 17:12:21 UTC+2 schrieb Vijay Khemlani: >> >> Are the queries associated with a certain form? Or they are arbitrary >> queries? >> >> > Good quest

Re: Create models table from exists database?

2015-04-21 Thread felix
El 21/04/15 03:15, Dario Concilio escribió: Hi to all! I'm new of django, I've a question for you: Can I create a new project using an exists database? I've a domotic system on Ubuntu Server, with a Postgres database that has several table. Actually the system uses a table by a python servic

Re: Version

2015-04-21 Thread Andreas Kuhne
Hi, First of all, don't use apt-get to install django, you will never get the version you want. Use a virtualenv instead: Google virtualenv install ubuntu (and your ubuntu version). Create a virtualenvironment and install django with pip. Using pip you can install whatever version of django you wa

Re: Version

2015-04-21 Thread Parikshit Mishra
I am working on ubuntu,python version is 1.3.1,I have installed it with the help of "apt-get install python-django" command .I want to set up MySQL database. Also I want to upgrade the version of django to latest version.. How to do this ? Please help me. Thank yo so muchh ..!! On Tuesday

CKEDITOR not working on certain models

2015-04-21 Thread Thomas Weholt
I've used CKEDITOR to turn my models.TextArea() fields into nice editors for a long time, but suddenly some of my pages throws the following exception: Uncaught Error: The specified element mode is not supported on element: "meta". I've googled it and tried several solutions, like: CKEDITOR.dtd.

django-xadmin datetime widgets not working?

2015-04-21 Thread Christian Schulz
Hi there, I have datetime fields (mysql) with NULL values and in django with models.DateTimeField(blank=True,null=True). It's something like "valid_from" and "valid_to" and I use it as a condition if valid_to is NULL. Existing values are showed correctly , I can modify the values and set the

Re: Version

2015-04-21 Thread David Palao
Hello, Your question is too vague. Also some context would be helpful. What system you are working on? What Python version? How did you install django? What are you trying to do? What database you are interested in? For example. Best 2015-04-21 12:47 GMT+02:00 Parikshit Mishra : > hello everyone

Re: Serialize QuerySet Q (not the result)

2015-04-21 Thread guettli
Am Montag, 20. April 2015 17:12:21 UTC+2 schrieb Vijay Khemlani: > > Are the queries associated with a certain form? Or they are arbitrary > queries? > > Good question. I would prefer a solution which is not associated with a form. It is only associated with a model. Otherwise it would be easy

Re: django

2015-04-21 Thread Parikshit Mishra
Thanks David. And yes this is very helpful On Tuesday, 21 April 2015 14:30:08 UTC+5:30, Parikshit Mishra wrote: > > hello I want to learn django scratch please help me > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Version

2015-04-21 Thread Parikshit Mishra
hello everyone. I hv installed django but it is version 1.3.1.Please tell me how to update it to 1.4 .Also how to install data base pls help me. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: django

2015-04-21 Thread Lachlan Musicman
Yes, I cannot recommend the django tutorials (in the docs, front page) highly enough. -- I'm treading carefully but it's the time of night the snowy light the subway roar and the whispered fights exciting sights but it's not enough I thought it was I wish it was I thought it was - You name

Re: django

2015-04-21 Thread David Palao
Hello, I suggest you to go to https://www.djangoproject.com/ and have a look at the docs in there. Best 2015-04-21 7:23 GMT+02:00 Parikshit Mishra : > hello I want to learn django from scratch please help me > > -- > You received this message because you are subscribed to the Google Groups > "Dja

Re: Create models table from exists database?

2015-04-21 Thread David Palao
Hi, Yes, in principle you can.The keywords are "legacy database": https://docs.djangoproject.com/en/1.8/howto/legacy-databases/ Best 2015-04-21 9:15 GMT+02:00 Dario Concilio : > Hi to all! > I'm new of django, I've a question for you: Can I create a new project using > an exists database? > > I'v

django

2015-04-21 Thread Parikshit Mishra
hello I want to learn django from scratch please help me -- 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 t

Create models table from exists database?

2015-04-21 Thread Dario Concilio
Hi to all! I'm new of django, I've a question for you: Can I create a new project using an exists database? I've a domotic system on Ubuntu Server, with a Postgres database that has several table. Actually the system uses a table by a python service and PHP portal for data management of domotic

model form and inlinemodelforset in a wizard

2015-04-21 Thread François GUÉRIN
Hi, I'm currently using django 1.8 with django-formtools 1.0, I only use CBV. I'm trying to build a wizard for a `Manifestation` model. Each instance of `Manifestation` can have many Representations, which are basically a place and a start date, using a ForeignKey to the Manifestation instan

Re: Putting Limits on Memory and CPU Usage in python ?

2015-04-21 Thread SHINTO PETER
Hi , Erik Cederstrand , i just want to limit the memory (maximum heap size for your process) with in the python application/Service ie in it client Socket Program. I found a solution like below import resource rsrc = resource.RLIMIT_DATA soft, hard = resource.getrlimit(rsrc) resource.setrlimit(rs

Re: Putting Limits on Memory and CPU Usage in python ?

2015-04-21 Thread Erik Cederstrand
> Den 21/04/2015 kl. 09.20 skrev SHINTO PETER : > > Hi > François Schiettecatte , limit memory and CPU usage for python socket client > service Really, if you want qualified help, you need to be more verbose. Do you want to kill a process violating your limits? Or can the process be expected

Re: Putting Limits on Memory and CPU Usage in python ?

2015-04-21 Thread David Palao
Hi, Have you had a look at "psutil"? It is a python module to manage processes. Best 2015-04-21 9:20 GMT+02:00 SHINTO PETER : > Hi > François Schiettecatte , limit memory and CPU usage for python socket client > service > > On Mon, Apr 20, 2015 at 11:24 PM, François Schiettecatte > wrote: >> >>

Re: Putting Limits on Memory and CPU Usage in python ?

2015-04-21 Thread SHINTO PETER
Hi François Schiettecatte , limit memory and CPU usage for python socket client service On Mon, Apr 20, 2015 at 11:24 PM, François Schiettecatte < fschietteca...@gmail.com> wrote: > Bummer, shows how long it has been since I have used th