You can define different groups for each role and assign the users to the
groups.
Em sex, 5 de jun de 2015 às 11:24, Andreas Kuhne
escreveu:
> Hi Marcelle,
>
> You should not use the user profile solution anymore, because you can now
> create a custom User model
You can redirect with whatever arguments you want, as long as the receiving URL
accepts them.
--
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
Why should it? The browser requested the original view, and the code returned a
response to that request. The browser doesn't know or care that the process of
constructing that response involved calling another view function.
If you want to change the URL, instead of returning the result of
I used this function, seemed to tidy up the problem:
from datetime import datetime
from pytz import timezone
def utcDtTm(self, dt_tm):
tz = timezone('Europe/London')
return tz.normalize(tz.localize(dt_tm)).astimezone(timezone('UTC'))
--
You received this message because you
I am creating some test data for a DateTimeField using the following
function:
def rndDtTm(self):
uktz = timezone('Europe/London')
year = 2015
month = 6
day = randint(1, 30)
hour = randint(0, 23)
minute = 30 * randint(0, 1)
return
On Saturday, 23 May 2015 18:09:31 UTC+1, Preeti wrote:
>
>
> ImportError: No module named 'django.contrib.staticfilesdjango'
>
>
You're missing a comma after the 'staticfiles' entry in INSTALLED_APPS.
--
DR.
--
You received this message because you are subscribed to the Google Groups
"Django
On Saturday, 23 May 2015 18:17:15 UTC+1, Preeti wrote:
>
> Which is the best tutorial to learn django, djangobook.com or
> djangoproject.com?
>
Why do you even need to ask that question, given the large bold warning on
the front page of the Django book site?
--
DR.
--
You received this
On Wednesday, 20 May 2015 16:05:17 UTC+1, eduardo.c...@gmail.com wrote:
>
> Hi, I never used Django with MySQL data base before. Someone can tellme
> how I can (if it's possible) connect my Django web site with a data base in
> MySQL. I tryed to install "mysqlclient-1.3.6-cp27-none-win32.whl"
On Sunday, 10 May 2015 13:49:44 UTC+1, Reznov Ammar wrote:
>
> Hi guys :),
>
> I have a question about flask and databases in django.
>
There is nothing in this question related to Django. Why are you asking
about Flask on a Django group?
--
DR.
--
You received this message because you are
On Saturday, 9 May 2015 05:05:00 UTC+1, James Schneider wrote:
>
> I agree that the typo is also an issue and should be fixed, but that
> wouldn't result in the OP's error, since reverse() is complaining about a
> 'detail' URL specifically. The typo would result in a similar error when
> the
On Monday, 6 April 2015 22:38:36 UTC+1, Stephanie Socias wrote:
>
> I've implemented this same solution (using custom file storage and the
> "upload_to" parameter) but now cannot get the uploaded files to display
> from my template. I would normally use {{ STATIC_URL }} but, since I've now
>
On Monday, 30 March 2015 13:04:00 UTC+1, François GUÉRIN wrote:
>
> Hi all,
>
> I'm using django for a couple of years, and I've a question about
> relations in the ORM and templates. I massively use class-based generic
> views.
>
> I' currently working with a model which have many other
I don't understand how middlware or filter would help on those cases.
Why not only pass the variable where it's needed?
On Fri 27 Mar 2015 at 10:18 guettli wrote:
>
>
> Am Donnerstag, 26. März 2015 15:52:07 UTC+1 schrieb Anderson Resende:
>>
>> You can use middlewares!!! It is
that format and does not do any
specific conversion for it.
The way to provide multiple values for an item in Django is by simply
repeating the name:
?categories=1=3
which you can then get from the querydict via `request.getlist('categories')
--
Daniel.
--
You received this message becau
I have an application that we run locally against a postgres database but
our dev/test/prod servers all run Oracle.
The command list(Person.objects.all()) runs remarkably faster against my
local Postgresql database. It takes at least 10x longer against an Oracle
database. The thing is the
How to create a field with multiple values? For example an integer field
that takes on particular values:
state = models.IntegerField()
... where state=0 represents 'pending', state=1 represents 'accepted' and
state=2 represents 'rejected'.
Is it possible to put these values / constants into
On Monday, 23 March 2015 14:16:00 UTC, Fellipe Henrique wrote:
>
> Hello,
>
> I have this settings.py [1], and my CustomUser [2]
>
> When I try to use in my template:
>
> {{ user_first_name }}
>
> don't show anything... What I miss in these code?
>
>
You should show your view. Are you using a
help
much by itself.)
Thanks,
Daniel.
On 22.01.2015 14:23, Markus Holtermann wrote:
> The sanest way to generate all ContentTypes and Permissions is to
> migrate those two apps explicitly before migrating the remaining apps:
>
> $ python manage.py migrate contenttypes
>
he error.
However you shouldn't really call one view from the other. If you do that,
the browser will show the URL of the main view, which will be confusing.
Instead, after running the task, *redirect* back to the main view:
from django.shortcuts import redirect
...
return redir
... And you can compare
On Wed 4 Mar 2015 at 20:33 Daniel França <daniel.fra...@gmail.com> wrote:
> 4. Have you tried https://www.djangopackages.com/ ?
> It has some sections with grids that shows several information about each
> one
> On Wed 4 Mar 2015 at 20:30 Avraham Serour
4. Have you tried https://www.djangopackages.com/ ?
It has some sections with grids that shows several information about each
one
On Wed 4 Mar 2015 at 20:30 Avraham Serour wrote:
> 1 - built in
> 2 - buit in
> 3 - I like all-auth
> 4 - pypi
> 5 - go for python 3, unless you
I ran into the following problem with the tutorial.
When I'm at http://127.0.0.1:8000/polls/1/, I get the expected page:
What's up? Not much
The sky
However when I try to vote I get the error
Page not found (404)Request Method:POSTRequest URL:
http://127.0.0.1:8000/polls/1/vote/
No
You're doing this in the shell, which uses your devv database in which you have
obviously defined a poll already.
The docs are taking about running this in a unit test, which would create a
blank db without any polls.
--
DR.
--
You received this message because you are subscribed to the
What it sounds like actually is that the OP is not preventing the default
action of the form, so the page is being submitted normally and displaying the
response.
--
DR.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from
Primero creas un proyecto en un directorio con el comando (abri la consola
seleciona el directorio donde trabajar y) ejecuta django-admin startproject
miproyecto se crea una carpeta con lo necesario para tu proyecto django en la
carpeta ejecutas python manage.py runserver y abres el navegador
security disable CORS, and add CSRF tokken verification..
if only going to implement the grammar interpreter is way too django uses
something simpler like bottle or flask
2015-02-16 16:02 GMT-03:00 Ricardo Daniel Quiroga <l2radamant...@gmail.com>:
> Hi
>
> html + textarea + jav
e.com/d/msgid/django-users/b7817512-cdad-460d-b0b9-a643e303d490%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/b7817512-cdad-460d-b0b9-a643e303d490%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
R
On Saturday, 14 February 2015 04:28:40 UTC, inoyon artlover KLANGRAUSCH
wrote:
>
>
> urlpatterns = patterns('',
> url(r'^admin/', include(admin.site.urls)),
> url(r'^(?P)$',List.as_view()),
> )
>
That regex will never match anything. You need to give it some character
classes to match:
How's the hyperlink saved in the column? If it's a relative one this is
what is going to happen, to change that you need an absolute link, i.e:
http://google.com
On Fri 13 Feb 2015 at 23:40 dk wrote:
> this is my template
> I do have this address
>
On Friday, 6 February 2015 20:30:02 UTC, larry@gmail.com wrote:
>
> I have a 1.7 app, and in admin when I reference a foreign key field,
> instead of showing the values in the drop down, it shows "`model name`
> object":
>
>
> How can I get it show the values from the IPGroups table? I'm
On Thursday, 5 February 2015 12:34:51 UTC, João Sampaio wrote:
>
> There are 3 Python files attached.
>
> I have my URL file attached. I'm using django-rest-framework (in case you
> are wondering what the routers are). When I use ./manage.py test with the
> first file (file1.py), the tests
On Tuesday, 3 February 2015 06:19:47 UTC, Max Nathaniel Ho wrote:
>
> Hi all,
>
> I am following this tutorial (
> http://musings.tinbrain.net/blog/2014/sep/21/registration-django-easy-way/)
> to create a user registration model in Django.
>
> I understand that the class UserManager is
On Friday, 30 January 2015 14:01:17 UTC, Avraham Serour wrote:
>
> I believe putting imports inside functions would slow down execution, it
> will make the import everytime the function is executed
>
> one could make something like a lazy import, but you would be trading slow
> startup for slow
t; On Mon, Jan 26, 2015 at 5:42 PM, Daniel França <daniel.fra...@gmail.com>
> wrote:
> > I should try circleCI sometime, but that project was on a private
> bitbucket
> > repo, and circleCI didn't support this at that moment.
> >
> > Em Sun Jan 25 2015 at 2:27:
There's a solution referred here:
http://stackoverflow.com/questions/1160030/how-to-make-email-field-unique-in-model-user-from-contrib-auth-in-django
This solution basically override the *clean_email* method of the UserForm,
and check if the email is unique, raising an error if it's not.
But I
flexibility.
>
> Cal
>
> On Fri, Jan 23, 2015 at 6:46 PM, Daniel França <daniel.fra...@gmail.com>
> wrote:
> > I gave up Bamboo and start using codeship, 100 times easiet
> >
> > On Fri 23 Jan 2015 at 19:17 Gabriel Patiño <gepat...@gmail.com> wrote:
>
I gave up Bamboo and start using codeship, 100 times easiet
On Fri 23 Jan 2015 at 19:17 Gabriel Patiño <gepat...@gmail.com> wrote:
> Daniel,
>
> Did you make it work?
>
> I have testing covered by bamboo, and I guess I'm creating the atfacts.
>
> From there, I don't k
at:
https://github.com/alexhayes/django-migration-fixture/pull/2/files.
What is the suggested way to have initial data with Django 1.7, given that
initial_data is not used for apps with migrations, and RunPython has the
above shortcomings?
Thanks,
Daniel.
Am Dienstag, 21. Oktober 2014 19:4
On Monday, 19 January 2015 12:39:38 UTC, joulumaa wrote:
>
> Why would it make sense to switch from different form type?
> I use below form to get information that I like to save to user database?
> Part of information I need ot update goes to Additional user info class, I
> would like to stay in
On Tuesday, 20 January 2015 04:39:47 UTC, Chen Xu wrote:
>
> Hi Everyone,
> Is there any reliable django stripe payments library that does not require
> to run a python manage.py syncdb? The reason I am asking is I am uaing
> SQLAlchemy instead of its builtin ORM.
>
> Thanks
>
You don't need a
On Monday, 19 January 2015 09:22:02 UTC, joulumaa wrote:
>
> I have created user earlier in code with email address and password.
> Created users work fine.
> Now in later phase I asked more information and would like to fill in
> first_name and last_name.
> Code shows old first_name and
On Monday, 19 January 2015 07:28:14 UTC, Cheng Guo wrote:
>
> Hello,
>
> I am new to Django and I have run into an issue with views.py. I
> understand that there is a function behind each view. For a view that I am
> currently writing, it accepts a file upload from user and stores the file
>
If the operations are model related, why don't move some of those functions
to models.py.
On Mon 19 Jan 2015 at 08:46 Mike Dewhirst wrote:
> On 19/01/2015 6:28 PM, Cheng Guo wrote:
> > Hello,
> >
> > I am new to Django and I have run into an issue with views.py. I
> >
Have you tried Dajax/Dajaxice? http://www.dajaxproject.com/
Em Sun Jan 04 2015 at 2:15:16 PM, Krishnakant Mane
escreveu:
> Hello all,
> I am realy impressed with the Django forms and some additional
> enhancements with CrispyForms
>
On Tuesday, 16 December 2014 19:27:41 UTC, Andrew Nguyen wrote:
>
> I'm having some problems getting some of my content to appear on my
> detailed page view, which I have in two separate html files that are being
> pulled in using {% include %}. Inside my two files, slider.htmland
>
You should show your view.
You should not call clean directly: it is called automatically by is_valid.
Also note that the keys of self.fields are strings, so neither your if nor your
elif will ever execute.
--
DR.
--
You received this message because you are subscribed to the Google Groups
On Monday, 15 December 2014 11:04:13 UTC, Gerald Klein wrote:
>
>
>
> Daniel,
> I didn't include any code as I didn't do anything unusual but if you think
> that would help here it is.I was hoping that there was some ordinary
> theoretical basis for this as I didn't do a
On Monday, 15 December 2014 00:53:05 UTC, Gerald Klein wrote:
>
> HI, I have a simple contact form with an address subform in the form of
> "TabularInline" where you can add an arbitrary amount of addresses, after I
> add a contact and an address and save, when I go to add a brand new contact
>
On Tuesday, 9 December 2014 01:37:44 UTC, T Kwn wrote:
>
> I'm created a form where a user can add or remove other users from a
> group. Because the number of available users is unknown beforehand, I
> needed to create a checkbox form where the number of elements is dynamic.
> However, I
On Tuesday, 9 December 2014 06:17:57 UTC, JAI PRAKASH SINGH wrote:
>
> hello all,
>
>
> I am trying to make a registration form using User model so i am using
> ModelForm
>
> as I am using bootstrap template i need to add some atribute like class
> placeholder
>
> so i am using widget, am
On Monday, 8 December 2014 11:07:11 UTC, Tobias Dacoir wrote:
> So what am I doing wrong? I'm sure it's just my fault. At first I even
> manually edited the migrations file in the past, for example when I changed
> one of the fields to be mandatory instead of being optional. Old data in
>
On Monday, 8 December 2014 07:23:33 UTC, Tobias Dacoir wrote:
>
> Hi,
>
> I'm having trouble with changes to my Models. I just added a couple of new
> fields to my existing models but when I run manage makemigrations it says:
> No changes detected. When I try to log in to the admin panel it
On Monday, 1 December 2014 23:59:00 UTC, Rootz wrote:
>
> I have a small project but I am trying to restrict access on some of the
> django app urls to login users only. The problem is that when I hit a page
> that requires login users I expected that they(users) are redirected to the
> login
On Monday, 1 December 2014 19:07:59 UTC, check@gmail.com wrote:
>
> Hello
>
> I am very new to python and Django . I have a basic question :
>
> 1. I have three database tables : Table A , Table B and Table C
> 2. in my views.py i do :
>
>- tableB_QuerySet =
On Tuesday, 2 December 2014 09:59:30 UTC, Shashwat singh wrote:
>
>
>
> PLEASE HELP WITH THIS
>
Nobody can possibly help with this. This is a random error message. What
were you doing when you got it? What did you type at the command line? What
code do you have already?
And, please do not
If you are using Django 1.7 why don't you use the built in migrations:
https://docs.djangoproject.com/en/dev/topics/migrations/
On Fri 21 Nov 2014 at 05:19 Alvin Panugayan wrote:
> I'm following the django tutorial online and I'm stuck on the migrate bit
> (bottom of the
On Thursday, 20 November 2014 11:39:09 UTC, Yen wrote:
>
> Hi,
>
> I follow the doc to test the login system. I set a view function with
> @login_required to show successful login message.
>
> In the html, a link like:
> Login
>
> The URLconf under 'account' namespace contains one url:
>
On Wednesday, 19 November 2014 10:22:25 UTC, termopro wrote:
>
> I have created a Django 1.7 project and would like to deploy it. I am
> reading about how to do it right and i have some questions.
>
> If i understand correctly deployment should contain the following steps:
>
> 1) Initial remote
>
>
> But based on your traceback, it seems like at some point in the past
> when you made a migration, the field might have had a default value
> which was a naive datetime. Is that possible?
>
> It might be necessary to look through your existing migrations for this
> app to find the
On Wednesday, 19 November 2014 15:11:27 UTC, Carl Meyer wrote:
>
> Hi Daniel,
>
> On 11/19/2014 08:07 AM, Daniel Grace wrote:
> > I have already installed pytz (2014.17) and I have set USE_TZ=True. I
> > don't use any naive datetimes in my application. This error is
I have already installed pytz (2014.17) and I have set USE_TZ=True. I
don't use any naive datetimes in my application. This error is caused by
something that the Django test command is doing automatically, if you look
at the traceback you will see that it is something to do with migrations.
Hi,
Here is my model:
class Flow(models.Model):
ref = models.CharField(max_length=32)
state = models.ForeignKey(State)
flow_type = models.ForeignKey(Type)
created = models.DateTimeField(db_index=True, auto_now_add=True)
modified = models.DateTimeField(db_index=True,
On Tuesday, 18 November 2014 15:04:19 UTC, Tobias Dacoir wrote:
>
> I'm trying to figure out how to create my Custom User Model.
>
> In the official docs I basically found two different strategies: Extending
> User Model or Custom User Model:
>
Hi,
I get another warning / error with a test command as follows:
>python -W error manage.py test flow
Traceback (most recent call last):
File "manage.py", line 8, in
from django.core.management import execute_from_command_line
File
On Monday, 17 November 2014 11:33:40 UTC, Bruno Barcarol Guimarães wrote:
>
>
> $ python -W error manage.py test
>
>
Hi Bruno,
I get another warning / error with that command:
>python -W error manage.py test flow
Traceback (most recent call last):
File "manage.py", line 8, in
from
Is this a bug in the Django tester?
--
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
I understand the problem. Why doesn't the Django tester provide time zone
aware date times? I know if I set "USE_TZ = False" the warnings will
disappear. I was looking for another solution. Could I conditionally
set "USE_TZ = False" only when testing?
--
You received this message because
On Saturday, 15 November 2014 03:13:37 UTC, pythonista wrote:
>
> I am using django 1.7 and apache.
>
> I do not understand the instructions on the django tutorial.
>
> The files were delivered as expected in debug mode and locally from the
> django web server.
>
>
> Can someone provide me with a
Hi,
I get a runtime warning about a naive datetime when running the test
command:
>python manage.py test flow
Creating test database for alias 'default'...
C:\landy\lib\site-packages\django\db\models\fields\__init__.py:1278:
RuntimeWarn
ing: DateTimeField Flow.created received a naive datetime
On Saturday, 15 November 2014 00:58:32 UTC, Aliane Abdelouahab wrote:
>
> how about this
> http://stackoverflow.com/a/19426770/861487
>
>
That link, what is that about?
Anyway, I manually created a database called "postgres" and the error went
away.
--
You received this message because you are
Hi,
I get an error when running the test command:
>python manage.py test flow
Creating test database for alias 'default'...
Traceback (most recent call last):
File "C:\landy\lib\site-packages\django\db\backends\__init__.py", line
133, in
ensure_connection
self.connect()
File
Hi,
I'm new to Django, and I've been following the tutorial up until the 2nd
part where it asks your to runserver, and then access the admin page.
However, when i try to access 127.0.0.1:8000/admin/ i get this error:
Here is the traceback:
*Environment:*
*Request Method: GET*
*Request URL:
On Sunday, 9 November 2014 13:40:12 UTC, Dr Ed wrote:
>
> Okay, I'm confused. I found it, in here:
> /Users//.virtualenvs//lib/python2.7/site-
> packages/django/contrib/auth/migrations
>
> Why are app related migrations being stored in this location?
>
> Cheers,
>
> Ed
>
What? Migrations
Hi,
OK, I know how to import CSS into a template. I would like to get forms /
pages that look like those on Django admin site. What is a good strategy
to achieve this? Copy the CSS? Looking at "inspect element" in Google
Chrome I see that the styling on the forms in the Django admin site do
Thanks Bruno, I was decorating the 'post' method. I've got it right now.
--
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
I solved this using a "method_decorator" and "user_passes_test".
--
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
Hi,
Say I have a function as follows:
def is_supervisor(user):
return user.groups.filter(name='supervisor').exists()
...and a CBV for deleting records:
class DeleteFlow(DeleteView):
# etc...
How can I restrict access to this view using the function?
I understand that this may be
I see where you are coming from Carl, thanks for the information. Do you
have a suitable example of where one might put error handling in the view
code?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop
Say I have the following code:
logger = logging.getLogger(__name__)
def render_error(scr_msg, err_msg, context):
logger.debug(err_msg)
return render_to_response('error.html', {'message': scr_msg}, context)
...
def some_view():
try:
context = RequestContext(request)
...
Thanks for the information Aliane and Steven, although I still don't know
what to do when handling exceptions in say form_valid of a CBV. How to
render the error in this case?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe
Say I have the following code:
try:
context_dict = {}
context = RequestContext(request)
...
except Exception as e:
return render_to_response('error.html', context_dict, context)
...then how do I handle the exception without a context? Should I use the
render function instead of
OK, say if I have a function based view then how do I handle the exception?
try:
context = RequestContext(request)
context_dict = {}
...
return render_to_response('my_file.html', context_dict, context)
except Exception as e:
# what to do here?
What about class based views (in
On Sunday, 2 November 2014 18:12:10 UTC, rmschne wrote:
>
> I've upgraded to Django 1.7.1
>
> Following the upgrade most (haven't tested all, but for all tested this
> true) the over-rided queryset is not functioning.
>
> when the code calls
> qs=Member.Active_objects.all()
>
> then all
Hi, I'm looking for some information / examples of how to generally handle
exceptions and show a message to the user, in function based and class
based views.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and
Hi,
I am trying to use the url tag on some parameters, one of which needs to
come from a function.
For example as follows:
{% with state_url=encode_url flow.state.description %}
advance
encode_url is defined as follows:
@register.simple_tag
def encode_url(link_text):
return
On Wednesday, 29 October 2014 17:53:40 UTC, not...@gmail.com wrote:
>
> Hi !
>
> Just tested the following:
>
>- create clean DB
>- run syncdb
>- compare obtained tables when using Django 1.6.8 and Django 1.7.1
>
> My findings :
>
> In Django 1.7, some fields with models.ForeignKey no
On Wednesday, 29 October 2014 03:57:36 UTC, somecallitblues wrote:
>
> Hi list,
>
> I have a table of orders where one of the columns is a IntegerField
> containing the id of a user who created the order.
>
> Since it's not a FK field django admin can't display these orders inline
> inside the
Hi,
In reference to urls.py what is the purpose of the include function? For
example what is the difference between these two lines?
url(r'^admin/', admin.site.urls),
url(r'^admin/', include(admin.site.urls)),
--
You received this message because you are subscribed to the Google Groups
Oops, too much indentation on the "def ..." line.
--
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
Hi,
I have a ModelForm for creating users, but it shows some help text
"Required. 30 characters..." next to the username field.
How do I get rid of this text? I tried the following, but the text remains
on the form:
class UserForm(forms.ModelForm):
password =
I just used the following:
{{ log.user.userprofile.picture }}
... and I didn't need the select_related.
--
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
That's what you've already done with your select_related call. What you should
have asked is how you access that data in the template, and the answer is that
you simply follow the relationship from your Log object:
{% for log in logs %}
{{ log.myfield }}
{{ log.userprofile.picture }}
{%
Hi,
I have a log table with a foreign key to the user table, and a userprofile
table with a one to one field to the user table:
class Log(models.Model):
user = models.ForeignKey(User)
...
class UserProfile(models.Model):
user = models.OneToOneField(User)
picture =
I need to include the following steps, but I don't know how:
1. copy the 'picture' file
2. resize it (the copy)
3. save it to the upload directory
4. store it in the 'thumb' field
... continue as before and save the 'profile'.
--
You received this message because you are subscribed to the Google
Hi,
I am trying to put together some code for resizing an image and storing the
resized image on the database, but I am running into some problems having
struggled to find some decent examples online. Here is what I have come up
with so far, in the model:
class UserProfile(models.Model):
Thanks people for the info. I was looking for a way to beautify the code,
rather than for performance / compression. In particular I came across
this when I implemented a template tag which, under certain circumstances
returns an empty string. This works well but causes blank lines in the
On Thursday, 23 October 2014 21:45:18 UTC+1, Aliane Abdelouahab wrote:
>
> Try the code like that, it will not work,
>
> now move the views.py from /rango to the initial directory where the is
> the manage.py (/abdou) and it will work
>
Nope; that is the correct structure, as it is, with no need
On Thursday, 23 October 2014 15:34:15 UTC+1, Aliane Abdelouahab wrote:
>
> i followed exactly by words the tutorial
>
> http://www.tangowithdjango.com/book17/chapters/setup.html#creating-a-django-application
> and it seems the problem is about creating the double directory, and when
> doing
On Thursday, 23 October 2014 11:28:10 UTC+1, Oskar Lyrstrand wrote:
>
> models.py:
> class Post(models.Model):
> pub_date = models.DateTimeField
>
> template.html:
> {{ post.pub_date }}
>
> output:
> 23 october 2014 19:25
>
> Problem is I dont want "19:25" to show. What can I do?
>
Why are
On Wednesday, 22 October 2014 22:05:07 UTC+1, Aliane Abdelouahab wrote:
>
> Hi,
> Django 1.7 when a beginner runs the first tutorial, he has to change the
> views.py file outside the app to the whole project itself.
> i found this,
>
501 - 600 of 3445 matches
Mail list logo