I have tried everything. I think now my only option is to write a Script
which will read the data from SQLite and save it on postgreSQL. But how can
I query different DB in Django?? can someone please tell me that.
On Wednesday, February 24, 2016 at 5:48:17 PM UTC+5:30, vaibhav jain wrote:
>
>
The following is a part of upload-file mechanism in my forms.py:
from crispy_forms.layout import Divclass DocumentForm(forms.Form):
docfile = forms.FileField(label='Select a BAM file')
Div('docfile', style="background: black;", css_class="col-sm-6 col-md-9
col-lg-9")
HTML
{% crispy fo
The following is a part (the rest being in models an views) of an
upload-file mechanism in my forms.py:
from crispy_forms.layout import Divclass DocumentForm(forms.Form):
docfile = forms.FileField(label='Select a BAM file')
Div('docfile', style="background: black;", css_class="col-sm-6 co
Hi,
I'm new to django, I try to set up a site that can select language
automatically.
So, I set as below:
LANGUAGE_CODE = 'en'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = False
USE_TZ = False
For now, It can select language automatically, But, The question is:
I don't wa
*Note- This question was originally posted on SO before I completely
understood what my issue was. However, since editing it to reflect the true
state of affairs, the silence over there has been deafening. I only mention
that because some people don't like it when similar questions are posted
{{ codelist.arrow }}
shouldn't you be using the for variable? something like
{{ i.arrow }}
On Thu, Feb 25, 2016 at 11:19 AM, Malik Rumi wrote:
> *Note- This question was originally posted on SO before I completely
> understood what my issue was. However, since editing it to reflect the true
> I find that in many of your questions you are thinking a bit too hard.
I have been accused of that before, so there's probably something to it.
What to do about it is another question.
On Wed, Feb 24, 2016 at 3:41 PM, Andreas Kuhne
wrote:
> Malik,
>
> I find that in many of your questions you
This will probably be very helpful. Thanks.
On Wed, Feb 24, 2016 at 3:39 PM, James Schneider
wrote:
>
>
> On Wed, Feb 24, 2016 at 11:26 AM, Malik Rumi
> wrote:
>
>> I am pursuing the debug option now to see what I can learn.
>>
>>
>>
>
> Have you looked at enabling tracebacks (--traceback) and
I have been struggling with this all week. I posted to SO and got a lot of
flack and downvoted - but no *help*. And FOUR MINUTES after I posted, you
zeroed in on the problem. Yes, now my code displays on my own template. And
you gave me no snark in the process. A true and helpful gentleman. Thank
y
When Django creates the SQL to get an object from model.objects.get() it
doesn't look like SQL is adding a "LIMIT 1" to the end. As the get method
is always intended to return a single item, would adding that to Django's
SQL speed things up?
--
You received this message because you are subscribed
On Thu, Feb 25, 2016 at 10:10 AM, Matthew Crowson <
matthew.d.crow...@gmail.com> wrote:
When Django creates the SQL to get an object from model.objects.get() it
> doesn't look like SQL is adding a "LIMIT 1" to the end. As the get method
> is always intended to return a single item, would adding th
On Thu, Feb 25, 2016 at 07:10:31AM -0800, Matthew Crowson wrote:
> When Django creates the SQL to get an object from model.objects.get() it
> doesn't look like SQL is adding a "LIMIT 1" to the end. As the get method
> is always intended to return a single item, would adding that to Django's
> SQL s
Hi,
I'm using the out-of-the-box Sqlite database integration with my Django
project, and I'm wondering how to manage it with respect to Git. Currently
I have it checked in, but I suspect this isn't what I want to be doing.
Also I have noticed that every time I log in to the admin interface and
I put my sqlite files into .gitignore.
Rafael E. Ferrero
2016-02-25 12:55 GMT-03:00 cortez :
> Hi,
>
> I'm using the out-of-the-box Sqlite database integration with my Django
> project, and I'm wondering how to manage it with respect to Git. Currently
> I have it checked in, but I suspect this
Why do you want your db in version control at all? There is not normally a good
reason to do that.
--
DR.
--
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 djang
On Thu, Feb 25, 2016 at 4:38 AM, wrote:
> The following is a part (the rest being in models an views) of an
> upload-file mechanism in my forms.py:
>
> from crispy_forms.layout import Divclass DocumentForm(forms.Form):
>docfile = forms.FileField(label='Select a BAM file')
>Div('docfile',
Well I don't, but I'm not sure what the alternatives are. I mean what I'm
interested in are *alternatives* to keeping it under version control, so I
have backups, history, versioning. Preferably something I can easily
integrate with my Django workflow, without having to manually keep external
c
Normally for a site you don't keep your db in version control because
the table definitions come from Django. Now if you have data to
prepopulate (each time you fresh clone) or need to do a backup then use
standard db backup mechanisms.
Like dumping your db to an sql backup. It's not efficient to
Thanks Alex, that's great information, I shall dig in.
C
On Thursday, 25 February 2016 19:33:06 UTC, Alex wrote:
>
> Normally for a site you don't keep your db in version control because
> the table definitions come from Django. Now if you have data to
> prepopulate (each time you fresh clone)
Hello all,
I'm trying to add the user when upload a file using the admin in Django.
The model is:
class Image(models.Model):
image = models.FileField(upload_to=DIR_IMAGES, max_length=500)
created_by = models.ForeignKey(User, related_name='created_by',
editable=False)
in admin.py, i hav
*urlconf:*
from django.conf.urls import url, include, patterns
from django.contrib import admin
from django.views.generic import TemplateView
from django.conf import settings
urlpatterns = [
url(r'^$', TemplateView.as_view(template_name="index.html"), {},
'index'),
url(r'^accounts/',
.
--
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 django-users@googlegroups.com.
How include localized_fields in class-based views?
--
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 gro
Assuming it can be done, what is the proper way to namespace two models in
the same app, where both use slugs in the url but have different views and
templates?
In the docs,
https://docs.djangoproject.com/en/1.9/topics/http/urls/#url-namespaces, it
talks about how to do this, but it always r
Models don't have views. Applications have views. URLs route to views, not
models. Include is basically an import for a urls.py file as a whole, so
there's no reason to import the same file multiple times unless you wanted
it to match multiple URLs.
What are you actually trying to do?
On Thu, Feb
dreamhost?
On Wed, Feb 24, 2016 at 5:16 PM, wrote:
> What Alternative Amazon S3 for serve media(uploaded) on website (Heroku
> hosting)?
> I need only storage for media files because Heroku deleting my files
>
> --
> You received this message because you are subscribed to the Google Groups
> "Dj
Heroku should be treated as the stateless portion of an app - do not store long
term data there! (Same goes with services like EC2 and Digital Ocean.)
Rackspace and Microsoft have cloud alternatives to Amazon that may suit your
purposes.
Hosting on a shared host like Dreamhost or A Small Orange
Give cloudinary a go. It's really good especially for images and pdf
On Friday, 26 February 2016, Andrew Pinkham wrote:
> Heroku should be treated as the stateless portion of an app - do not store
> long term data there! (Same goes with services like EC2 and Digital Ocean.)
>
> Rackspace and Mic
Which cache backend are you using? Also, how's your memory usage? Do the
spikes in CPU correlate with load? I.e., does the CPU use increase/decrease
consistently with the number of users?
On Wednesday, February 24, 2016 at 10:17:24 PM UTC-8, Web Architect wrote:
>
> Hi Nikolas,
>
> I am new to u
I'm trying to send a json post for a view, but when it exceeds 50mb it does
not work.
How configure django to receive post of large files and upload of a large
files.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this gro
On Thu, Feb 25, 2016 at 12:45 PM, Malik Rumi wrote:
>
> Assuming it can be done, what is the proper way to namespace two models in
> the same app, where both use slugs in the url but have different views and
> templates?
>
> In the docs,
> https://docs.djangoproject.com/en/1.9/topics/http/urls/#u
On Thu, Feb 25, 2016 at 12:40 PM, lindolfo caetano <
lindolfocaet...@gmail.com> wrote:
> I'm trying to send a json post for a view, but when it exceeds 50mb it
> does not work.
> How configure django to receive post of large files and upload of a large
> files.
>
Without knowing your setup, it's
Hi Nikolas,
Cache backend is Redis. The CPU usage is directly proportional to the load
(increases with the increase in load). Memory usage seems to be fine.
Thanks.
On Friday, February 26, 2016 at 3:32:23 AM UTC+5:30, Nikolas
Stevenson-Molnar wrote:
>
> Which cache backend are you using? Also,
33 matches
Mail list logo